Core Animationを使うときは
QuartzCore/QuartzCore.hをimportしておく。

取得

CALayer *l = view.layer

枠で囲む

[[view layer] setBorderColor:[uicolor CGColor]];
[[view layer] setBorderWidth:1.0f];


陰を落とすやり方


レイヤー(CALayer)とは何か

UIViewがdrawRect:で描画する先。
self.layer.contentsRect = CGRectMake(0, 0, a, b);
で、UIViewの中のある領域(a,b=0〜1)で全体の何割を表示するか決める。

CAGradientLayer


最終更新:2012年12月03日 14:26