Disabled navigation buttons and tab bar dynamically - iphone

I have an app with navigation bar, tab bar and I have a button that, when I push it, it do some things. Well, I'd like to disable the navigation buttons(back button for example) and the tab bar buttons in order to avoid that the user push other buttons while the button's action is running.
Any idea?
Thanks in advance

self.navigationItem.hidesBackButton = YES;

Related

How to set the position of a Navigation Bar programmatically

How to set the position of a Navigation Bar programmatically? Autolay have been turned off as its causing issues in other IOS. Cheers guys.
[my layout]
View Controller
View
Toolbar
WebView
Navigation Bar
Nav Item
First Responder
Exit
Navigation bar is currently appearing at the bottom of the screen not the top where I want it.
Try this
[self.navigationController.navigationBar setFrame:CGRectMake(x,y,width,height)];
If you are using Interface Builder you can simply drag the navigation bar to where you want it

Unhide UINavigationBar LIKE in the Email App

I have a View Controller where I perform a "search as you type". When I press on the SearchBar, hide the Navigation Bar, animated and I also show the scope buttons for my SearchBar. The problem is that when I press on a cell to push a new View Controller the Navigation Bar stays hidden. I KNOW I can set it unhidden, but it will animate from the top. I want to do something similar like in the Email app, when I press on a new cell, a new View Controller is pushed, and the Navigation Bar is animated from the right, like it belongs with the pushed View Controller. How can I make this happen?
Thank you.
Cosmin
Use the UISearchDisplayController to handle the search bar. The behavior you describe is the default behavior.

Hide BackButton in UINavigation bar

i am pushing a View om RootView controller ,i get the navigation bar with back button which is navigate to rootviewcontoller,but i don't need this back button.i pout this code in the viewcontoller to hide the back button
self.navigationItem.hidesBackButton = YES;
so i get the hidden back button,but here is the problem,i need leftnavigationbar button to show something,when i write the above code ,the letbarbutton also hidden from the view.becz the leftbarbutton act as the back button.
My need is to block the letbarbutton to become a back button when push from the rootviewcontroller,i didn't need a navigation back to rootviewcontoller.But defenitly need leftbarbutton there for my need in the view.
How can it possible to do?.Please help me to do this.
Thanks in advance.
try this.
self.navigationItem.backBarButtonItem = nil;
it works for me
Why don't you just set the letbarbutton and add no action to it?

iphone-while clicking navigation bar anywhere page redirects to previous page

i have a back button in left side of navigation bar.......and i pass the action for back button as pop view controller.... while i click in navigation bar , the back button action calls.......how to restrict.......while i clicking navigation bar.....pls help me......
Use below in your UIViewController inherited class,
self.navigationItem.hidesBackButton = YES;

How to disable UINavigationController?

I have a navigation controller-based app in which I would like to temporarily disable the navigation controller (top left button) at a certain point in the app so that the user can't get out of the view while I'm uploading a file. Is there a way to disable the "back" button so that users can't get out of the view?
You could hide the navigation bar entirely with
- (void)setNavigationBarHidden:animated:
in the appropriate views.
I don't know of an Apple-approved way to disable or otherwise interact with the back button.
In the view controller pushing into the view where you want to hide the back button (NOT in the view controller where you want the back button hidden), do:
self.navigationItem.hidesBackButton = YES;