Buona giornata!Creazione di una vista angolo arrotondato
Sto cercando di rendere la mia vista (vista in vista principale) fare angolo arrotondato. Sto facendo così, ma non funziona. Qualche idea?
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
currenView = [[UIView alloc] init];
UIBezierPath *maskPath;
maskPath = [UIBezierPath bezierPathWithRoundedRect:currenView.bounds byRoundingCorners:UIRectCornerAllCorners cornerRadii:CGSizeMake(30.0, 30.0)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame = currenView.bounds;
maskLayer.path = maskPath.CGPath;
currenView.layer.mask = maskLayer;
}
return self;
È possibile effettuare semplicemente utilizzando la proprietà cornerRadius del livello. – Exploring