首页 > 其他 > 详细

UIAlertView点击按钮不会销毁自身View

时间:2015-04-15 11:22:23      阅读:221      评论:0      收藏:0      [点我收藏+]
子类化UIAlertView,复写方法

- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated;


/// UIAlertView subclass which can't be dismissed when buttons clicked.
@interface FixAlertView : UIAlertView

@end

@implementation FixAlertView

- (void)dismissWithClickedButtonIndex:(NSInteger)buttonIndex animated:(BOOL)animated {
    
//    [super dismissWithClickedButtonIndex:buttonIndex animated:animated];
    return;
}

@end

复写方法的时候,记得不要调用父类的方法。

参考自:http://stackoverflow.com/questions/2051402/is-it-possible-to-not-dismiss-a-uialertview/2051969#2051969

UIAlertView点击按钮不会销毁自身View

原文:http://blog.csdn.net/tounaobun/article/details/45055719

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!