https://developer.apple.com/library/ios/documentation/GraphicsImaging/Reference/CALayer_class/
alpha:
Simply change opacity directly. The range is within [0.0f, 1.0f]
http://stackoverflow.com/questions/15865500/calayer-sublayer-alpha-overriding
http://stackoverflow.com/questions/12448847/calayer-opacity-animation
rounded corner:
Can be changed on the fly through "setCornerRadiu"
http://stackoverflow.com/questions/4754392/uiview-with-rounded-corners-and-drop-shadow
frame:
Can be changed on the fly by writing to frame directly
contentsGravity vs contentsScale vs transform/affineTransform
contentsScale: 1 => 1 pixel per point, n=> n pixels per point
- when kCAGravityResizeAspect / kCAGravityCenter
If out of bound, masksToBounds property is useful.
contentsRect: 0-1.0. unit coordinates.
- sprite sheets:
contentsCenter: area can be stretched.
No comments:
Post a Comment