Navigation bar tutorial - ios

First, sorry for my bad English. I'm really beginner at App development and I'm doing an app with three views.
The first and the second ones are switched by a Tab Bar (and that's all right so far).
The first it's gonna be the only one which leads to the third view (which will be only a image) through a Navigation Bar.
This nav bar in the first view will have one button to go to the third view, and in the third view the nav bar will have a button "back" (and here's the problem).
I'm putting a nav bar in the first view and I try to put a Nav item into it, but they don't let me! How can I do it ? I can't find a good Navigation Bar's tutorial whithout storyboard (I'm not using storyboards...).
Thank you.

take a look at these two tutorials
http://fuelyourcoding.com/how-to-add-buttons-to-your-ios-app-navigation-bar/
and
http://www.idev101.com/learn/navigation_controllers.html

Related

Same tab bar on every view

I'm trying to create an app with three primary views (maybe even more in the future) that you can always get to from anywhere.
The tab bar controller works great for that, I have 3 icons in the bar for every view. However, when branching off from any of those to other modal views, the tab bar is obviously no longer there.
I got around it by embedding one view in a container, so it is not overlapping the tab bar, but I cannot do the same thing for another view. (fx. on the screenshot you can see Zastavky Table View, I would like to be able to get to another view by clicking cell in this one, yet still have a tabbar on the bottom)
Screenshot of storyboard:
Do you guys have any idea how this could be done? Is my whole concept wrong here? Thank you very much! :)
Use navigation with show segue.
UITabBarController
|--UINavigationController
| `--UIViewControllerA
|--UINavigationController
| `--UIViewControllerB
`--UINavigationController
`--UIViewControllerC
This construct may help you.

UIBarButton placed in toolbar instead of UINavigationBar

I'm developing a (so far) simple iOS application using storyboards.
At one place in the storyboard, I have:
Navigation controller -> Table View (prototype content) -> Regular view
The "regular view" is accessed from a + (PLUS) button in the navigationbar in the table view. In the "regular view" I would like to have a save button in the NAVIGATION BAR. However, when I drag it from the object library to the "regular view" it appears in the TOOLBAR (at the bottom of the screen) instead of in the NAVIGATION BAR. I have not found a way to move it, or found any settings where I can change it. I'm not sure if there is something constraining me from putting a button there or if XCode just mess with me. (I'm new to iOS programming)
Notes:
In the "regular view", I have a back button and a title. According to the design guides I should be able to have one more button.
Thanks for any help!
If anyone faces this problem, I did the following:
I couldn't add a Bar button because there were no top bar in that view. First I tried to put a Navigation Bar in the view, but Xcode crashed. Then I tried to put a Navigation Item, which worked. After that I could place my bar button in the top bar.
What I don't understand is why I could put the Add (+) button in the previous view, since that doesn't have any navigation entry either, but I'm guessing it's since that view was the root view controller of a Navigation Controller. Someone else can maybe give a more detailed answer.
There isn't any solution for this so far. There are however some workarounds for this problem.
Check this pretty cool answer by #Shimanski:
https://stackoverflow.com/a/20419513/2082569
& also this by #ecotax:
https://stackoverflow.com/a/17019667/2082569

Navigation bar with page control on iOS

I'm new to iOS developing, I wanted to ask could someone help me how to make a page control(screen sliding) with navigation bar, I have tried a lot of things, I googled a lot but I couldn't find a solution.
I have a button when I click it will open a pagecontrol(rootview for screen sliding) with tableview which will change its data according to pages.
the problem is when I click that button I don't know how to get back to main page.
Can anyone help me?
This is a good tutorial for learning how to create a page controller.
As far as your other problem of getting back to the main page, if you add a bar button item to the root view controller's navigation bar, control-drag to your second view in your storyboard from that bar button item, a "Back" button will automatically appear in the upper left-hand corner of your second view controller.
Hope it helps!

Hiding tab bar on one view in Xcode storyboard

I have a Tab bar application where I would like to hide the tab bar for one of the views to exchange it with a toolbar. I am using Storyboard and by setting the Bottom Bar to None and dragging in a toolbar this looks the way I would want it on the storyboard.
But when I run it the Tab bar doesn't go away.
I had the same question but ended up finding my correct answer here
Essentially, you can hide the tab bar for certain view controller by checking the 'Hide bottom bar on push' check box (in the view controllers attributes inspector in the storyboard).
This might not answer all, and might not be compatible with =< iOS 5, etc, but it helped me and I hope it helps others who come here.
Thanks, and good luck!
It wont work because it only simulate the view when the tabbar is hidden. If you want to hide tabbar you have to do it programmatically.
See this answer Iphone: Is it possible to hide the TabBar?
and try to use hideTabbar method in viewWillAppear, and showTabbar in viewDidDisapear.

Custom navigation bar in Xcode 4?

I'm pretty new to Xcode and me and my buddy are working on a golf app we tought would be cool to use for ourselves. I've done a tab bar with 3 view controllers and one navigation bar controller with 2 view controllers. Now, first of all the bar on top is named navigation ITEM and not navigation BAR, so i can't change things like color and button type, all i can change is the title.
Does anyone know if you can just remove that bar completely or just customize it so it's just a picture i made instead? I dont really need it since you could just press one of the tabs in the tabbar to go back.
Sorry if things doesnt make sense, i'm a total noob. Also i tried search the web and all i could find was some youtube clip from xcode 1.2 and i tried it but it didn't work..
You could make your custom nav bar in photoshop or similar, add it as image view and add custom buttons on top of that.

Resources