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.

Author: Dodal Mezikinos
Country: Brunei Darussalam
Language: English (Spanish)
Genre: Technology
Published (Last): 16 July 2006
Pages: 465
PDF File Size: 8.29 Mb
ePub File Size: 8.44 Mb
ISBN: 980-2-77044-822-2
Downloads: 21353
Price: Free* [*Free Regsitration Required]
Uploader: Malagore

iphone – UIScrollView and CATiledLayer from the ground up – Stack Overflow

Sep 29, 4: Sep 29, So you should only need to slightly modify your Graph class so it can act as a CATiledLayer delegate. The big problem right now is that the simulator freezes up on subsequent calls to setCenter: The changes are pretty straightforward.

I’ve now realized that uiscrollvied setNeedsDisplay] should be called only once when it’s ready to be initially rendered ; after that, catilsdlayer should be made by sending the setNeedsDisplay message to the view in my case, the UIScrollView.

In my case it was 20 minutes well spent, boosting user experience by several orders of magnitude. I wanted to get the pinch scrolling to work so that I could pan around an image. Email Required, but never shown.

Facebook Email Reddit Twitter. Ideally I would like to keep the Graph class untouched, just draw the context entirely, split it into tiles and scroll those.

Sign up or log in Sign up using Google. The scale factor is always 1. It was being drawn at the same pixel resolution used when zoomed out: Vote stealing, or uiacrollview clunky machines? Any help will be greatly appreciated. Recode the sizeContent method in zoomdemoViewController. When I zoomed in, the image was very blurry. The zoom limits are fixed, but should be dynamic. By using our site, you acknowledge that you have read and understand our Cookie PolicyPrivacy Policyand our Terms of Service.

  GINEKOLOGIA ILUSTROWANA PDF

And, just to keep things clear, you should probably update the comment at the top of this method, as well:. Also, there are some weird drawing issues with very large contentSize values.

A very simple UIScrollView demo

Uiscrollivew the maximum scale factor that can be applied to the viewport s. The starViewScale could be different for tiles visible at the same time. To return to a point mentioned above: I just started using CATiledLayer tonight. I think the idea behind a CATiledLayer uiscrollivew to be that you add it to a view: My suspicion is something is going wrong in one of the threads owned by CATiledLayer; I don’t get any subsequent calls to drawLayer: This site uses cookies.

Begin by opening up zoomdemoViewController. For instance, if you were applying a scale factor of 0. It was being drawn at the same pixel resolution used when zoomed out:.

Things seem to run ok in standard resolution on either simulated or actual hardware but high-res tiling can uiscrollvoew a long time to fill up cafiledlayer screen.

I’ve logged my screen geometry stats here: I discovered I could get the delegate situation sorted out by adding the tile layer as a sublayer of the NativeMapView: Sep 23, 2: There are two distinct-but-related zooming mechanisms in play in this code: Reply Helpful Thread reply – more options Link to this Post.

  LEY 30026 PDF

Finally, performance — at least in the iPhone4 simulator — is a little scary. If so, how should I continue?

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. Not all the tiles seem to load even though I can see requests are being made for thembut I’ll worry about that later. This entry was posted in iPhone. But after reading and googling a lot, I still find it difficult to understand the basics of CATiledLayer for this task-I’m somehow lost between Quartz vs.

Search results for catiledlayer uiscrollview pdf – Cocoa Controls

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 find out cstiledlayer, including how to control uisdrollview, see here: Stack Overflow works best with JavaScript enabled. Sorry, your blog cannot share posts by email. To start the conversation again, simply ask a new question. I recommend keeping contentSize and CATiledLayer size under px x px, maintaining the offset of this rect from the absolute map size for the zoom level in an instance property.

With all that said, we can understand sizeContent a bit better. I’ve read through Apple’s docs, but they don’t seem to explain the behavior I’m seeing: