Custom Segue in Swift

前端 未结 4 600
感动是毒
感动是毒 2020-12-15 07:41
@objc(SEPushNoAnimationSegue)
class SEPushNoAnimationSegue: UIStoryboardSegue {
    override func perform () {
      self.sourceViewController.navigationController.p         


        
4条回答
  •  一整个雨季
    2020-12-15 08:01

    This works fine for me

    @objc(SEPushNoAnimationSegue) class SEPushNoAnimationSegue: UIStoryboardSegue {
    
    override func perform() {
        let sourceViewController = self.sourceViewController as UIViewController
        let destinationViewController = self.destinationViewController as UIViewController
    
        sourceViewController.presentViewController(destinationViewController, animated: true, completion: nil)
    }
    
    }
    

提交回复
热议问题