IOS AlertView

Published on Author bloggerten

-(IBAction)click:(id)sender
{
alert1=[[UIAlertView alloc]initWithTitle:@”clicl alert view button” message:@”go to next page” delegate:self cancelButtonTitle:@”cancel” otherButtonTitles:@”ok”, nil];
[alert1 show];
}

– (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
{
if(buttonIndex==1)
{
NSLog(@”okbutton”);
}
else if (buttonIndex==0)
{
NSLog(@”cancelbutton”);
}
}

Comments

comments

Categories IOS