Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIViewControllerAnimatedTransitioning-为UIBezierPath圆角矩形设置动画_Ios_Animation_Uibezierpath - Fatal编程技术网

Ios UIViewControllerAnimatedTransitioning-为UIBezierPath圆角矩形设置动画

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],

我正在使用UIViewControllerAnimatedTransitioning协议制作动画。在转换过程中,我想使Viewcontroller的上角变圆。问题是,当我将以下代码放入动画块时,它不会设置动画

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
要正确设置动画,我需要做什么?我还希望今后的过渡是互动的