Search code examples
iosautolayoutxcode7.1

How to 'pin' objects in XCode 7.1


I have an existing iPad portrait mode app (XCode 7.1) that I am trying to add landscape mode to. I am trying to follow one of Ray Wenderlic's outdated (2013) tutorials for using Auto Layout.

At one point, he says:

Hold down the ⌘ key while you click on the two views on the top (the green and yellow ones), so that both are selected. From Xcode’s Editor menu, select Pin\Widths Equally:

which doesn't exist in the Editor menu. I have looked in SO and Google and found nothing regarding XC 7.1 and pinning. So how do I pin objects in XCode 7.1?


Solution

  • You can use bottom toolbar in Interface Builder. Click "Pin" -> check "Equal Width" -> "Add Constraints". Screenshot: