Ios UIViewControllerAnimatedTransitioning-为UIBezierPath圆角矩形设置动画
我正在使用UIViewControllerAnimatedTransitioning协议制作动画。在转换过程中,我想使Viewcontroller的上角变圆。问题是,当我将以下代码放入动画块时,它不会设置动画Ios UIViewControllerAnimatedTransitioning-为UIBezierPath圆角矩形设置动画,ios,animation,uibezierpath,Ios,Animation,Uibezierpath,我正在使用UIViewControllerAnimatedTransitioning协议制作动画。在转换过程中,我想使Viewcontroller的上角变圆。问题是,当我将以下代码放入动画块时,它不会设置动画 let rect = CGRect(x: 0, y: 0, width: 320, height: 480) let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: [.topLeft, .topRight],
let rect = CGRect(x: 0, y: 0, width: 320, height: 480)
let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: [.topLeft, .topRight], cornerRadii: CGSize(width: 16, height: 16))
let mask = CAShapeLayer()
mask.path = path.cgPath
self.layer.mask = mask
要正确设置动画,我需要做什么?我还希望今后的过渡是互动的