• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Auto layout in XCode 6.4
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto layout in XCode 6.4


  • Subject: Re: Auto layout in XCode 6.4
  • From: Alex Zavatone <email@hidden>
  • Date: Tue, 25 Aug 2015 08:27:53 -0400

It's not the most straightforward thing in existence.

I've found that watching several YouTube videos will do more good than most anything else.

Sadly, there is one 7 minute video that made things pretty clear but I can't find it (not Ray's).

This one is pretty good.

https://www.youtube.com/watch?v=vzyd33Pv9kg

On Aug 25, 2015, at 7:23 AM, Dave wrote:

> Hi All,
>
> I’m trying to get my head around Auto Layout in XXCode, but can’t seem to figure out some basic things.
>
> I have a sample project with a View made up of two Controls, a Text Field and a Button, like so:
>
> |     [TextView]           [Button]     |
>
> Where | = edge of the View.
>
> It has the following constraints at the moment:
>
> 1.	Leading Alignment		First Item: Button.Leading        Relation: Equal   Second Item: TextView.Leading   Constant: 8   Priority: 1000   Multiplier: 1
> 2.	Vertical Space			First Item: Superview.Bottom   Relation: Equal   Second Item: Button.Bottom        Constant: 5   Priority: 1000   Multiplier: 1
> 3.	Vertical Space                 First Item: Button.Top               Relation: Equal   Second Item: Superview.Top       Constant: 5   Priority: 1000   Multiplier: 1
> 4.	Baseline Alignment         First Item: Button.Baseline       Relation: Equal   Second Item: TextView.Baseline  Constant: 0   Priority: 1000   Multiplier: 1
> 5.	Horizontal Space		First Item: Superview.Trailing   Relation: Equal   Second Item: Button.Trailing       Constant: 5   Priority: 1000   Multiplier: 1
>
> I now, want to move the button so it’s before the text field, like so:
>
> |     [Button]           [TextView]     |
>
> If I just move the button to the left, it doesn’t work, so I’m guessing I need to change the constraints or somehow get XCode to do it for me?
>
> When I click on the Button in XCode, I see that it is hooked to the top, bottom and right edge of the superview and the left edge of the TextView.
>
> How do I change this so that it’s hooked to the top, bottom, and left edge of the superview and the left edge of the TextView?
>
> Is there a good doc that explains how to use XCode to do this?
>
> Not sure if this is a Cocoa or XCode question, so I’ve posted to both lists.
>
> All the Best
> Dave
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Auto layout in XCode 6.4
      • From: Dave <email@hidden>
References: 
 >Auto layout in XCode 6.4 (From: Dave <email@hidden>)

  • Prev by Date: Auto layout in XCode 6.4
  • Next by Date: security agent plugins and autologin
  • Previous by thread: Auto layout in XCode 6.4
  • Next by thread: Re: Auto layout in XCode 6.4
  • Index(es):
    • Date
    • Thread