Re: Problems with a Layer backed NSView in a NSScrollView
Re: Problems with a Layer backed NSView in a NSScrollView
- Subject: Re: Problems with a Layer backed NSView in a NSScrollView
- From: Moray Taylor <email@hidden>
- Date: Fri, 20 Jun 2008 12:16:46 +0000 (GMT)
I've made a bit of progress on this, it's the right way up now, at the main layer redraws just fine, however, sublayers disappear when I scroll (they reappear when you resize the window, as this is presumably triggering a redraw).
I've put a test app here...
http://s3.amazonaws.com/TempStuff/LayerDebug.zip
Which should be useful to anyone who wants to put a layer backed view into a scrollview, and even more helpful for anyone who wants to tell me how to get the sublayers to redraw ;-)
Cheers
MT
--- On Thu, 19/6/08, Gordon Apple <email@hidden> wrote:
> From: Gordon Apple <email@hidden>
> Subject: Re: Problems with a Layer backed NSView in a NSScrollView
> To: email@hidden
> Cc: "Moray Taylor" <email@hidden>
> Date: Thursday, 19 June, 2008, 10:14 PM
> As I stated in my recent post, I implemented my own
> transform to flip
> the layer since nothing else worked. That worked, and my
> view is in a
> scrolling window. What I'm currently having trouble
> with is scaling the
> view. My window is similar to that in Sketch, with a popup
> scale factor in
> the lower scroll bar. I've tried a variety of things
> including regenerating
> the CALayers, but so far haven't been able to get the
> layers to scale to the
> coordinates of the underlying view. Again, I'll
> probably figure it out
> eventually, but this stuff just shouldn't be that
> difficult. IMHO, there is
> not enough automatic coupling adjustments between the view
> and its layer
> parameters to handle these issues.
>
> > I've tried
> >
> > [[[self pageScrollView] contentView]
> setWantsLayer:YES];
> >
> > This results in a still flipped display, and very
> badly corrupted, lots of
> > artifacts etc....
> >
> > [[self pageScrollView] setWantsLayer:YES];
> >
> > Nice display, but still flipped.
> >
> > The transform that used to work before I tried the
> above line makes no
> > difference if I set the scrollview to be layer backed.
> >
> > Any ideas?
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
_______________________________________________
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