Необходимо убедиться, что вы импортировали <QuartzCore/QuartzCore.h>
и добавили QuartzCore
в существующие фреймворки, чтобы получить доступ к методу cornerRadius:
.
Затем, чтобы установить радиус угла, вы будете использовать что-то вроде следующего в зависимости от вашей реализации вида
UIView *theView = [[UIView alloc] initWithFrame:CGRectMake(10,10,100,200)];
CALayer *theViewLayer = [theView layer];
[theViewLayer setCorderRadius:5.0];
//Other Methods you can use
[theViewLayer setBorderColor:[[UIColor colorWithWhite:1.0 alpha:0.3] CGColor]];
[theViewLayer setBorderWidth:2.0];
[theViewLayer setBackgroundColor:[[UIColor blackColor] CGColor]];