LoginSignup
37
39

More than 5 years have passed since last update.

Xcodeでオブジェクトを前面・背面に移動する

Posted at

これは何

Xcode の Storyboard 上でオブジェクトを前面移動・背面移動する方法のメモです。

image

青いViewを赤いViewの上に移動したかったのです。

image

Stack Overflowで調べたら、すぐに出てきました。

xcode - IPhone Interface Builder: Z-Index, Z-order of a button, image, ui element, etc? - Stack Overflow

いくつか方法があるようですが、ここでは一番Vote数が高かった方法を選択しました。

環境

Xcode Version 6.4 (6E35b)

やりかた

Document Outline から移動したいオブジェクトを選択します。(Document Outline が表示されていない場合は、Xcode メニューの Editor > Show Document Outline で表示します)

OutlineView_2x.png

選択する際、シングルクリックではなく、ダブルクリックで選択しないとダメなようです。

この状態で Xcode メニューの Editor > Arrange を選択します。

スクリーンショット 2015-09-07 16.12.40.png

  • 「Send to Front」で最前面へ
  • 「Send to Back」で最背面へ
  • 「Send Forward」で一つ前面へ
  • 「Send Backward」で一つ背面へ

移動できました。

37
39
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
37
39