This reminds me of the discussion we had about putting stack views in 
scrollviews back in January

http://lists.apple.com/archives/cocoa-dev/2015/Jan/msg00092.html 
<http://lists.apple.com/archives/cocoa-dev/2015/Jan/msg00092.html>

it certainly took a bit of messing about but it wasn’t that hard in the end. 
Ken reminded me in that thread about the embed in scrollview which removed one 
useless window I didn’t need. You added 4 constraints to the scrollview and 3 
to the stackview, and flipped the window. 

> On 5 Sep 2015, at 21:01, Dave <d...@looktowindward.com> wrote:
> 
> Hi,
> 
> I’ve been experimenting and given that I have this in a NIB file:
> 
> Window                                                          Initially - 
> Width=846, Height=594
>       BaseView                                                        
> (Matches Window)
>               NSScrollView                                 Initially - 
> X=20,Y=20, Width=806, Height=554
>                               FlippedClipView
>                                               InsideView
> 
> 
> (I’ve changed the names to make things easier (I hope!)).
> 
> In XCode 6.4/IB I select NSScrollView and then Click the “ Pin” button and 
> add top, bottom, left, right constraints. I then assume I need to do the same 
> to FlippedClipView, but but having selected it and clicking “Pin” it won’t 
> allow me to set any constraints? Also if I try and Control+Drag 
> FlippedClipView to NSScrollView (or Command+Selecting both Views) nothing 
> happens.
> 
> However if I try this with InsideView, it does allow me to set constraints, 
> so should the constraints be between InsideView/NSScrollView or 
> FlippedClipView/NSScrollView?
> 
> Ultimately I want to have a StackView added to the Scroll View and then add 
> Items to the StackView and be able to scroll the items. With this in mind, in 
> the NIB, do I add the StackView to InsideView or do I replace InsideView with 
> the StackVIew? Also do I need to set constraints on the StackVIew to the 
> NSScrollView and/or the InsideView and/or FlippedClipView?
> 
> Cheers
> Dave
> 

_______________________________________________

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