monish
monish

Reputation: 1405

how to make disable the default leftbarbutton in navigation bar in Iphone sdk?

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

Answers (3)

Senthil
Senthil

Reputation: 510

This one line Code enough

self.navigationItem.hidesBackButton = YES;

Upvotes: 1

aarti Garg
aarti Garg

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

kennytm
kennytm

Reputation: 523274

Set the enabled property of the leftBarButtonItem to NO.

Upvotes: 0

Related Questions