How to go back to RootViewController from presentView controller?

后端 未结 4 1804
南方客
南方客 2021-01-14 06:15

I am developing a iPhone Photos Gallery app and In my app I created one folder into gallery and that gallery folder is shown up into my app and while use click on Image its

4条回答
  •  梦毁少年i
    2021-01-14 06:47

    When you don't have any photos left and do the popToRoot, it continues executing this lines:

    alert.addAction(UIAlertAction(title: "Cancle", style: .Cancel, handler: {(alertAction)in
    //Do not delete Photo
    
    self.dismissViewControllerAnimated(true, completion: nil)
    }))
    self.presentViewController(alert, animated: true, completion: nil)
    

    Try commenting them to see if the problem is there, and if it is, uncomment for solving it.

提交回复
热议问题