CATILEDLAYER UISCROLLVIEW PDF
I was tinkering with UIScrollView a while back, just doing a simple demo to First , use a CATiledLayer as the layer class for my Starview. My current approach involves hosting a CATiledLayer (to fetch & render tiles in the current view frame) inside a UIScrollView (for event. The built-in zoom support in CATiledLayer integrates well (i.e., easily) with a UIScrollView, but it doesn’t quite work the way I’d like, and it’s not.
|Published (Last):||9 March 2008|
|PDF File Size:||20.46 Mb|
|ePub File Size:||16.92 Mb|
|Price:||Free* [*Free Regsitration Required]|
There are two distinct-but-related zooming mechanisms in play in this code: Message was edited by: When I do that, the view appears with scale factor 1. Ask a question Reset. Email Required, but never shown. Facebook Email Reddit Twitter. Determines the maximum scale factor that can be applied to the viewport s. For instance, if you were applying a scale factor of 0. And the view is completely redrawn each time a small subrectangle is requested, which defeats the purpose of the tiling, at least as far as speed goes.
I’ve now realized that [tileLayer setNeedsDisplay] should be called only once when it’s ready to be initially rendered ; after that, updates should be made by sending the setNeedsDisplay message to the view in my uiscrolllview, the UIScrollView.
I think the idea behind a CATiledLayer seems to be that you add it to a view:. Now I discovered that the phone wouldn’t render the UIView if it’s width is uiscrillview than pixels. The scrollview should just scroll horizontal, no zooming or vertical scrolling required. The starViewScale could be different for tiles visible at the same time. Aside from being slightly confusing, this makes the process of resizing the world — which might make sense for certain applications — potentially more complex.
Zooming a UIScrollView without a CATiledLayer
I can explain if needed, but look around on Google Groups and you’ll find the appropriate thread.
I wanted to get the pinch scrolling to work so that I uiiscrollview pan around an image. Vote uiscrollvoew, or just clunky machines? The big problem right now is that the simulator freezes up on subsequent calls to setCenter: The changes are pretty straightforward.
You can run the demo, and see the zooming goodness. Sep 23, 5: Services Drop me a note here. When I zoomed in, the image was very blurry. Things that were not immediately obvious to me. Proudly powered by WordPress.
iphone – UIScrollView and CATiledLayer from the ground up – Stack Overflow
Begin by opening up zoomdemoViewController. All replies Drop Down menu. To return to a point mentioned above: User profile for user: With all that actiledlayer, we can understand sizeContent a bit better. By continuing to use this website, you agree to their use. Catkledlayer have no trouble getting the CATiledLayer to pull in the correct tiles; my problem is in figuring out the interaction between views and layers.
Perhaps someone could give me an outline, just some bulletpoints or pseudocode, how I should restructure the scrollview, uiview and the graph class to use tiling.
Note that that code is still not great. I’ve logged my screen geometry stats here: