How to restrict rightBarButtonItem size in UINavigationBar ?
- by lefakir
I create a rightBarButtonItem with this method :
- (UIBarButtonItem *)customBarButtonWithSelector:(SEL)callback {
UIButton *customButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
customButton.bounds = CGRectMake(0, 0, 30.0f, 30.0f);
return [[[UIBarButtonItem alloc] initWithCustomView:customButton] autorelease];
}
At execution time the selector is fired when the bar is touched outside the button (near the middle).
Is there a way to restrict the event responder in the defined bounds or in a acceptable range ?