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:||Bosnia & Herzegovina|
|Published (Last):||28 March 2014|
|PDF File Size:||1.87 Mb|
|ePub File Size:||14.92 Mb|
|Price:||Free* [*Free Regsitration Required]|
I’ve now realized that [tileLayer setNeedsDisplay] uixcrollview 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 case, the UIScrollView.
For instance, if you were applying a scale factor of 0. That’s basically all there is to it, you can just draw as if the entire coordinate space is just there. Not all the tiles seem to load even though I can see requests are being made for thembut I’ll worry about that later.
I can get a map to show up geographically located where I expected it to be. My content view has a scaled of 0.
Zooming a UIScrollView without a CATiledLayer | MacRumors Forums
Uisccrollview was not sent – check your email addresses! Finally, performance — at least in the iPhone4 simulator — is a little scary. With all that said, we can understand sizeContent a bit uiscrollveiw. Posted on Sep 23, 1: This arrangement will tend to produce a higher-quality, more efficient image than would be obtained by simply applying a raw scaling transform to the full-resolution tiles.
Things seem to run uiscrollviiew in standard resolution on either simulated or actual hardware but high-res tiling can take a long time to fill up the screen. My suspicion is something is going wrong in one of the threads owned by CATiledLayer; I don’t get any subsequent calls to drawLayer: I was missing a couple of key points. If so, how should I continue? Mac OS X Oct 18, 4: Ideally I would like to keep the Graph class untouched, just draw the context entirely, split it into tiles and scroll those.
And, just to keep things clear, you should probably update the comment at the top of this method, as well:. It was being drawn at the same pixel uiscrollvieww used when zoomed out: This entry was posted in iPhone. Any help will be greatly appreciated.
Determines the maximum scale factor catlledlayer can be applied to the viewport s. User profile for user: The debugger doesn’t break or report any bad access or other exception; it’s completely silent about the hang. Services Drop me a note here. Sign up using Email and Password. Panning outside of this region is an exercise left to the reader.
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. It’s been a month since you asked but this may still be of use. Sep 29, 4: Ask a question Reset.
CATiledLayer (Part 2)
So I’m building my own native iPhone map. Email Required, but never shown. By continuing to use this website, you agree to their use. Sep 23, 3: Now I discovered that the phone wouldn’t render the UIView if it’s width is larger than pixels.