Appz Venture
Appz Venture

Reputation: 939

Back in UINavigationItem making problem

i have problem that i have 3 views,

i goto first view to 2nd and want to change mine back button title

i write this code in viewDidLoad of 2nd View but its not working :(

UIBarButtonItem *backButton = [[UIBarButtonItem alloc]initWithTitle:@"Back" style:UIBarButtonItemStyleDone target:nil action:nil];

[self.navigationItem setBackBarButtonItem:backButton];

Upvotes: 1

Views: 153

Answers (1)

0x8badf00d
0x8badf00d

Reputation: 6391

go to 1st view controller and add the following code before you push the viewController,

UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Inv Menu" style:UIBarButtonItemStylePlain target:nil action:nil];
self.navigationItem.backBarButtonItem = backButton;
[backButton release];

Upvotes: 1

Related Questions