• 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: Matt Neuburg <email@hidden>
  • Date: Mon, 26 Nov 2012 18:04:14 -0800

Perfect, just what I needed. m.

PS Is there any merit to my suggestion that the runtime should warn if you set the frame of a constrained interface object? I really think such a warning would save a lot of programmers from shooting themselves in the foot. It is so easy to switch to auto layout and think you've got everything worked out, but accidentally leave explicit frame changes from your old code. And you don't discover this until layout is triggered, which could be a long time later…! Stop me from submitting this as a suggestion to the bug reporter if it's a dumb idea.

On Nov 26, 2012, at 3:25 PM, Kyle Sluder <email@hidden> wrote:

> On Mon, Nov 26, 2012, at 12:57 PM, Matt Neuburg wrote:
>> It would help me if you could suggest a method call that would exercise
>> the constraint system, e.g. perhaps causing the frame to snap back to
>> height 36, thus proving to the student that this behavior is problematic.
>> I tried things like layoutSubviews and layoutIfNeeded but nothing
>> happened. Thx -
>
> Did you try -setNeedsLayout?
>
> --Kyle Sluder

--
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


  • 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>)
 >Re: what happens when layout constraint height and frame height conflict (iOS)? (From: Kyle Sluder <email@hidden>)
 >Re: what happens when layout constraint height and frame height conflict (iOS)? (From: Matt Neuburg <email@hidden>)
 >Re: what happens when layout constraint height and frame height conflict (iOS)? (From: Kyle Sluder <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