UIBarButtonItem on UINavigationBar in UITabBarController - objective-c

I'm new here. Sorry for may English.
I work on an iPhone application, which has an Tab Bar Controller (within an Navigation Controller). The Tab Bar Controller has four tabs and an Navigation Bar with default Back Button. I will set an other Bar Button Item on this Navigation Bar (on Tab Bar Controller). That is easy with drag and drop on storyboard, but I can't set an action for this new bar button item.
I know that I should set up a delegate for my UITabBarController, but I don't know how.
Can anyone help?
Thanks!

You usually create IBOutlets/IBActions by cntrl+dragging outlet from the story board to your code.Try to do the following:
Don't forget to switch to assistant editor to split your screen
Click on this button to switch to assistant editor

Related

Without pressing bar button item to load NavigationView in UISplitViewController

So I have UISplitview(screen shot attached above). We normally by pressing bar button item in this case is "Monsters" button to open navigation view which is the left-side view and then the right-side view controller will be updated.
My question is, is there any way to load/update the left-side view without pressing the "Monsters" button?
Thanks!

Putting a toolbar directly under a navigation controller without hiding the content underneath the toolbar

I am trying to put a toolbar directly beneath a navigation bar but I need the toolbar to not hide the content from the view directly beneath it. My quick solution was to set the navigation controller's native toolbar to visible, which works and properly resizes the view beneath it so that it doesn't let anything hide behind it, BUT the default toolbar shows at the bottom of the screen.
I need it to be at the top, just under the nav bar. I figure the easy solution would be to change the frame of the default toolbar (which I don't know how to do) OR to position a new instance of the toolbar onto the view (which works but it hides the content beneath it) but have it resize the views below.
Please see the following image that I found to see what I'm trying to do. (note how the tableview's first row starts UNDER the tab bar)
Thanks!!!
You are confusing two things. The NavigationController toolbar property IS the bottom bar, any toolbar that you add to a view has nothing to do with the nav controller but is a property of that view.
If you have your own toolbar at the top of a view you need to move the rest of the view content down or set that toolbar to translucent if thats what your looking for.
Again the nav controller toolbar is always the bottom bar, the toolbar you drop in IB is just a toolbar for that view that you can put anywhere.
I don't believe you can change the frame of the default toolbar. You will need to create your own instance of a toolbar, position it at the bottom of the navigation bar and resize your tableView to fit below.
We can't see how you have your views set up but if you are starting with a view that is subclassed as UITableViewController you will have trouble doing that. What you want is to start with a UIViewController as your master controller, add a tableview and toolbar as subviews. Then position and size them as appropriate.
If you are hiding and showing the toolbar you will create a method to move it up under the navigation controller and again resize the tableview.

how to remove the navigation bar for individual tabs from interfaceBuilder

i created a tabbar with navigation controller for individual tabs in xcode 4.0 using InterfaceBuilder.previous week ive changed to ios5 and i m not able to find the option to change the navigation controller to view controller in IntefaceBuilder.could u guys help me out by providing me a screen shot
Drag the controller type onto the tab bar at the bottom and delete the unneeded ones.

Tab Bar application with a Navigation Controller but different tab bar on detail page

I've seen lots of tutorials on how to build a simple app with 2 tabs and a navigation controller - especially when there is a table view where you click a row to see details (and have built this myself). But most apps I've seen have the detail view such that either the tab bar disappears or there is another type of nav bar at the bottom. Does anybody know how to extend the basic navigation controller and tab bar to get it to work to get it to work like this?
Here is the answer to my question
How to hide parent tabbar when pushing controller in navigationController

Edit Button on Navigation Controller

I have a navigation controller in my app and on its root view controller i have an Edit button as the rightBarButtonItem.
I have a second table view which is pushed when a cell is tapped on the root view controller.
The leftBarButtonItem becomes the Back button.
I would like an Edit button as well, where can i put it that would make the most sense? My rightBarButtonItem is a + button, so that rules that out.
I would like to be able to tap a cell and change the cells text.
Thanks
The easiest thing to do is add a toolbar at the bottom that contains an edit button.
You could also try adding a bar button item with a custom view that contains two UIButtons and set it as the right bar button item of your view controller's navigation item. I haven't actually tried this, so I don't really know if or how well it would work.