最近,在作ios7 适配时,偶然发现,在用actionSheet选择后(图1),弹出(图2)界面时,弹出界面若是是用 addSubView的话,会与actionSheet的弹出冲突,结果会使咱们的弹出界面一闪就消失了。ios
解决方法:函数
在- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex回调函数中,加上下面一句spa
[actionSheet dismissWithClickedButtonIndex:buttonIndex animated:NO];blog