似乎如果 CALayer、某些 UIViewController 的后代rotatingHeaderView
或rotatingFooterView
具有掩码,则掩码在自动旋转期间不起作用:
创建此形状的代码:
CAShapeLayer *mask = [CAShapeLayer layer];
mask.path = [UIBezierPath bezierPathWithOvalInRect:CGRectMake(0, 0, 30, 20)].CGPath;
CALayer *l = [CALayer layer];
l.backgroundColor = [UIColor redColor].CGColor;
l.mask = mask;
l.frame = CGRectMake(0, 0, 30, 20);
[self.layer addSublayer:l];
有没有办法解决或解决这个问题?