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):||6 June 2005|
|PDF File Size:||3.45 Mb|
|ePub File Size:||16.88 Mb|
|Price:||Free* [*Free Regsitration Required]|
CATiledLayer (Part 2)
So I’m building my own native iPhone map. Recode the sizeContent method in zoomdemoViewController. The scale factor is always 1.
I just started using CATiledLayer tonight. The zoom limits are fixed, but should be dynamic. Second, I need to trigger a redraw of the image when the zoom level changes.
Ideally I would like to keep the Graph class untouched, just draw the context entirely, split it into tiles and scroll those. Post was not sent – check your email addresses!
Zooming a UIScrollView without a CATiledLayer
Message was edited by: For my sample graphic, I grabbed the Quartz sample code from another Apple sample, just to have something to draw. To return to a point mentioned above: You can run the demo, and see the zooming goodness.
It’s been a month since you asked but this may still be of use. The changes are pretty straightforward.
iphone – UIScrollView and CATiledLayer from the ground up – Stack Overflow
You can download the demo at http: I discovered I could get uiscroollview delegate situation sorted out by adding the tile layer as a sublayer of the NativeMapView: David Golightly David Golightly. Sep 29, 4: Mac OS X 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.
There are two distinct-but-related zooming mechanisms in play in this code: Catiledlayee up or log in Sign up using Google. To start the conversation again, simply ask a new question.
Ask a question Reset. Sep 23, 5: Services Drop me a note here. Note that that code is still not great.
The starViewScale could be different for tiles visible at the same time. Things seem to run ok in standard resolution on either simulated or actual hardware but high-res tiling can take a long time to fill up the screen. It was being drawn at the same pixel resolution used when zoomed out:.
Scott’s Space Wars emulator. Reply Helpful Thread reply – more options Link to this Post.