UIView現在のに a を追加していUIViewControllerます。UIView画面上の任意の場所に触れたときに a を削除する必要があります。に がありUIButtonますUIView。しかし、クリックUIButton  すると もUIView削除されます。
実際には、UIViewクリックすると をcurrentview閉じて に移動するボタン (サインアウト) を追加しましたhomeViewController。しかし、現在のビューのボタン以外の場所をタップするとUIView、UIView削除する必要があります。しかし、私の場合、ボタンをクリックするUIViewと削除されます。
logout= [[UIView alloc]initWithFrame:CGRectMake(210,lbllogin.frame.origin.y+lbllogin.frame.size.height, 80, 50)];
logout.backgroundColor = [UIColor yellowColor];
btnSignout = [UIButton buttonWithType:UIButtonTypeCustom];
[btnSignout addTarget:self 
                action:@selector(aMethod:)
      forControlEvents:UIControlEventTouchDown];
btnSignout = CGRectMake(0,0,80,13);
[logout addSubview: btnSignout];
[self.view addSubview:logout];
        UIButton *btnsignout=[[UILabel alloc]init];
        [lblsignout setFrame:CGRectMake(0, 0, 80, 13)];
        lblsignout.textAlignment = NSTextAlignmentLeft;
        lblsignout.backgroundColor = [UIColor clearColor];
        lblsignout .font=[UIFont fontWithName:@"Helvetica-Bold" size:14];
        lblsignout.text=@"Sign out";
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [logout removeFromSuperview];
}