Re: Simulating sublayers in CATiledLayer
Re: Simulating sublayers in CATiledLayer
- Subject: Re: Simulating sublayers in CATiledLayer
- From: Remco Poelstra <email@hidden>
- Date: Wed, 26 Mar 2014 16:43:45 +0100
Finally it works!
I now have a CALayer backed UIView with CATiledLayer sublayers with full
zooming support.
I'm not entirely sure what change actually turned it into something
working, but I'm happy it does work now.
Thanks for all support.
Remco
Graham Cox schreef op 26-3-2014 1:04:
Did you notice what David Duncan said?:
For CATiledLayer you need to ensure the levelOfDetail and levelOfDetailBias is set correctly
This is crucial to being able to zoom properly. It's also not that obvious what these mean or the proper values to use, but there was a discussion about this back in December or so if I recall correctly (search for 'Threaded drawing'), which expounded on this. I got CATiledLayer zooming to work as expected with vector content remaining sharp, but only once these properties had been understood and set.
--Graham
On 26 Mar 2014, at 4:55 am, Remco Poelstra <email@hidden> wrote:
Well, the parent CATiledLayer (the UIViews's layer) uses transforms for zooming, but that isn't communicated down the sublayers. The context of the sublayers is simply scaled.
All I've done is set the UIView layer class to CATiledLayer. Add the UIView to a UIScrollview. And added sub CA(Tiled)Layers to the CATiledLayer of the UIView.
The transform is applied to the root layer, and not to the sublayers.
_______________________________________________
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