iPhone开发 uialertview 确定与取消
//按钮事件
-(IBAction)btnRead
{
UIAlertView* a=[[UIAlertViewalloc]init];
a=[[UIAlertViewalloc] initWithTitle:@"b"message:@"s"delegate:selfcancelButtonTitle:@"确定"otherButtonTitles: @"取消",nil];
[a show];
}
//定义的委托,buttonindex就是按下的按钮的index值
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
NSLog(@"%i",buttonIndex);
}
摘自 凡娃软件
补充:移动开发 , IOS ,