The iOS Human Interface Guide says that on an iPad "Do not include a Cancel button when the action sheet is displayed without animation, because people can tap outside the popover to dismiss the action sheet without selecting one of the other alternatives". As a result, the Cancel button is not shown in these cases.
This is NOT intuitive. People are used to seeing a Cancel option whenever an action that can be cancelled is shown, and they may get confused if they don't see one. They may not realize that tapping outside the popver means Cancel.
The reasoning of "clicking outside the window to cancel" could have been used for PCs and Macs as well, but it isn't. A Cancel button is displayed in these systems.
I'm inclined to include an artificial Cancel button, but I'm afraid that this is against Apple HIG policy and my App will be rejected.
What do you think?
As someone who just encountered the same issue, I agree. It's not intuitive whatsoever!
As for Apple's recommendations
"Do not include a Cancel button when the action sheet is displayed without animation, because people can tap outside the popover to dismiss the action sheet without selecting one of the other alternatives." (p121)
"An animated action sheet should include a Cancel button, because people need to be able to dismiss the action sheet without closing the popover" (p121)
Will Apple reject your app if you don't follow these guidelines? This answer may offer some insight:
Will Apple reject my app if I do not do this?
Related
I have a few questions i could not find an answer to.
Can we find out if user tapped cancel/submit?
Can we know if user already give review? (To not show him modal again)
If user give a review and method to show review modal is called will it appear?
No
Apple handles that
No
You can read more about it here.
I include a link to a similar answer I posted that helps provide some insight into how the view is presented if you'd like to see the technical side.
SKStoreReviewController buttons hidden under keyboard
This answer goes into detail about the presentation of the view as well which may be of interest (how often it is shown, when it is not shown, etc)
Why the SKStoreReviewController does not let me submit a review?
Here's an idea. Not tested, but feel free if you have any other ones.
When you decide to run: SKStoreReviewController.requestReview() so the user is prompted with the native "Rate in the app store",
Set and control a timer.
Then in the appdelegate/applicationWillEnterForeground control this timer:
- If the user selected "submit", the app will probably go to background within the next 5 to 10 seconds. So if the app hit this method and the elapsed time is less than (i.e) 10 seconds, than (probably) means that the user went to the Apple Store.
- Meanwhile, if the timer hits 30 seconds, stop the timer and save your guess: The user didn't submit the review.
Also, many apps present a custom popup asking the user if they like the app and if so then they present the native SKStoreReviewController.requestReview()
I am presenting SKStoreReviewController.requestReview() and I want to have a boolean in UserDefaults which I would make true in case the user taps on Cancel.
Is there a way to determine if cancel was tapped considering this is a OS alert?
There isn’t a way to access which button was selected. I’m curious why you would you need this functionality? The OS will decide if the user should be shown the alert depending on a few factors including when the user last left a review or canceled.
Apple Developer Site:
https://developer.apple.com/documentation/storekit/skstorereviewcontroller/2851536-requestreview
Although you should call this method when it makes sense in the user
experience flow of your app, the actual display of a rating/review
request view is governed by App Store policy. Because this method may
or may not present an alert, it's not appropriate to call it in
response to a button tap or other user action.
I added an Alert view, asking for user input, at the start of my app. The app works fine without the Alert view. But with the code for the Alert view added, part of the UI is blacked out after hitting the 'ok' button on the alert.
I'm not well versed in ios, but is there a good way to delay the app from running until the Alert (text input) is completed (ok button pressed). This might avoid whatever is causing the screen to go black in one section. Apparently the app is executing while the alert is active, and the alert is affecting the UI. Basically, I am asking the user to input their phone number via an alert that will be used later in the app.
When alert view is shown on screen, getting back ground dimmed (reduced alpha) is a normal thing and is practiced by iOS.
However, if you feel some part of the code you want to run only on tap on OK button on alert, move that method call to OK button action handler.
I want to do some action in my app when the user presses the power button two times while my app is already in background/closed. How can I trigger the action of power button for it inside my app? or if I can add any observer in my app for such action? Is it possible to get this functionality in iOS?
Thanks for help
It is not possible to observe exactly on touching any button on the device. It is the same with volume buttons, you can observe the effect (volume went up or down) but not the pushing button in fact (the volume changed could be triggered in other way).
Sum up:
This is not possible, do not go for it.
My app must sometimes show an UIAlertView when the Home button or the locking button is pushed or when the notification center is shown.
I show the Alert from the applicationWillResignActive delegate's method and everything is ok when home button is pushed or when notificacion center is shown. But there is a problem if the button which is pushed is the locking button (on/off button).
In that case, the Alert is not shown when I return to the app (if I used the Home button it is there). I don't do anything else in other AppDelegate methods which are executed. Also, then, when I show a new Alert (any Alert in the app) the Alert which hasn't been shown when I returned is shown after I dismiss the new one.
Please, could anybody help me?
Thanks in advance.
THE EASY, GIVE ME REP ANSWER:
When the app is put into the background, the app is suspended. Part of this process is closing open alert views.
THE I ACTUALLY KNOW WHAT I'M TALKING ABOUT ANSWER:
The logic behind this is that when the user hits the home button when an alert is displayed, they might be going to look for information on how to answer the alert. However, when the sleep button is pressed, the user has stopped using the device altogether. Apple knows that if they unlock thier device again 3 hours later and see something like Confirm Deletion, they will have absolutely no idea what they were just doing and what to do now.
This is known to cause a serious condition known as what-in-the-world-am-I-supposed-to-do-now-itis. Symptoms of this condition include hitting the round button at the bottom of the screen and subsequently holding on your app icon until it jiggles. They then hit the little 'x' button. This is not good for developer's pockets.