I've created a custom button as an NavigationItem at the rightBarBuuttonItem. It works well, but when I click outside the button, for example a little down of the button, it still works. Here is my code
fetchButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 30, 30)];
[fetchButton setImage:[UIImage imageNamed:@"quanse.png"] forState:UIControlStateNormal];
[fetchButton addTarget:self action:@selector(searchDataByColor) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem =[[UIBarButtonItem alloc] initWithCustomView:fetchButton];
Anybody who can tell me, what can I do to fix this bug?