1:先遵守UIAlertViewDelegate
2:- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex==0) {
NSLog(@"你点击了取消");
}else
if (buttonIndex==1){
[self.myOverButton
setTitle:@"已结束"
forState:UIControlStateNormal];
NSLog(@"你点击了确定");
}
}
时间: 2024-10-09 01:52:56