Re: CALayers inside NSSplitView (clipping issue) [SOLVED]
Re: CALayers inside NSSplitView (clipping issue) [SOLVED]
- Subject: Re: CALayers inside NSSplitView (clipping issue) [SOLVED]
- From: John Clayton <email@hidden>
- Date: Sat, 27 Sep 2008 20:19:58 +0200
For posterity.
To solve this clipping problem, I wrapped all of the views that I have
in a superview instance of NSView. I.e. 'IB -> Layout -> Embed
Objects In -> Custom View'.
That stops the clipping weirdness from occurring. Don't ask me why,
because I don't know - but I made this change as a part of another
thing I was doing and noticed that the problem no longer occurs.
John "why me?" Clayton
On 24/09/2008, at 4:50 PM, John Clayton wrote:
Hi All,
Someone kindly suggested that I post the question again, but that
this time I make some sense :-) Good idea I say...
So - step by step, first a series of facts to set the scene:
1. i have an NSSplitView
2. both of the views that this split view contains use CALayer
instances
3. in the lower view is a track-view style control, it allows one to
drag tracks up and down
4. the track view in the lower part of the NSSplitView is contained
in an NSScrollView instance (which is usual for splitters of course
- nothing abnormal so far).
next: here's a screen shot of the app working properly - in this
screenshot, I've started the app but not resized anything or moved
anything yet.
http://skitch.com/johnclayton/s5fr/picture-1
now, imagine that I take the mouse, and I use it to drag that
horribly purple coloured track straight down. the desired effects
are:
- the layer is moved downwards
- the view expands in the vertical direction (gets larger, but thats
ok right - cos its in a scrollview)
- the vertical scrollbar should appear in the NSScrollView
- the NSScrollView / NSClipView should clip the contents view
now, here's a screenshot of the bug:
http://skitch.com/johnclayton/s5fa/picture-3
so I wonder what is causing the calayer instance to NOT be clipped
in this case. The NSClipView inside the scrollview should be
clipping, right?
Thanks
--
John Clayton
Skype: johncclayton
On 24/09/2008, at 5:58 AM, John Clayton wrote:
Hi All,
I have a vertically laid out NSSplitView which is hosting two
NSViews, both of which contain CALayer instances. In the bottom
view, there's a scroll view - and I can drag stuff within the view
- which in turn causes the view to grow.
Sometimes, the splitview doesn't clip the CALayer *at all*, and I
see this:
http://skitch.com/johnclayton/s4gc/picture-2
I resize the contents of the split-view during mouseDragged: (along
with its layers), does anyone know of issues with this or perhaps
has an idea of whats going wrong?
Thanks
--
John Clayton
Skype: johncclayton
_______________________________________________
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
_______________________________________________
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