为什么这段代码不能完美地在iphone6上运行

时间:2016-02-26 09:25:25

标签: ios objective-c uiimageview cashapelayer

我想在UIImageView上确定底部圆形。这是我在iPhone5上完美运行的代码,但是当我在iPhone6上运行此代码时效果不佳......

UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.imageView.bounds byRoundingCorners:(UIRectCornerBottomLeft | UIRectCornerBottomRight) cornerRadii:CGSizeMake(150.0, 150.0)];


CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = self.imageView.bounds;
maskLayer.path  = maskPath.CGPath;
self.imageView.layer.mask = maskLayer;

0 个答案:

没有答案