I have a UIView in an .xib file connected to it’s relevant .h file as an IBOutlet. I wish to set it’s layer properties: borderColor, borderWidth and cornerRadius.
I did it once before and it was quite easy. It was something like:
-(void) viewDidLoad {
[super viewDidLoad];
self.myView.layer.borderColor = [UIColor blueColor].CGColor;
self.myView.layer.borderWidth = 1.0f;
self.myView.layer.cornerRadius = 10.0f;
}
For some reason, when I do it in this new project, these layer properties are not available. When I write “self.myView.layer.” I get no options to fill.
Does anyone have any idea what may be the problem?
Add QuartzCore framework to your project
in your .h or .m file