UIAlert View on CustomCell Button Click
I have a working customCell with tableView.I want to show a UIAlertView on button click.I have a method that responds to button click.How can i show the alert view with that method?
Method i am using is in the开发者_如何学Go
tavleView.m:
-(void) btnAction:(id) sender
{
NSLog(@"i am here");
}
and the Cell event response as :
[cell.ansBtn1 addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
Can anyone tell me how can i show the alertView?
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"your message title" message:@"some message" delegate:@"self/you may give the instance of other class" cancelButtonTitle:@"ok" otherButtonTitles:nil];
[alert show];
[alert relase];
精彩评论