Can we show the system generated alert, like permission request and in app purchase popups as shown here into customise view?
If yes Please explain How can we achieve it?
Related
I like to do a tutorial that ask user have to press the 'Always Allow' button in the Location Permission request.
In my opinion, use a ViewController and add a UIAlertController as a subView in it, and then add another CAShapeLayer to create a white rectangle to highlight the 'Always Allow' UIAlertAction.
My problem is that I can't locate the 'Always Allow' UIAlertAction.
I need the CGPoint of this UIAlertAction. How to get it?
Update:This is not a real permission alert, I think many people misunderstanding it. In iOS, when a permission alert popup, user sometimes choose any one without reading the message on it. Because our hardware product needs location update in background, we hope user have to choose 'Always' location option, this is why do that. We want to do a guide to teach people that a alert page will display at next step and please choose the correct one. After pressing the upper right corner button, the real permission will popup. I think it's a good way to guide user.
The Right Way To Ask Users For iOS Permissions
Any suggestions for it? Thanks.
The "Allow to use location" alert is provided by the system which displays the UI in another process.
This is bad UX.
Apple will reject your app for doing this.
Is it possible to present a custom dialog and not present the default dialog "(AppName) Would Like to Send You Notifications" (seen below)? So when the user presses the custom dialog button "Enable Notifications" it allows notifications w/o presenting the default dialog? I dont want to present the user two dialogs.
No this is not possible, the dialog is coming from iOS and not your app.
And there is a good reason for it, security. The dialog is present by the system not you app. This is done so you can hack it so the user always accepts.
In one of my app I'm using Location Services. I'm throwing a normal alert view whenever the location services are off like "Enable Your Location Services" with "OK" button when I open my app. But I don't want this. Rather I need to show the alert view as "Turn on Location Services to Allow Your_App_Name to Determine Your Location" with "Settings" and "Cancel" button as shown in the image. Give me the suggestions with a sample code, Thanks.
You should just pop up an UIAlertView telling the user that needs to enable Location Services.
If you want to be more precise, you can always create a new View explaining the user how to enable location Services using graphical content, that makes it so much easier for the user.
You cannot open the Settings page from your app, and if you could, your app would be rejected on the app store.
Please, advise how I can create alert dialog, similar to Starbucks, shown in the image, when add to Apple Passbook.
I've tried to use PKAddPassesViewController, but failed, as it wasn't clear how to get alert dialog.
This looks like they are presenting a standard UIAlert before presenting the user with a PKAddPassesViewController.
It is not possible to directly replace the Add/Cancel buttons of the PKAddPassesViewController with an alert.
How can I know the alert style of my App, as set in the app's notification settings? That is, whether the alert style is "none" or "banners" or "alerts"? I guess there should be a property to know about it in notification center. But I did not find any.
I want to adjust the number of notifications that I post based on the style -- I believe that too many alerts will interrupt the user.
Thats not possible. If you want to access this information, file a bug report about it.