Custom Segue in Swift

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


        
4条回答
  •  孤街浪徒
    2020-12-15 08:12

    Swift 3.0:

    import UIKit
    
    class CustomNoAnimationSegue: UIStoryboardSegue {
    
        override func perform() {
            if let navigation = source.navigationController {
                navigation.pushViewController(destination, animated: false)
            }
        }
    }
    

提交回复
热议问题