I would need 3 button on a push notification alert. "YES", "NO", "REMIND LATER". Presently, I Only found only Two button VIEW & CANCEL, Where we can customize the Names of those buttons, But what about the 3rd one? Can't we have it? Can't we have another button on the push alert?
Is apple is restricting OS to do that? Then Why?
According to the APNS documentation, the only choice you have is between one and two buttons :
action-loc-key
string or null
If a string is specified, the system displays an alert with two
buttons, whose behavior is described in Table 3-1. The string is used
as a key to get a localized string in the current localization to use
for the right button’s title instead of “View”. If the value is null,
the system displays an alert with a single OK button that simply
dismisses the alert when tapped. See “Localized Formatted Strings” for
more information.
Apple seem to have strong views regarding how UIs should look like, and they don't give developers much flexibility.
Related
Good Afternoon/Evening/Morning Folks,
I recently encountered a discussion with another developer on dismissing a UIPickerView. We work on a legacy enterprise application that had a lot of issues and was written very poorly (among other things). Since then, we revamped and fixed a lot of bugs with this program, strictly adhering to Apple's Human Interface Guidelines as much as possible while keeping to original requirements.
We seem to have a difference in opinion as Human Interface Guidelines do not really go into any detail about picker views. We implemented our new UIPickerView with a "Done," Button to confirm a selected value to be placed in a UITextField. Screen's input would be locked until they selected a value or clicked done.
Legacy application prior to our changes allowed users to utilize a done button but also by way of tapping a value selected in a picker. In addition, legacy application would also show selected UIPickerView value in UITextField prior to selection, wiping out original contents , if any was selected prior to opening a UIPickerView.
So, What is correct way to implement a UIPickerView per common practice or Strict Apple Documentation (if any exists). What is common practice?
Sorry, I cannot post any screen shots or code snippets due to business process reasons. I will do my best to explain if any questions arise.
Thanks,
We can figure this out through apps designed by Apple. Here are two examples
1. Contacts
Find a contact person in the Contacts app and set birthday. The picker shows up. While you are dragging the pickers, it does not set value to the text field. It happens only when you release the wheel. There is no Done button to hide the picker it self. To dismiss it, you can either click on the done button on navigation bar to end editing for the whole page, or click on another text field which pops a different keyboard.
2.Setting - Date&Time
Basically the same as Contacts app. Here you cannot even dismiss the picker.
I have experience in Android and currently started to learn iOS. I created a mechanism to Pick data in an Android App. When I click on Date button, a DatePicker pops up:
As you see It has Cancel and Set button.
My question is about my iphone App. I want to have the same mechanism. When I click on the button, Date picker pops up (that can have Set and cancel button like Android Date picker). How can I do that? I'm not sure that it is a good way in iPhone, Can you help me if we can design a better mechanism?
Here's a UX comparison between Android and iOS standard widgets, with links to the documentation on the relevant Apple / Android websites. It's a nice way to get started learning all the technical terms.
http://kintek.com.au/blog/portkit-ux-metaphor-equivalents-for-ios-6-and-android-4/
Hopefully that gets you started.
Apple has a sample project that demonstrates this. You'll have to adapt it slightly: instead of showing/hiding the date picker itself, you'll want to show/hide a view containing a date picker and a dismissal button.
It's called DateCell.
Basically, it treats the date picker as if it were the keyboard for a cell containing the date. You'll need to manage hiding it when the user enters a text field (and thus, needs the real keyboard) and scrolling to keep the date row in view, but all the bits you need are in this project one way or the other.
One way to do it would be add a custom buttons to the same view containing date picker and then pop it up when the users wants. Instead of using the date picker delegate use the buttons action to get the date picker value.
I know this has been asked before. However...
While until recently I thought that the only possible and accepted Alert is the text with 2 buttons I found some apps which have a different local alert.
So I assume there is an accepted way to customize the lokal Alert. Is this correct or have these apps just "slipped" into the store somehow - as I know this happened before with feature and then the app disappeared from the store suddenly.
I could not find anything about it.
Many thanks
As of iOS 5:
When a UILocalNotification is delivered while the device is locked, it appears on the lockscreen with a swipe slider to open the app.
If the notification is delivered while the device is in use, it can appear either as a banner across the top of the screen, or as an alert with two buttons.
One button is always a cancel button.
The other button opens the application. You can change the text of this button by setting the alertAction property.
You can disable this action button on the alert by setting hasAction = NO on the notification).
There are no other available ways a notification alert can arrive, unless of course the device is jailbroken. In that case, many things are possible.
Before iOS 5, only popup alert notifications were supported.
Due to the nature of iOS, it is technically not possible to deliver a notification in any other way, or customise the alert, as the notification delivery is handled by the system and the app has no access to the system UI, and so cannot display any messages by itself. And even if you did somehow manage that, Apple wouldn't allow it.
Read the UILocalNotification docs here: http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Reference/UILocalNotification_Class/Reference/Reference.html for more detailed information.
I am writing an iPhone application. In one of my views the user will have to enter Canadian zip codes which alternate letters and numbers (e.g. V0E 5N0). I would like to have the default keyboard showing up, but additionally, I want to allow the user to be able to enter numbers without having to switch keyboards back and forth by pressing the ".?123" key, which makes the process tedious for this type of entry. Will my app violate apple guidelines if I add into my view 10 buttons with the digits to show right above the keyboard?
There are plenty of Apps that already exist on the App store with such functionality, so I don't see why your App would get rejected specifically for having a view above the keyboard. It may still get declined because of other things, but not a custom keyboard view.
Nebulous Notes - Approved and on the App store:
iSSH also has a custom keyboard with toolbar on iphone and ipad and is on the App store.
Normally incase of a zip code entry , users are provided with a UINumberKeyPad and it makes it easy for them (But in your case it would not help you). In your case, if you wish to add another UIToolbar right on top of the inputView, I would say go for it, but it is not the best practice !
This will not violate the apple guidelines, and you can implement in your view with a UIToolbar as an inputAccessoryView. Make sure to remove the Toolbar from the superView during the keyboard event resignFirstResponder.
After the right '+' button is pressed the item in that view is added to favorites and an UIAlertView is shown on screen saying "Added to Favorites". After it is added to favorites I make the '+' button disappear so the same item doesn't get added again to favorites. I am not sure if this ok with Apple's Human Interface Guidelines instead should the '+' remain there and if pressed again say "This item is already in favorites"?
Any help will be appreciated! Thanks
I wouldn't use the AlertView for this. By showing the alert, you force the user to confirm reading some confirmation message and taking action (by pressing the OK button). It is a good idea to provide feedback that the favorite was successfully added, but this should not be an intrusive alert. Perhaps you can use other design patterns for favorites, such as a star that lights up when pressed to indicate that the item is listed as a favorite, or perhaps an animation effect that 'moves' the selected item to a visible 'favorites' category.
The Human Interface Guidelines have this to say about the Alert view (in relation to your question):
Avoid creating unnecessary alerts.
These alerts are usually unnecessary
if they:
Merely increase the visibility of some
information, especially information
that is related to the standard
functioning of your application.
Instead, you should design an
eye-catching way to display the
information that harmonizes with your
app’s style.
Why not have two states for the button ? A "selected" state (for example negative contrast) showing the item is in favorites, and a "normal" state indicating it can be taped.
This way you can add/remove from favorite using the same button, and in a less obstructive way than with a UIAlertView.
I also suggest you use a ★ instead of a +