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