CGAffineTransformあたりを使うと回転、拡大、縮小、平行移動などの操作を行うことができます。仕様、ポイントなどをメモしておきます。 CGAffineTransformの基本 アフィン変換自体はC言語の構造体として定義されています。その中身は3行3列の行列ですが、普段はあまり意識する必要はなさそうです。 UIImageViewのインスタンスとしてmyViewがあるとき、2倍に拡大する方法 CGAffineTransform trans; trans = CGAffineTransformMakeScale( 2, 2); // x,y2倍に拡大 myView.transform=trans; 拡大し、さらに90度回転 CGAffineTransform trans; trans = CGAffineTransformMakeScale( 2, 2); trans = CGAff
CALayer を使うと簡単にビューに影を落とすことができる。 CALayer* layer = self.imageView1.layer; layer.shadowOffset = CGSizeMake(2.5, 2.5); layer.shadowColor = [[UIColor blackColor] CGColor]; layer.shadowOpacity = 0.5; ただこの方法はビューの外側に影を落とせても、ビューの内部には影を落とせない。 どうするか。 CALayer のプロパティを眺めていていると shadowPath に気がついた。このプロパティには CGPathRef を渡すことができる。 @property CGPathRef shadowPath;もしかしてこれを使って任意の場所や形で影が落とせないか。 試しにこんな矩形のパスを作って渡してみた。 CALay
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く