my app is almost finished and since is for airline pilots I would like to add a disclamer (like an alert view...but more like a scroll view) that pop up as soon as they start the app and if they don't press ok I want to exit from the app. Any advice would be really appreciated.
thanks
Just use a UIAlertView — if you put a lot of text in it, it automatically scrolls.
If the user presses the "No" button, you need to just disable the app rather than exit — apps aren't allowed to exit unless the user presses the home button. You could pop up a modal view controller (with no way of dismissing it) with a message saying that the app cannot be used until the disclaimer is read and accepted.
Related
I just want to show an alert when user just quit the application before application entering the background, how can I do that??
If I show the alert in applicationDidEnterBackground:(UIApplication *)application method then this alert will be shown when we again resume the application, but I need to show the alert before the application enters the background.
You can't do this, and rightly so. When the user presses the home button, they go to the home screen. This is a fundamental part of the iOS user experience. Nothing stops the home button working.
applicationWillResignActive and applicationWillTerminate may be of interest to this general question—but you can't present anything into the UI once the home button is pressed. These methods do let you briefly run any critical code however, while the home screen is being presented to the user.
I know how to open a tel:// URL so that I can launch a call on an iPhone, but I'm wondering if there's a way to just have the phone app launch and wait for the user to press the call button.
Is this possible?
what i do is present a UIAlertView asking for confirmation ... if the user presses Call then i go ahead with the request... If he presses Cancel the app does nothing other than removing the alert view from screen ...
I put an in app purchase into my app, and when the user taps a button, the purchase is started. So basically, they tap the button, and then depending on the speed on their Internet connection, they could be waiting for up to ten seconds until a new alert view comes up asking if they would like to buy the product. The user will probably tap the button multiple times since nothing came up, and then multiple purchase alert views will come up. Additionally, this could maybe be seen by the user as an app bug. In the end, this is a problem.
I want an alert view to come up with a spinning wheel that says "Loading..." when the users taps the buy button. Now my problem is, how do I get that to dismiss when the new alert view comes up asking the user if they want to buy the product?
if ([UIAlertView alloc] that says: #"whatever Apple's alert view says")
{
//dismiss the "Loading..." alert view here
}
I doubt that would work, so any input is appreciated. Thanks!
You need to have access to that alertview. You can do this. Create a alertview instance var in app delegate and when you want to show loading initialize that instance var assign to your property and when you want to dismiss just call
[alertViewinstance dismissWithClickedButtonAtIndex:0];
Write this piece of code in a method in appDelegate. Hope you get the idea. If not let me know I'll post the sample code here.
can any one tell me the name of alert view that should do the works of C# show dialog .
other actions will not work without dismissing it(EVEN DELEGATES ALSO).
Modal dialogs in Windows (in any language) and in iOS are fundamentally different.
On Windows, a modal dialog (and in particular the ShowDialog method) behaves like a function call that will only return when the dialog is closed. Your app will naturally wait until the your has made his decision.
On iOS, presentModalViewController (or [UIAlertView show]) almost immediately return. You can registered a delegate that will be notified when the dialog is closed. But if your app is supposed to wait only the user has chosen something in the dialog, then you have to implement the waiting yourself.
As far as know, You have to do this manually. You can lock your task when the alert is shown and then unlock it again when it is dismissed getting help from these posts.
is there a way to pause an NSTHread indefinitely and have it resumed from another thread?
How to pause an NSThread until notified?
I'm working on a cocos2d game and im using a uialertview for the pause screen, for some reason when i exit out using the home button and then re enter the app the uialertview is dismissed everyother time i exit and relaunch. the uialertview is shown everytime the user exits or a call comes in. the other thing that is weird is that when the alert view is dismissed the darkness around the edges is not present.
any idea how or why this would be dismissed without the user clicking anything.
Not sure if this helps but the game itself does not resume when the alert is dismissed, however your touch events are being recieved by cocos2d becuase when you resume the game you can see the stuff you did while it was paused now shown after a real resume. I know this is vague but I though if anyone might have had this issue before they may know what I'm talking about.
thanks,
Nick
it's a bug
there are some workarounds here
UIAlertViewDelegate method didDismissWithButtonIndex gets called while the phone is sleeping/locked