performSegueWithIdentifier very slow when segue is modal

后端 未结 8 1768
天命终不由人
天命终不由人 2020-12-01 04:58

I have a simple table view where I handle the select action on the table view. This action follows a segue.

If the segue is a push segue, the next view

8条回答
  •  青春惊慌失措
    2020-12-01 05:28

    Hope help this yo can create programatically modal transition like this in Swift:

           let myStoryboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
            let modalViewController = myStoryboard.instantiateViewControllerWithIdentifier("myModalViewController") as! myModalViewController
            modalViewController.modalTransitionStyle = UIModalTransitionStyle.CoverVertical
            let navController = UINavigationController(rootViewController: accountManager)
            dispatch_async(dispatch_get_main_queue(),{
                self.presentViewController(navController, animated: true, completion: nil)
            })
    

提交回复
热议问题