Tutorial details

Auto Appearing Alert | App Code for Sale | Preview

Auto Appearing Alert | iOS Tutorial

How to create an auto appearing alert

Overview PAGE TOP

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

In this tutorial i will be showing you how to create an auto appearing alert

Features:

  • 1 alert view

In this tutorial i will be showing you how to auto appear an alert when the app start and when the view loads this is helpful for when you want to give some quick instruction to the user before the engage in your application

What To Do! PAGE TOP

There is two different ways Showing the alert once when the application starts use

-(void)awakwFromNib

to load alert every time you enter a view use

-(void)viewdidload

ViewController.m PAGE TOP

@implementation ViewController
 -(void)awakeFromNib
{
    [super viewDidLoad];
    UIAlertView *alert = [[UIAlertView alloc]
                          initWithTitle:@"Title"
                          message:@"This is the message"
                          delegate:nil
                          cancelButtonTitle:@"Dismiss"
                          otherButtonTitles:nil];
    [alert show];
    [alert release];
} 
- (void)viewDidLoad
{
    [super viewDidLoad];
    UIAlertView *alert = [[UIAlertView alloc]
                          initWithTitle:@"Title"
                          message:@"This is the message"
                          delegate:nil
                          cancelButtonTitle:@"Dismiss"
                          otherButtonTitles:nil];
    [alert show];
    [alert release];
} 
@end

Reference PAGE TOP

http://www.geekylemon.com/WEBPROTECT-xcodetutorialautoalert.htm

0 Comments Leave a comment

Please login in order to leave a comment.

Newest first
!

Sign-in 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.