Reputation: 1405
I want to disable the left bar button when my webview is loading can any one tell how to disable the leftbarbutton?
Anyone'shelp will be much appreciated. Thank you, Monish.
Upvotes: 0
Views: 1405
Reputation: 510
This one line Code enough
self.navigationItem.hidesBackButton = YES;
Upvotes: 1
Reputation: 161
I put a blank image at the leftBarButtonItem to hide the back button on the first page.
UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];UIImage *btnImage = [UIImage imageNamed:@""]; [btn setImage:btnImage forState:UIControlStateNormal];
[btn setBackgroundColor:[UIColor clearColor]];
btn.frame=CGRectMake(0, 0,btnImage.size.width, btnImage.size.height);
self.navigationItem.leftBarButtonItem=[[[UIBarButtonItem alloc]initWithCustomView:btn] autorelease];
Upvotes: 1