accessing layer from class
- by Mike
I am creating a rounded corner UIImageView, but this image is created inside a class, using among other instructions, these following:
myImageView.layer.cornerRadius = 20.0;
myImageView.layer.masksToBounds = YES;
myImageView.layer.borderColor = [UIColor darkGrayColor].CGColor;
myImageView.layer.borderWidth = 1.0;
but Xcode is yelling at me telling me
unknown 'cornerRadius' component of a property
unknown 'masksToBounds' component of a property
unknown 'borderColor' component of a property
unknown 'borderWidth' component of a property
I know this code is valid, because I have created images like that before, but never inside a class. Why is this happening? how to solve that?
thanks.