Reputation: 4553
UIBarButtonItem
exceeds its boundary below the UINavigationBar
. That is, when I click just below the UIBarButtonItem
the action occurs. Here is my sample code,
UIBarButtonItem *rightButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:self action:@selector(call:)];
self.navigationItem.rightBarButtonItem=rightButton;
And action,
-(IBAction)call:(id)sender
{
NSLog(@"clicked");
}
Please help me. Thanks in advance..
Upvotes: 1
Views: 132
Reputation: 48522
It is normal and expected behavior.
UIBarButtonItem
extends 5 pixels below the navigation bar.
This is iOS approach for reducing user's frustration on tap misfire.
Upvotes: 1