Tutorial details

AlertView With Action Buttons | App Code for Sale | Preview

AlertView With Action Buttons | iOS Tutorial

How to display alert views

Overview PAGE TOP

Reference: http://www.geekylemon.com/WEBPROTECT-xcodetutorialalertact.htm

In this tutorial i will show you how to display alert views


  • 1 Round rect button

this is useful for showing information and helping the user be directed with a button all from an alert view

ViewController.h PAGE TOP

@interface ViewController :UIViewController {

ViewController.m PAGE TOP

@implementation ViewController
-(IBAction)alert {
UIAlertView *alert = [[UIAlertView alloc] 
initWithTitle:@"The Title"
message:@"The Message"
otherButtonTitles:@"Button1",@"Button2",@"Button3", nil];
    [alert show];
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (buttonIndex == 1) {
        [[UIApplication sharedApplication]
openURL:[NSURL URLWithString:@"http://www.geekylemon.com"]];
if (buttonIndex == 2) {
        [[UIApplication sharedApplication]
openURL:[NSURL URLWithString:@"http://www.youtube.com/geekylemon"]];
if (buttonIndex == 3) {
        [[UIApplication sharedApplication]

Reference PAGE TOP


0 Comments Leave a comment

Please login in order to leave a comment.

Newest first

to your Chupamobile Account.

The Easiest way to Launch your next App or Game.

Join Chupamobile and get instant access to thousands of ready made App and Game Templates.

Creating an account means you’re okay with Chupamobile’s Terms of Service and Privacy Policy.