Akhil K C
Akhil K C

Reputation: 4553

UIBarButtonItem Exceeds Below UINavigationBar

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

Answers (1)

SwiftArchitect
SwiftArchitect

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

Related Questions