macOS/iOS API解説

iOS , Mac アプリケーション開発のために使われる主要フレームワークの日本語情報です。2010年代に書かれた内容です。今後更新はありません。

目次

UIViewContentMode

INDEX>UIKit>UIView

ビューのサイズや位置が変わったときのサブビューの描画方法

DHC 60日分ビタミンE

DHC 60日分ビタミンE

解説

typedef enum {
UIViewContentModeScaleToFill,
UIViewContentModeScaleAspectFit,
UIViewContentModeScaleAspectFill,
UIViewContentModeRedraw,
UIViewContentModeCenter,
UIViewContentModeTop,
UIViewContentModeBottom,
UIViewContentModeLeft,
UIViewContentModeRight,
UIViewContentModeTopLeft,
UIViewContentModeTopRight,
UIViewContentModeBottomLeft,
UIViewContentModeBottomRight,
} UIViewContentMode;

解説

UIViewContentModeScaleToFill 縦横ともにViewの大きさに合わせて拡大縮小します
UIViewContentModeScaleAspectFit アスペクト比を維持して縦横どちらかぴったりにフィットさせる
UIViewContentModeScaleAspectFill アスペクト比を維持してめいいっぱいフィットさせる
UIViewContentModeRedraw
UIViewContentModeCenter
UIViewContentModeTop コンテンツの大きさはそのままで上に合わせる
UIViewContentModeBottom コンテンツの大きさはそのままで下に合わせる
UIViewContentModeLeft コンテンツの大きさはそのままで左に合わせる
UIViewContentModeRight コンテンツの大きさはそのままで右に合わせる
UIViewContentModeTopLeft コンテンツの大きさはそのままで左上に合わせる
UIViewContentModeTopRight コンテンツの大きさはそのままで右上に合わせる
UIViewContentModeBottomLeft コンテンツの大きさはそのままで左下に合わせる

クラス

UIView

Constants

使用可能

iPhone2.0

参照