• 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: when has AutoLayout finished its work?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: when has AutoLayout finished its work?


  • Subject: Re: when has AutoLayout finished its work?
  • From: Ken Thomases <email@hidden>
  • Date: Wed, 26 Nov 2014 00:15:22 -0600

On Nov 25, 2014, at 11:50 PM, Gerriet M. Denkmann <email@hidden> wrote:

> Document based Cocoa app; Window has CustomView inside ScrollView; uses autolayout. 10.10.1
>
> Problem: the autolayout stuff keeps butting in and setting the frameSize of my CustomView to (0,0).
>
> So I need some method like: autolayoutHasFinishedItsWork, but cannot find such.

What would you do in such a method if it existed?  Set the view's frame size?  Well, you shouldn't be doing that if you're using auto layout.

If auto layout is setting your view's frame size to (0, 0) that's because it doesn't have an intrinsic size and you haven't set up any constraints to make it have a different size.  What size should the view have?  How would that be derived?

Finally, have you considered leaving translatesAutoresizingMaskIntoConstraints set to YES for the view and setting its autoresizing mask?  In that case, calls to set the frame will establish constraints that will maintain that new frame as per the old springs-and-struts model of the autoresizing mask.

Regards,
Ken


_______________________________________________

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: when has AutoLayout finished its work?
      • From: "Gerriet M. Denkmann" <email@hidden>
    • Re: when has AutoLayout finished its work?
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >when has AutoLayout finished its work? (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Altering the size of UISlider's “slider ball”
  • Next by Date: Re: when has AutoLayout finished its work?
  • Previous by thread: when has AutoLayout finished its work?
  • Next by thread: Re: when has AutoLayout finished its work?
  • Index(es):
    • Date
    • Thread