Is it acceptable (i.e., to App Store) to have buttons in a UINavigationBar change on-the-fly? For example, perhaps there are two buttons on the Nav Bar for + (Add) and Trash (Delete), but once the + has been touched (for adding an item) the buttons change to Cancel/Save?
A related question, assuming it is acceptable, is whether it is preferable to activate/deactivate buttons as required, or whether it would be better better to make buttons that are not relevant to the operation underway simply disappear to be replaced by those which are relevant at any given time?
Not sure I've made myself clear here, but I haven't seen anything on this in the HIG. Thx.
I don't think there's anything wrong with changing buttons on UINavigationBar. I even have an app published to AppStore (and many other apps too) implementing such feature and Apple's ok with that.
Related
My app is in landscape and uses a UINavigationController as its RootViewController. My goal with it is:
Disable the normal iOS StatusBar ( I know how to do that and already did it )
Have a semi-transparent StatusBar (a view) above the UINavigationBar, so that I can show custom information on it
Parts of the content of my main view must be visible underneath my custom StatusBar (exactly like it works with the normal UIStatusBar, just that I don't want the clock and battery and want to show my own information on it)
How can I best achieve this?
A quick search on GitHub gave me multiple libraries that offer the exact functionality you are looking for.
MTStatusBarOverlay
KGStatusBar
CWStatusBarNotification
FDStatusBarNotifierView
BWStatusBarOverlay
WTStatusBar
TWStatus
Try them out, test them and see which one is best for you.
If none of them are good enough, you should get an idea on how to achieve this functionality using the source code those libraries provide.
iOS 7 Human Interface Design, page 143 says:
Don’t create a custom status bar. Users depend on the consistency of
the system-provided status bar. Although you might hide the status bar
in your app, it’s not appropriate to create custom UI that takes its
place.
iOS Human Interface Guidelines
I am developing an iPhone app, and have come across an issue that leaves me completely perplexed.
In the app, there is a normal UIView, which consists of a UISegmentedControl. This UISegmentedControl is not once called or looked at in the code, in fact, there is no IBOutlet whatsoever, it lives only on the Storyboard.
Every time I load the app on my phone, my segmented control looks like this:
However, to my dismay, after a certain yet to be found out mixture of using the app, putting it in the background, and then using it again, the segmented control turns into this:
I know I don't have much more information to provide as of yet, but it seems hard to give any sort of code when there isn't any to do with the UI of the segment.
What I can say is that my "Use AutoLayout" is switched off.
I hope one of you can provide me more insight on how to fix this, thanks.
I am looking to implement a custom toolbar that sits above my keyboard for a text field with some custom values. I've found a ton of tutorials online but this question is for asking what's the best way to do this.
This tutorial here http://blog.carbonfive.com/2012/03/12/customizing-the-ios-keyboard/ provides the most common way I can see across many tutorials, with creating a new subclass of UIView and using delegates to get that information across.
That's the commonality. However, I came across this tutorial which in the view controller itself just creates the toolbar, assigns it to the textField inputAccessory and it's good to go. In fact, I tried out the code and without any effort, I have now a custom keyboard.
http://easyplace.wordpress.com/2013/03/29/adding-custom-buttons-to-ios-keyboard/
This just seems a bit too easy to me though and I'd think the proper, Apple recommended way would be to create that UIView subclass and use delegates so that the view controller with the text fields acts as that delegate.
I'm specifically targeting iOS 7 in my app.
What are people's thoughts on this? If the second easier link is supported and is likely to pass Apple's guidelines, it's a good starting point but if delegates are the way to go, I'd rather look into that from the start.
Your thoughts will be appreciated.
There is no 'Apple Approved' way to do this, and its hard to believe anything you do here would get your app rejected. The custom keyboard you reference in your post has the iOS6 look and will appear outdated in an iOS6 app. I'll mention some iOS7 suggestions shortly, but the constant danger of mimicking what the System looks like today is guaranteed to look outdated later. In Mac/Cocoa development, Apple use to say at the WWDC that if you did something custom, make it look custom, don't take a standard Apple widget and try to duplicate it. But that advice is mostly ignored.
For iOS 7, you can create buttons that appear just like the system ones do (not pressed), but of course when someone presses them, they won't act like system buttons (i.e. animate up and "balloon" out.
I'm currently using a fantastic add-on keyboard, my fork of KOKeyboard (which uses the buttons above). This is such a cool addition. While the buttons look like iPad buttons, each one has 5 keys in it. By dragging to a corner you select one of the four, and tapping in the middle gives you that key. This might be overkill for your app, but it really helped me with mine. It looks like this:
(the Key / Value is in the under laying view.) The center control lets you move the cursor - its like a joy stick - and can be used to both move and select text. Amazing class, I wish I'd invented it!
Also, for any solution, you want to use a UIToolbar as the view holding the keys, for the reason that it supports blur of the view it overlays, just like the keyboard does. You can use the UIToolbar with no bar button items in it (if you want), and just add subviews. This is a "trick" I learned here, as there is no other way to get blur!
David's KOKeyboard (er…, the one he used - see David's comment below) looks nice. I suspect that he is using the official Apple mechanism:
inputAccessoryView
Typically, you'd set that value on a UITextView, but it can be any class that allows itself to become the first responder.
The provided view will be placed above the default apple keyboard.
It is correct that there is no official mechanism (and it is suggested against) to modify any system provided keyboard. You can add to it, as above. You can also entirely replace it for with your own mechanism. Apply will forgo the keyboard setting on your view and use a custom input mechanism if you set
inputView
set it to any view - Apple will still manage its appearance and dismissal as it does the custom keyboards.
Edit: Of course, iOS 8.x added significant access to keyboards. (not mentioned here)
I want to design a page with tab bar on top of it.In some articles of this site.(i missed urls) i found that this is not a common way and the question gets some down rate.
The question is this: whethere having a design like this may cause that apple not approve the application on his store?
Even if it doesn't make Apple reject your app, think of the users not being used to the tab bar being at the top and how that is going to affect how well the app does in the Store.
Every platform has its own design patterns and there is a reason for that. If you stick to them there is a higher chance that the first-time users have an easier time using your app, which results in a higher chance that they keep using it. If they don't know how to use it or find it hard, they will move to another one.
Take a look at the Human Interface Guidelines and apply them. It will do good.
I'm wondering if there's any risk to see the app rejected from the AppStore (iPhone app) if I modify the existing UITabBar making it slightly taller. I'm working on a custom uitabbar with custom background pattern that is also just a little bit taller (8px) than the default one. It additionally has a raised central button.
I really don't see why this could reject the app but I thought I would better ask first since it's quite a lot of work implementing this custom design and I might have overlooked some of the HIG guidelines/rules.
Many thanks,
Tomas
There are tons of apps in the AppStore with custom tab bars, starting with some of the most popular ones like Instagram so you should be safe.
There are huge numbers of apps out there with custom tab bars, including non-standard sized ones and ones with protruding central buttons. They're fine, as long as they work correctly.