Ios 视图控制器之间的LAGY自定义转换
因此,我想自定义Viewcontroller演示文稿,因为使用我的代码,Ios 视图控制器之间的LAGY自定义转换,ios,swift,Ios,Swift,因此,我想自定义Viewcontroller演示文稿,因为使用我的代码,Viewcontroller会冻结半秒钟,然后显示另一个Viewcontroller extension UIViewController { func presentDetail (_ viewControllerToPresent : UIViewController) { let transition = CATransition() transition.duration = 0.3 tra
Viewcontroller
会冻结半秒钟,然后显示另一个Viewcontroller
extension UIViewController {
func presentDetail (_ viewControllerToPresent : UIViewController) {
let transition = CATransition()
transition.duration = 0.3
transition.type = .push
transition.subtype = .fromLeft
self.view.window?.layer.add(transition, forKey: kCATransition)
present(viewControllerToPresent, animated: false, completion: nil)
}
}
对于自定义演示,您需要在presentedView上提供TransitionLegate,然后提供所需的animator对象
最低可能的实现似乎是在
func presentationController中提供一个UIPresentationController(用于呈现:UIViewController,呈现:UIViewController?,来源:UIViewController)->UIPresentationController?
对于自定义演示,您需要在presentedView上提供TransitionLegate,然后提供所需的animator对象
最低可能的实现似乎是在
func presentationController中提供UIPresentationController(用于呈现:UIViewController,呈现:UIViewController?,来源:UIViewController)->UIPresentationController?
这不是实现自定义viewcontroller转换的实际方法。随机教程指出,这不是实现自定义viewcontroller转换的实际方法。随机教程是