accessing layer from class

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-25T02:31:47Z Indexed on 2010/04/25 2:33 UTC
Read the original article Hit count: 733

Filed under:
|
|
|

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.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about ipad