Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 1
    Excellent - this worked great for me - Thank you for your help (will accept your answer when the timer is lifted) Commented Jun 8, 2014 at 10:55
  • 1
    You are welcome. This is the default behavior with autolayout, which is enabled by default now. Remember, because of possible different screen sizes/layouts, there should be a way of calculating where a view will be positioned relative to its parent, and autolayout fixes this issue. when you don't add these constraints, view creates them automatically at runtime but relative to the top-left corner. If you need anything else than that (you almost always need something else), you need to specify the constraints explicitly. Commented Jun 8, 2014 at 12:43
  • 4
    Note the control-dragging (which can be awkward) is not necessary. The button to the left of the one selected in this image opens a menu that allows you to pin the horizontal and vertical centres. Commented Jun 10, 2014 at 6:20
  • You are right.. I'm just used to control-dragging that's why I've told it that way. Commented Jun 10, 2014 at 10:13
  • @CanPoyrazoğlu--You mention "Select your label." What label? I've got the same issue with a new iPhone project in which I have no labels or other UI elements. My first project in Xcode 6, using Objective C. Commented Oct 19, 2014 at 17:54