我正在向导航栏(自定义导航控制器)添加自定义后退按钮,如下所示:-
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
[button setImage:[UIImage imageNamed:@"goback.png"] forState:UIControlStateNormal];
[button addTarget:self action:@selector(handleBackButtonClick) forControlEvents:UIControlEventTouchUpInside];
[button setFrame:CGRectMake(0, 0, 32, 32)];//same as image width and height
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
当我单击靠近条形按钮项目(左右)时,条形按钮正在获取触摸事件。
我想防止这种奇怪的行为。
我正在为iOS7
.