I have an iPad application with screen flows which don't map neatly to the navigation controller model, but still have the concept of "Back".
I'd like to manage my own toolbar and have a "Back" button where I decide where it goes.
Is there a way to make a toolbar button have the look of a back button as in UINavigationBarItem?
Thanks
Basically, you either have to use undocumented APIs, or create a custom button with a custom image.
This question:
Creating a left-arrow button (like UINavigationBar's "back" style) on a UIToolbar
has answers that cover both ways.
(Placing a UINavigationBar back button look alike icon somewhere other than the left of what looks like a UINavigationBar is probably against the HIG and may result in non-approval of the application, though perhaps only if you're unlucky.)
Related
Thanks for reading my question!
I have a 5-part tabbar which I use for app navigation, the center tab is covered by a UIButton and is slightly larger (much like the instagram app). This works fine.
But what I want is the far right tab bar item to show a overlaying menu when clicked. I don't want it to switch to a viewcontroller with a menu. I want the menu to be displayed no matter which of the other views you're in at the moment. So I want it to act much like a button which is in the tabbar. But I have no idea how to go about doing this.
Should I use a overlaying button over the tabbaritem or should I catch the tabbarclick, but how can I prevent the view from changing in that case?
Thanks you for any help!
You need to implement UITabBarDelegate. Then override tabBar:didSelectItem: and implement your custom displaying here. See below for reference
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UITabBarDelegate_Protocol/Reference/Reference.html
Then i would just make a custom UIView and fade it in when that specific tagged UITabBarItem is pressed.
Could anyone provide some guidance on how to implement that speech-bubble like popup menu when you click "More" in the IPhone IPod application toolbar?
I think you are looking for UIPopoverController. Popover controllers are just containers for view controllers: write a view controller that does what you want, and you're set. But this is for iPad. If you want this for iPhone, then read on. I have put up some solutions.
You could even explore UIActionSheet but UIPopOverController gives more flexibility.
I believe you are talking about something like this ?
Here are some solutions you could adopt -
Forgot that you wanted this for iPhone, Have a look at the iPhone UIPopoverController implementation: WEPopover
On iPhone you would generally use a UIActionSheet for a stack of buttons like that. It slides up from the bottom, rather than popping up next to the button, but that's the standard behavior on iPhone.
Or you could manually instantiate a UIView using a custom background image or drawing with transparency, add some UIButtons (or other type of custom view) on top, and also somehow handle all touches outside that view.
Note that is is non-standard UI. An actionsheet would be more HIG compliant.
I am developing app that has multiple skins and I have a dilemma on how to implement this.
One of the solutions would be to have separate nib files for every skin, and load it depending on which skin is currently selected. Problem with this is that I can't edit navigation bar of navigation controller (which my app uses), and I have to change it's background image and back button image etc.. I came up with an idea to hide this navigation bar on every screen and replace it with custom UIView in Interface Builder which will act as navigation bar and custom back button with IBAction for popping current View Controller, so that user won't see any difference.
Is this approach acceptable and if I make it this way, will I have problems with rejection in App Store?
If you choose to hide & replace the UINavigationBar with your own UIView it's no problem as far as Apple goes.
However, I can tell you that you will have to spend some time trying to replicate some visual effects that come naturally with UINavigationBar.
For example, when you push/pop a new controller, you will see that the navigation bar title will slide & fade beautifully. The same applies for left and right bar items.
Personally I would not completely hide the UINavigationBar, but customize it. In the end it all depends on what you want, but by default the UINavigationBar is pretty customizable.
You can add your own buttons or even entire UIViews as left and right bar items. Also, you can add your own UIView as the title (with your own label, custom font or whatever) or change the background.
EDIT:
To easily customize the looks in your entire application, you can subclass UINavigationController and create your own CustomUINavigationController. Then, in viewDidLoad method you can change whatever you want to the navigation bar and this will be accessible in the entire application.
No way, what you are doing is perfect. This will work & no way it will get rejected from app store (just based on this approach). I too have explored several ways to provide skins & what you wrote seemed to be the least hassle-some. Plus its way more easier to create UI elements in Interface Builder hence the separate nib files for different skins.
I am saying this so confidently 'coz I have done the same thing & app store approved.
Best of luck.
What is the best way to have the right navigation bar button flip like it does in the ipod when one changes from list view to single song view? Subclass a custom view? Are there any api's out there that already do this?
thanks
This question is similar, and discusses a few solutions. The main issue is that the UIBarButtonItem isn't a UIView, so you can't use the UIView transitions. iPhone flip right button (like iTunes)
What I'd like to do is have 3 or 4 buttons on a UITabBar. All except one of these behave as normal UTabBar buttons - ie they switch between different views. But I'd like one of the tab bar buttons to perform a function - refresh the app's data - without switching views… Is this at all possible?
I suggest you use a tool bar for something like this and simply change the background of the toolbar to make it look similar of that to a tabbar and then add tabbar buttons to the toolbar button.
Although im pretty sure this will be rejected by apple, as the intended purpose for a tabbar is to change views. It has something to do with the apple guidelines about what users expect from certain UI components. and if you start switching around with the main purpose of a UITabBar it will be a confusing place in the apple application world.
PK