I want to hide the rightNavigationBarItem when my ViewController loads. How is it possible? I have tried this code but it is not working.
self.navigationItem.rightBarButtonItem = nil;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Xcode 4. using these won’t work;
I’m actually interested why you mention rightBarButtonItem? When you navigate, its the leftBarButtonItem that changes.
What Does Work;
1)
self.title =@"";nulling the title of the screen, when the navigation controller pushes a detail view onto the stack, no back button is created.2) replacing the
leftBarButtonItemwith something else changes the button, but doesn’t solve your problem.3) An alternative. Hide the navigation bar;
[self.navigationController setNavigationBarHidden:YES animated:YES];