iOS presenting modal and navigation controller based views - objective-c

I'm building an application for the iphone that uses both modal views and navigation-controllers. In my case, the initial screen is a table view within a navigation controller, and if the user clicks on the "+" button, they get a new screen that appears in a modal view sliding up from the bottom of the screen that will allow them to add a new record. Within this modal view I want to have a button that will allow them to select from a list of options.
To provide a quick example, take a look at this screenshot from the Apple documentation: https://developer.apple.com/library/ios/DOCUMENTATION/UserExperience/Conceptual/TableView_iPhone/Art/ui_navbarpurposes.jpg. If you look at the "Repeat" option in the second view, that's what I want to emulate -- the user will click on the option and a new view (not a action sheet) will load allowing them to select from a list.
Ideally, I would want this new option screen to slide in from the right like a new view was added to the navigation controller stack. However, since add record screen is a modal view, I can't do that, can I? Or would my modal view need to load my add records view embedded within a new navigation controller?
Hopefully I'm explaining this clearly enough. Sorry for any confusion!

Your last thought is the way to go: you need to add a navigation controller to your modal view, and then when they tap the table view row, you just push your next view onto the navigation stack.

Related

Can clicks from 1 view be passed "through" to another view?

I have a window that contains 2 separate views. View A and view B.
View B is a transparent view so what you are seeing is actually View A on the screen. Is there any ways to make clicks made on the screen (which goto View B since its on top) to actually act on View A?
View B is NOT a child view of view A. They are both child views of the main Window.
* Caveat here is that I still would need to be able to register any dragging events on View B. I simply want the 'click' events to pass through
View A is going to be the main screen of what the user is interacting with and View B is a draggable off-screen menu resting on a transparent background that is partially on the screen so the user can grab it and drag it into the screen
Thanks!
There is a property you're looking for that can handle this, it is
touchEnabled: false
If you put that on your transparant view it should not trigger any click event, but the view below it should.

Extra Buttons Showing on Tab View Controller

There are 2 extra buttons on my storyboard tab view controller and I haven't connected anything yet. They only show up in run time and there is no code adding buttons to the tab bar controller.
Do you know where the buttons are coming from?
Delete the tab view controller then add a new one and redo the connections.

Navigation bar doesn't show back button

I have a navigation controller with a table full of buttons that cause various settings pages to push in. I needed to add a new one, so I copied one of my existing ones, changed the VC, and off I go.
But there's no nav bar on the screen. I can see the navigation object in the storyboard and the editor simulates it's display. I compared it to the other pages that are displaying the bar, and they look the same.
I tried changing some settings, like "Hide Bottom Bar On Push" and that had an effect, but my attempts to get the bar to show up fail.
I looked at other questions that suggested it had something to do with naming, but I've tried various name fields - on the Navigation Item, the VC's Title, etc. - with no effect.
I am not sure, but the problem may be that in case the segue to the new View Controller Scene is set to modal, it would not have a Nav Bar, To be able to see one, you need to embed that in another Navigation Controller.

How to deal with a navigation controller inside a tab bar controller?

I have the following situation: I begin with a login screen (which I want to have no toolbars or tab bars.) After the user has logged in, I want to display a tab bar with multiple options each of which can drill down into their own view hierarchy. Thus it is necessary for each of these tabs to have navigation controller capabilities.
Thus, the most immediate solution would be to have a tab bar controller and then have each section (3 in total) have their own navigation controller. However, the issue is that I want each page in the entire app to have a logout button which will bring them back to the very first screen.
I could have segues from every page's logout button back to the beginning but this seems wrong. I could also put the tab bar controller inside the navigation controller; however I've heard that navigation controllers should always be inside tab bar controllers and never the other way around.
Any suggestions
If the root view controller for each UINavigationController is the login screen, why not just make a logout button assigned to self.navigationItem.rightBarButtonItem for each appropriate view. When clicked, it can call your logout function and then popToRootViewControllerAnimated: to take you back to the login screen.
You can use setNavigationBarHidden:animated: in any view you want or don't want the navigation bar to be shown.
Present your "login" screen as a modal view controller on top of your tab bar controller of navigation controllers. Anytime you logout from anywhere in the app you present a new modal login view and can then reset the state of your other controllers while they are no longer visible. On login you dismiss the modal and reveal the tab bar controller and whatever it contains.

Scrolling Tab Bar with Navigation Tab in each view

Project need to show 7 tab bars in the application. So as per TabBar controller I am able to show the 4 tabs at a time along with "More" button which after clicking shows remaining tabs.
Also I need to show Navigation Tab for each View.
I am able to achieve this till now. But we need to make the Tab Bar in scrolling manner so that user can scroll the remaining tabs and after clicking particular tab that view is loaded along with Navigation Controller.
So can any body tell me how to achieve Scrolling TabBar along with Navigation bar in each view.
Any sample code will be more great full......
Thanks in advance.
You already mentioned the "more"-button... This should be the way to manage too many tabs, in order not to break the common iPhone l&f and keep users on track.