xcode - iOS Warning: Attempt to dismiss from view controller while a presentation or dismiss is in progress -


I made a UIImageView and when you click on it, a UIActionSheet pop-ups.

  @Iboutlet weak var avatar image view: UIImageView! @IBAction function tapUIImageViewHandler (this: UITapGestureRecognizer) {var popMenu: UIActionSheet = UIActionSheet (title: "Upload the user menu", the representative himself, CancelButtonTitle: "Cancel", DestructiveButtonTitle: zero, OtherButtonTitles: Choose from the "library", " take picture ") popMenu.showInView (self.view)} function actionSheet (popMenu: UIActionSheet!, clickedButtonAtIndex buttonIndex: Int) {Click println (" index \ (buttonIndex): takePhoto () case 1: ") buttonIndex list {Case 2 selectFromLib () Default: Break}}  

But when I run on the simulator, after I click on the button on UIActionSheet Lick, I

Warning: attempt to dismiss the view controller when a presentation or dismiss progress!

Can anyone help me with that? Thanks!

In my opinion, this is a bug (you should file a bug report. In the following cases (Swift XCode Beta 4 -> Warning

  • ObjC XCode Beta 4 - Tested in the following cases (only one button and one action with ActionSheet, opening a delegate):

    • Swift XCode Beta 4 - > Warning
    • ObjC Xcode 5.1.1 -> OK

    I remember you though that with the iOS8 ActionSheet UIAlertController 8 ..

  • Code> UIAlertControllerStyle ActionSheet The following is also true that we, especially since we set all should probably still continue to use ActionSheet target for version & lt>

    Comments

    Popular posts from this blog

    sqlite3 - UPDATE a table from the SELECT of another one -

    c# - Showing a SelectedItem's Property -

    javascript - Render HTML after each iteration in loop -