iphone app navigation bar multiple items - objective-c

how can I have a back button and another button both on the left side of the nav bar?

Do you also need the title? If not, you can simply place the button in the center area. Otherwise, if you also need the title, you will need to create a UIView with a label and a button in it and set that as the center view. You will have to set the label's text manually if the title of the view ever changes.
Or, if you don't care too much about the back button, you can create a button that looks like the back button and put your other button next to it in a parent view that you use as the left view. You would have to manually handle going back when pressing the back button, and unless you got an image that looks like the back button, your button would not have the arrow shape.

Related

In IOS 7 How to make regular navbar button looks like a back button

Sometimes the navigation controller is already on the bottom.
However, I want to add a custom button that will allow user to effectively select a left tab.
That back button doesn't have the left chevron.
How do I make that regular button looks like back button?

Adding a scrollview and get it to zoom

In my iphone app, you get a UIView with a background image and a "start button".
When you hit the start button, the start button will be hidden, and your background aswell. You will see another image. You will also get a "back button".
You should be able to zoom the image and scroll around.
I want everything on the same UIView.
When you hit the back button, everything should get back to the first background image and the start button, and you should not be able to zoom or scroll.
How can I do this? And is it possible at all to hide a scroll view in order to just show a regular screen, in the same view?
Thanks in advance!
EDIT: Ok, I know how to hide the scroll view now, but when the scroll view is shown, you can't scroll! I have made the scroll view bigger than the screen and put a label below the "original screen". How to get it to scroll?
Add a UIScrollView to the main view in which you have the zoom/scrollable image. Simply remove it when the back button is pressed.

Can I edit the UINavigationItem's title from within the app?

So I want the ability to change the title of the UINavigationItem from within the app. To be more specific, I want to be able to tap the title on the navigation bar and have it go into edit mode; where I can type in a new title. Is there any way to do this?
It's quite possible and not very hard in fact. Here are the simple steps:
Navigation item allows for custom views in its title
Add a view with a label similar to that of the native navigation item
Add a transparent button (custom button) on top of the label
Add a hidden text field on top of the button
When the button is pressed, hide the label and show the text field - focus on the text field (becomeFirstResponder)
You are in editing mode: now track for "Return" key being pressed, and once that happens set your label text to what has been entered, resign first responder from the text field and hide it, then show the label
If you adjust all the properties of the UI components it will look like your navigation item supports inline editing!

Custom button with style of NavigationBar back button

Is it possible to make a custom button that looks like a back button in NavigationBar? I mean the shape of the left side that is like an arrow.
No, there isn't. You will have to draw it yourself to an image file and set it as a background to your custom button.

How to put a view on the back button of navigation bar?

How to put a view on the back button of navigation bar?
Not on title view, but on the back button. It seems like to me that the back button is a UIBarButtonItem, which doesn't inherite UIView.
You can do it programmatically using initWithCustomView.
AtomicElementViewController.m has a good example of this.