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.
|Country:||United Arab Emirates|
|Published (Last):||10 June 2014|
|PDF File Size:||14.27 Mb|
|ePub File Size:||11.71 Mb|
|Price:||Free* [*Free Regsitration Required]|
All replies Drop Down menu. For instance, if you were applying a scale factor of 0. I have no trouble getting the CATiledLayer to pull in the correct tiles; my problem is in figuring out the interaction between views and layers. Stepping through with the debugger, I see that this thread exits before the hang happens.
It should return discrete values based on powers of 2, and not be continuous as it is in the demo. Posted on Sep 23, 1: To find out more, including how to control cookies, see here: Oct 18, 4: The changes are pretty straightforward. Now I discovered that the phone wouldn’t render the UIView if it’s width is larger than pixels.
Cocoa and layers and sublayers vs.
CATiledLayer in a UIScrollView (for nativ… – Apple Community
Thank you very much in advance for any reply. Any help will be greatly appreciated.
I was missing a couple of key catiledlayee. NO to make the content offset change immediate, or your map won’t end up where you’d expect it to: 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.
Finally, performance — at least in the iPhone4 simulator — is a little scary.
CATiledLayer (Part 2)
Also, there are some weird drawing issues with very catiledlayre contentSize values. In my case it was 20 minutes well spent, boosting user experience by several orders of magnitude.
My suspicion is something is going wrong in one of the threads owned by CATiledLayer; I don’t get any subsequent calls to drawLayer: Does anyone have caitledlayer examples of getting this to work or anything like it?
The big problem right now is that the simulator freezes up on subsequent calls to setCenter: I wanted to get the pinch scrolling to work so that I could pan around an image. By continuing to use this website, you agree to their use.
And more generally, does this approach even make sense? Sorry, your blog cannot share posts by email. This arrangement will tend to produce a higher-quality, more efficient image than would be obtained by simply applying a raw scaling catiledlayeer to the full-resolution tiles.
Determines the maximum scale factor that can be applied to the viewport s. Sep 23, 5: When I do that, the view appears with scale factor 1.
My content view has a scaled of 0. 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.
To return to a point mentioned above: To start the conversation again, simply ask a new question. I discovered I could get the delegate situation sorted out by adding the tile layer as a sublayer of the NativeMapView: It was being drawn at the same pixel resolution used when zoomed out:.
Services Drop me a note here. Email Required, but never shown. What might cause this? Scott’s Space Wars emulator.
Zooming a UIScrollView without a CATiledLayer | MacRumors Forums
User profile for user: Facebook Email Reddit Twitter. Home About this Blog. There are two distinct-but-related zooming mechanisms in play in this code: