iOS - 解决Warning: Attempt to present <> which is already presenting <>
2017-04-24 14:46
3207 查看
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;
相关文章推荐
- iOS - 解决Warning: Attempt to present <UIImagePickerController: 0x7f9ba106a000>which is already presen
- Warning: Attempt to present <...> on <…> which is already presenting null
- iOS - 报错 Warning: Attempt to present <xx: xx> on <xx: xx> whose view is not in the window hierarchy!
- 项目中遇到的问题(一)弹出UIAlertController 时出现 Warning: Attempt to present * on * which is already presenting
- iOS: Warning: Attempt to present <ModalViewController> on <ViewController>while a presentation is in
- iOS开发之bug:ios Warning: Attempt to present <a viewController: 0x10d0611b0> on <UITabBarController: 0
- Warning: Attempt to present UINavigationController on NavigationController which is already presenti
- Warning: Attempt to present UINavigationController on NavigationController which is already presenti
- Warning: Attempt to present <NextViewController: 0x10966fed0> on
- 处理iOS报错: Warning “attempt to present ViewController whose view is not in the window hierarchy”
- IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x15bd67f0> while a prese
- iOS 简单的实现手机号正误的判断(Warning: Attempt to present... whose view is not in the window hierarchy!
- 使用AlertController出现:Warning: Attempt to present <UIAlertController: 0x7a961600>
- Warning: Attempt to present <UIImagePickerController: 0x292b400> on xxx which is already presenti
- IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x13f6840e0>
- IOS:Warning: Attempt to dismiss from view controller <xxxxxxxxxController: 0x15bd67f0> while a prese
- Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!
- Attempt to present <UIImagePickerController: 0x1848de00> on <UINavigationController: 0x17e6ed50> wh
- maven项目出现web.xml is missing and <failOnMissingWebXml> is set to true错误的解决办法
- vim中Mapping already in use: "<LocalLeader>is", mode "n"错误解决的方法解释