Perform push segue after an unwind segue

前端 未结 7 2370
失恋的感觉
失恋的感觉 2020-12-05 02:24

I am working on a camera app where the camera views are shown modally. After I am done with cropping. I perform an unwind segue to the MainPageViewController. (

7条回答
  •  鱼传尺愫
    2020-12-05 02:50

    I'm guessing the performSegue is not firing because the unwind segue has not yet finished. The only thing I can think of at the moment, is to delay calling the performSegue using dispatch_after. This seems very "hacky" to me though.

    @IBAction func unwindToMainMenu(segue: UIStoryboardSegue) {
        dispatch_after(1, dispatch_get_main_queue()) { () -> Void in
            self.performSegueWithIdentifier("Categories", sender: self)
        }
    }
    

提交回复
热议问题