是有一种方法,使一可定制UIModalTranstitionStyle在函数容易,使得该函数可以呈现当它们被定制并用于多个viewControllers重用定制UIModalTransitionStyle夫特4
实施例:
func customTransition() -> UIModalTransitionStyle {
//other things here to customize transition
}
其刚标准.crossdissolve,.fliphorizontal和所有这些都不是我需要的,所以我只是想知道你是否可以,因为我用UIView做到了这一点
func popIn(yourView : UIView) {
yourView.transform = CGAffineTransform(scaleX: 0.01, y: 0.01)
UIView.animateKeyframes(withDuration: 0.2, delay: 0.0, options: UIViewKeyframeAnimationOptions.calculationModeDiscrete, animations: {
yourView.transform = .identity
}, completion: nil)
self.view.addSubview(yourView)
}
问题,哈哈编辑它(没有意思这样的声音) –