how to implement a pop up dialog box in iOS
-
After a calculation, I want to display a pop up or alert box conveying a message to the user. Does anyone know where I can find more information about this? Thanks
-
Answer:
Yup, a UIAlertView is probably what you're looking for. Here's an example: UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No network connection" message:@"You must be connected to the internet to use this app." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alert show]; [alert release]; If you want to do something more fancy, say display a custom UI in your UIAlertView, you can subclass UIAlertView and put in custom UI components in the init method. If you want to respond to a button press after a UIAlertView appears, you can set the delegate above and implement the - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex method. You might also want to look at the UIActionSheet. Hope this helps!
Namratha at Stack Overflow Visit the source
Other answers
Namratha
Related Q & A:
- How to implement a relative timer in a game?Best solution by Stack Overflow
- How to implement a physics engine?Best solution by Game Development
- How to implement a voting system?Best solution by Stack Overflow
- How can i see my messages in the dialog box?Best solution by Yahoo! Answers
- How to become a pop singer?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.