Isn't property layer of UIView be readonly?
The property layer of UIView is described in Apple's doc as following: layer The view’s Core Animation layer used for rendering. (read-only) @property(nonatomic, readonly, retain) CALayer *layer It is obviously that it is readonly. But in my project, why it could be set as following: NSLog(@"before: %f",self.myView.laye.frame.size.width); [self.myView.layer setAffineTransform:CGAffineTransformMakeScale(2, 2)]; NSLog(@"after: %f",self.myView.laye.frame.size.width); //log shows us that the frame is modified Really confused in this situation. Anyone can help me out? Thanks in advance! The layer