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

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

解决方法:

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

[actionSheet dismissWithClickedButtonIndex:buttonIndex animated:NO];

posted @ 2014-01-24 18:12  天下.无贼  阅读(471)  评论(0编辑  收藏  举报