24/7 twenty-four seven

iOS/OS X application programing topics.

2013-05-24から1日間の記事一覧

UIImageView で 'Aspect Fit (UIViewContentModeScaleAspectFit)' を指定したときの画像サイズを取得する

↓ 例えばこんなふうに UIImageView に 'Aspect Fit' を指定して表示させたときの領域を知りたいことってありますよね。 がんばって計算してもいいのですが、AVFoundation.framework の次の関数で簡単に取得できます。 CGRect AVMakeRectWithAspectRatioInsid…