You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Create the path
UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:rect
byRoundingCorners:corners
cornerRadii:CGSizeMake(radius, radius)];
// Create the shape layer and set its path
CAShapeLayer *maskLayer = [CAShapeLayer layer];
maskLayer.frame = rect;
maskLayer.path = maskPath.CGPath;
// Set the newly created shape layer as the mask for the view's layer
self.layer.mask = maskLayer;
其他类似的地方都应该添加这个代码
The text was updated successfully, but these errors were encountered:
我的项目使用了进行布局,添加完约束,在调用 [UIView jk_setRoundedCorners:radius] 方法为视图添加圆角的时,无法正常添加,建议将该扩展下的方法实现改为:
CGRect rect = self.bounds;
其他类似的地方都应该添加这个代码
The text was updated successfully, but these errors were encountered: