Сделайте кнопку с рамкой CGRect (0, 0, 20, 20), затем добавьте ее в вид.[UIView addSubView] установить цель кнопки.
UIButton *closeButton = [[UIButton alloc] initWithFrame: CGRectMake(0,0,20,20)];
[closeButton addTarget:self action:@selector(closeView) forControlEvents:UIControlEventTouchUpInside];