Sent from my iPhone

> On 2015/05/06, at 9:58, dangerwillrobinsondan...@gmail.com wrote:
> 
> If you have AutoLayout on in a window it's actually on for all views. 
> NSScrollView and its hierarchy are a bit weird though. 
> Thing to do is create height and width constraints for the document view and 
> outlets  for them so you can configure them.
I forgot to mention another nice approach is to simply create two CGFloat 
properties that are height and width, then return those as the NSSize from 
inside an override of intrinsicContentSize. 

Then you save a ton of code. 
The only trick is you need to have it at least non zero at the beginning or it 
will be hosed. 
That method creates size constraints implicitly. 


> If you're using 10.10+ you can make them configurable in IB.   
> Then add a subview as your real document view. 
> 
> For upper left corner origin you need to subclass NSClipView and return YES 
> from an override of isFlipped. 
> Set the class in IB for both. 
> You also want to uncheck the item for translatesAutoresizingMasks 
> If that doesn't appear in IB you can set it in code or just return NO from a 
> getter override. 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to