iOS

来源:互联网 发布:手机淘宝不能追加评论 编辑:程序博客网 时间:2024/06/04 18:52

Warning: Attempt to present < LXFPhotoHelper: 0x1049b5e00 > on < UIApplicationRotationFollowingController: 0x101bd4fc0 > which is already presenting < UIAlertController: 0x101e63100 >

问题

提示我们在弹出LXFPhotoHelper之前已经弹出UIAlertController这个控制器了,那我们就让弹出的操作放到UIAlertController消失之后即可。

解决方法

将方法

- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex;

替换为

- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex;

即可解决

// UIActionSheet的替换对应这个- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;- (void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex;
0 0