UIViewでよく使うのに覚えきれないメモ
UIViewContentMode
typedef enum { UIViewContentModeScaleToFill, // これがデフォルト。UIImageViewにめいっぱいひろげる UIViewContentModeScaleAspectFit, // 画像のaspect比を維持し、ちょうどはいるようにする UIViewContentModeScaleAspectFill, // 画像のaspect比を維持し、めいっぱい広げる(はみ出した分がみれなくなる) UIViewContentModeRedraw, // UIViewContentModeScaleToFill これと同じに見えるけどなんだろう・・ UIViewContentModeCenter, // 画像サイズをそのままに、真ん中を表示 UIViewContentModeTop, // 上に UIViewContentModeBottom, // 下に UIViewContentModeLeft, // 左に UIViewContentModeRight, // 右に UIViewContentModeTopLeft, // 左上に UIViewContentModeTopRight, // 右上に UIViewContentModeBottomLeft, // 左下に UIViewContentModeBottomRight, // 右下に } UIViewContentMode;
UIViewAnimationCurve
typedef enum { UIViewAnimationCurveEaseInOut, // ゆっくり始まって徐々に加速。中盤から減速 UIViewAnimationCurveEaseIn, // ゆっくり始まって徐々に加速 UIViewAnimationCurveEaseOut, // 速く始まって徐々に減速 UIViewAnimationCurveLinear // 等速度 } UIViewAnimationCurve;
UIViewAnimationTransition
typedef enum { UIViewAnimationTransitionNone, // 指定なし UIViewAnimationTransitionFlipFromLeft, // 左回転 UIViewAnimationTransitionFlipFromRight, // 右回転 UIViewAnimationTransitionCurlUp, // 上向きにカーリングする UIViewAnimationTransitionCurlDown, // 下向きにカーリングする } UIViewAnimationTransition;
UIViewAutoresizing
typedef enum { UIViewAutoresizingNone = 0, // ビューの自動サイズ変更をしない。 UIViewAutoresizingFlexibleLeftMargin = 1 << 0, // 左マージンを自動的にサイズ調整する UIViewAutoresizingFlexibleWidth = 1 << 1, UIViewAutoresizingFlexibleRightMargin = 1 << 2, UIViewAutoresizingFlexibleTopMargin = 1 << 3, UIViewAutoresizingFlexibleHeight = 1 << 4, UIViewAutoresizingFlexibleBottomMargin = 1 << 5 };