On Nov 25, 2014, at 11:50 PM, Gerriet M. Denkmann <[email protected]> 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 protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
