タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

Objective-cとautolayoutに関するtksthdnrのブックマーク (1)

  • Auto LayoutでCustom Viewを作る その1 | Cyber Passion for iOS

    Auto LayoutでCustom Viewを作成し、それをViewController#viewに配置する方法について説明します。 サンプルコード: https://github.com/stack3/iOSAutoLayoutSamples サンプルコードのCustomViewを選択すると以下の画面が表示されます。 横画面にするとこうなります。 STCustomView.xib グレー背景の部分がCustomViewで、これはSTCustomView.xibでレイアウトされています。 構成は以下のとおり。 UIView – backgroundColorをgrayにしている UIImageView – アイコン表示 UILabel – 文字列表示 UIImageViewのConstraintは以下のようになっています。 要するに幅と高さは32pxでSuperviewとの間隔は8pxと

    Auto LayoutでCustom Viewを作る その1 | Cyber Passion for iOS
  • 1