Problems dismissing and representing UIImagePickerController camera iOS8.4

前端 未结 2 961
太阳男子
太阳男子 2020-12-18 15:19

EDIT Problem reinstated from scratch.

I have a ViewController A which has a Navigation Bar Button which presents an

相关标签:
2条回答
  • 2020-12-18 16:01

    I believe this will work for you. Do!

     [self.presentingViewController dismissViewControllerAnimated:NO completion:^{
                   [RefrenceOfPreviousViewController dismissViewControllerAnimated:YES completion:^{
    
                   }];
               }];
    

    Instead of

     [self.presentingViewController.presentingViewController dismissViewControllerAnimated:NO completion:nil];
    
    0 讨论(0)
  • 2020-12-18 16:03

    there are some possible cases that cause your problem :

    1. presenting B after A and then presenting C is a bit strange behaviour for both UX/UI and by code. Either push B from A and then present C over B OR dismiss A, present B, dismiss B, present C.

    2. there are completion methods and you are not using them. your code show that you call dismissViewControllerAnimated twice for C and B for ex. you should handle presenting and dismissing order. I think iOS 8.2+ or 8.3+ start to handle them more efficiently. And if there is an error, it will crash after this version.

    3. imagepicker controller cause this error while dismissing VCs in different ways. For ex. showing alert popup before presenting a VC can cause also a crash.

    0 讨论(0)
提交回复
热议问题