Re: Problem with Auto Layout and drawRect
Re: Problem with Auto Layout and drawRect
- Subject: Re: Problem with Auto Layout and drawRect
- From: Dave <email@hidden>
- Date: Mon, 07 Sep 2015 19:01:46 +0100
Sorry, I hit send to soon!
I meant to say:
This is in a View called:
LTWDetailXView Frame: 0,0, 600,96
DetailMainView Frame: 0,0, 600,96 (matches the SuperView). This is the LTWDrawFrameRect subclass.
DetailDescriptionTextField
DetailButtonStackView
The constraints on this were generated using “Reset the Suggested Constraints” in XCode 6.4 on LTWDetailXView.
LTWDetailXView gets added to a StackView in a ScrollView.
if I set translatesAutoresizingMaskIntoConstraints is set to YES for DetailMainView then it draws but there are lines drawn at random, if I set them to NO (or don’t set it at all) then nothing gets drawn at all. If I change the Class of DetailMainView to be a plain NSView then it displays then it draws ok (but of course I don't get the frame drawn).
One other thing, I seem to remember there was a debugging method you could call that logs the constraints, but I can’t seem to find it again now, does anyone know what it is called?
Any help on this greatly appreciated.
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