自定义转场动画UIStoryboardSegue


    
    override func perform() {
        
        let  svc = self.source
        let  dvc = self.destination
        UIView.animate(withDuration: 0.5, animations: {
            
            svc.view.frame.origin.x = ScreenWidth
            dvc.view.frame.origin.x = ScreenWidth
        
            dvc.view.frame.origin.x = 0
            
            
        }) { (finish) in
            
                svc.navigationController?.present(dvc, animated: false, completion: nil)
        }
        
        
        
    
    }
    
}

你可能感兴趣的:(自定义转场动画UIStoryboardSegue)