Linking custom iOS buttons to footer nav buttons - ios

Im going to say this straight up - I'm an xcode noob. I am designing an app which has custom buttons on the home screen as well as a footer nav with buttons. When I select the custom button it goes to the right view but the footer nav button is not highlighted.
I just need to find a way to tell the footer nav i am on that section (got their by clicking on the home button). Apparently i have been told there is no way to do this so i might as well scrap my home view custom buttons. I'm hoping to find someone here with a different view. I would provide a screenshot so it makes my explanation clearer but i have not got a high enough rating.
Originally i just wanted to hide the nav bar for the home screen but i was also told that it was not possible. Its there the whole time or not at all. Looking for a second opinion...

Use the following code to hide navigation bar
self.navigationController.navigationBarHidden=YES;
Also, just wanted to confirm, when you say footer navigation buttons, do you mean a tabbed view? some thing like this screenshot?
If you could provide some screenshots would be great.

Related

Too Many Items for Nav Bar Layout in iOS

I need some help figuring out how to fix the layout of a navigation bar in an iOS app. When adding navigation to 'child' views of a given screen, my approach so far has been to add buttons to the 'leftBarButtonItems' collection of the UINavigation item. As long as the number of buttons doesn't exceed 3 or 4 everything works great.
Unfortunately, I now have a screen that requires additional buttons. Everything seemed to build fine, but when I actually run the application I end up with a jumbled mess like this:
Is there a better way to layout a UI with nav and toolbar buttons like this? If putting the buttons in the nav bar is actually the correct way, what do I need to do to make the layout handle cases where the content can't fit?
I wouldn't bother with adding any extra buttons. Users expect most apps to behave in similar ways, and (while this is technically possible) it's an unusual thing to do.
Apple's HIG states:
Avoid crowding a navigation bar with too many controls. In general, a navigation bar should contain no more than the view’s current title, a back button, and one control that manages the view’s contents.
And, even if you choose to ignore Apple's HIG, this will certainly won't be good for accessibility. Your users can (and will) change the text size with Dynamic Type - so your assertion that it's OK if the "number of buttons doesn't exceed 3 or 4" will be proven false by someone.
You'd be better to add a toolbar instead, or find some other way of providing those features.
The navigation bar often has the title of the previous view on the left side. The right side contains a control, like Edit or a done button, to manage content within the active view.
Navigation bar Example
Apple documentation recommends to avoid crowding a navigation bar with too many controls.
A navigation bar should contain no more than the view's current title, a back button, and one control that manages the view's contents.
For the back button you should use the standard one. As for the text-field it should have enough room. If items in the nav bar are crowded consider separation by inserting fixed space by using UIBarButtonSystemItemFixedSpace constant value in UIBarButtonItem.
For more information visit the following link.
The way to go when you need 3 or more items is by using either nav bar or toolbars. You can combine both nav bar and toolbars. For more information use apple documentation on toolbars.

How to Customize Toolbar inside a Navigation Controller

I have a noob question.
I am developing a simple app that uses a navigation controller (so, a nav bar on top, and a toolbar is shown on bottom via interface builder; I use storyboards). This nav controller shows a number of related tables (table views) on different screens.
My question is: I want to populate the toolbars for each screen. Ideally, I'd like to populate a label there that shows a little summary text about the contents of the table view currently displayed - but I understand that that may not be the purpose of those toolbars, and not be supported by the UIKit toolbar view.
But what should work (to my modest understanding) is to show buttons there - individualized for the current screen. But I couldn't for the life of me figure out how to do that (I tried in interface builder - but on each screen controlled by the navigation controller, the toolbar is shown, but can not be accessed; it is also not referenced in the outline for that screen - only the outline for the navigation controller shows a reference to a toolbar, and if I change anything in it, which is possible, it does not show up in any of the screens controlled by the navigation controller).
Hope this is clear enough. I think this is a very simple issue to do - but I am stuck; Google searches didn't help me. Maybe someone of You can point me to some keywords to look for?
Thanks a lot for considering!
Best regards,
Björn
What exactly are you trying to drag into the navigation controller bottom toolbar?
From my experience you are only allowed drag out Bar Button Item's along with Fixed and Flexible Spaces.

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!

ios7: UIButton on UINavigationBar is not selectable

I have a pretty unique problem. I have a custom nav controller (https://github.com/cwRichardKim/RKSwipeBetweenViewControllers) and I'm trying to customize it even further. The effect I'm trying to get is this:
What I have is this (ignore the search bar):
The problem that I have is that when you click on any of the tabs in my nav bar ("public" for example), the click doesn't register, and it clicks whatever is underneath instead. For example, if I click "Munchies", it will click the search bar underneath the tab. Also, even if there is nothing clickable underneath it (I've tried this with a blank UIViewController), the tabs (eg: "Munchies") are still not clickable.
I have a theory for why this is. If I raise the tabs by a few pixels, the tops of the tabs become clickable. So, I think the navigationBar has a frame within which you can interact with its objects, but if you interact with anything outside of that frame, it interacts with lower layers. I've tried expanding the nav bar height and it doesn't work (I've looked it up and it's against the rules).
Any thoughts?
Thanks!
I read your code here that is shown here:
https://github.com/cwRichardKim/RKSwipeBetweenViewControllers/blob/master/RKSwipeBetweenViewControllers.m
I'm not exactly sure whether this will work out. But this issue has occured to me in table cell as well. Perhaps you can try typing this in.
[navigationView setUserInteractionEnabled:NO];
I'm pretty sure that your approach is on the right track because as I read Apple documentations it says:
Custom views can contain buttons. Use the buttonWithType: method in UIButton
class to add buttons to your custom view in the style of the navigation bar.
Custom title views are centered on the navigation bar and may be resized
to fit.

iPad UI navigation - split view with horizontally scrolling views

I'm looking for suggestions to implement a specific UI navigation pattern on iPad. It's not radically different from standard behaviour, but I'm unsure of the best approach to use.
Picture a standard split view, with a master view on the left, detail on the right. I want an action in the detail view (e.g. button press) to navigate to an additional detail screen by scrolling from right to left. The result is that the original detail view is on the left (with its width unchanged), and the new detail view on the right. A back button in the nav bar reverses the process. When the master view is visible, the back button is replaced by a menu button in the nav bar (show/hide slide out menu).
I've seen a few similar implementations in existing apps. One that's easy to reference is Shopify's
online demo. Adding an item to the cart and pressing the total button triggers the navigation behaviour.
Any pointers on the best way to implement this would be much appreciated.
Thanks.
Creating a custom container view was a good solution.

Resources