iOS7 UIActionSheet 写 弹出界面冲突 问题的解决

最近,在做ios7 适配时,偶然发现,在用actionSheet选择后(图1),弹出(图2)界面时,弹出界面如果是用 addSubView的话,会与actionSheet的弹出冲突,结果会使我们的弹出界面一闪就消失了。

解决方法:

在- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex回调函数中,加上下面一句

[actionSheet dismissWithClickedButtonIndex:buttonIndex animated:NO];

原文地址:https://www.cnblogs.com/china-ldw/p/3532788.html