【问题标题】:Transition not occurring properly in iOS swift?转换在 iOS swift 中没有正确发生?
【发布时间】:2017-12-15 02:31:42
【问题描述】:

函数重写

func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) { } 

当我在 iPad 设备上构建和运行时不会触发,但它在移动设备(iphone 5、6、7...)中运行良好。这个怎么解决??

提前致谢!!

【问题讨论】:

标签: ios swift uideviceorientation


【解决方案1】:

这个函数没有被调用,因为 iPad 有任何旋转的常规特征。更喜欢使用func viewWillTransition(to: CGSize, with: UIViewControllerTransitionCoordinator)

【讨论】:

    猜你喜欢
    • 2011-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-05-06
    • 1970-01-01
    • 1970-01-01
    • 2012-11-12
    相关资源
    最近更新 更多