fanwa

//按钮事件

-(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);

}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
猜你喜欢
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2021-12-07
  • 2022-12-23
  • 2021-05-11
相关资源
相似解决方案