美文网首页
自定义转场动画UIStoryboardSegue

自定义转场动画UIStoryboardSegue

作者: lotawei | 来源:发表于2018-03-09 11:54 被阅读34次

    
    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

      本文链接:https://www.haomeiwen.com/subject/rmepfftx.html