• 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: what happens when layout constraint height and frame height conflict (iOS)?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: what happens when layout constraint height and frame height conflict (iOS)?


  • Subject: Re: what happens when layout constraint height and frame height conflict (iOS)?
  • From: Ken Ferry <email@hidden>
  • Date: Mon, 26 Nov 2012 18:07:45 -0800

Think of setFrame: outside of layout the same way you think of drawing outside of drawRect:

It will "work" in the sense that the frame will be changed, but it's just going to get stomped the next time the layout pass comes around.

Sent from my iPhone

On Nov 26, 2012, at 10:46 AM, Matt Neuburg <email@hidden> wrote:

> I have noticed by experimentation that if I have a layout constraint on a view that sets its height at (say) 36, I can later change the view's frame in code to set its height at (say) 50. The view's height does visibly change, but logging proves that the layout constraint does not change.
>
> (1) How can this be? The view would appear to be violating its own layout constraint.
>
> (2) More important: Is this a bad situation? In other words, once I've decided to use layout constraints at all, must I then use them for everything and avoid frame/bounds? Can something bad happen later because of this conflict?
>
> Thx - m.
>
> --
> matt neuburg, phd = email@hidden, http://www.apeth.net/matt/
> pantes anthropoi tou eidenai oregontai phusei
> Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
> RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
> TidBITS, Mac news and reviews since 1990, http://www.tidbits.com
>
>
> _______________________________________________
>
> 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: what happens when layout constraint height and frame height conflict (iOS)?
      • From: Kyle Sluder <email@hidden>
References: 
 >what happens when layout constraint height and frame height conflict (iOS)? (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: what happens when layout constraint height and frame height conflict (iOS)?
  • Next by Date: Re: what happens when layout constraint height and frame height conflict (iOS)?
  • Previous by thread: Re: what happens when layout constraint height and frame height conflict (iOS)?
  • Next by thread: Re: what happens when layout constraint height and frame height conflict (iOS)?
  • Index(es):
    • Date
    • Thread