Questions tagged [catiledlayer]

A tiled layer is a Core Animation layer which divides its drawing area into equal, rectangular areas which are drawn separately. It can be used to display very large contents in a space-saving way in a scrollview. It also allows different levels of detail depending on the current zoom level.

CATiledLayer is a subclass of providing a way to asynchronously provide tiles of the layer's content, potentially cached at multiple levels of detail.

As more data is required by the renderer, the layer's drawLayer:inContext: method is called on one or more background threads to supply the drawing operations to fill in one tile of data. The clip bounds and current transformation matrix of the drawing context can be used to determine the bounds and resolution of the tile being requested.

163 questions
3
votes
1 answer

CALayer and view disappeared

I have a large image managed with CATiledLayer (like the Large Image Downsizing iOS sample code). I had a drawing view (UIView overrided with drawing methods) on it but when I zoom a lot, I get the following message and my view…
Seb
  • 545
  • 9
  • 29
3
votes
1 answer

How do I keep scale for sublayer in scaled CALayer

I want to create original map as CATiledLayer. Layer hierarchy is like this above. Map View (CATiledLayer) ---------------------- | Pin (CALayer) | | +-------+ | | | image | | | +-------+ | | | | …
you_got
  • 31
  • 1
3
votes
1 answer

Capturing CATiledLayer content to another layer or image context

I'm trying to screen capture a view that uses CATiledLayers (for animation) but unable to get the image that I want. I tried it on Apple's "PhotoScroller" sample application and added…
Tim
  • 343
  • 2
  • 7
3
votes
1 answer

Background image for CATiledLayer

As you might know, CATiledLayer is used to display large images by showing tiled images at scale suitable for view size. I have CATiledLayer working similar to example which could be found under iOS documentation and I calculate at which row and…
Cvetko
  • 51
  • 1
  • 5
2
votes
1 answer

Intermittent EXC_BAD_ACCESS exception with CATitledLayer

I am having some problems with an app that keeps crashing intermittently. Code below is in a UIView with CATiledLayer as its backing layer: - (UIBezierPath *)path { if(_path == nil){ _path = [UIBezierPath bezierPath]; CGFloat…
GWed
  • 15,167
  • 5
  • 62
  • 99
2
votes
1 answer

CATiledLayer and UIImageView what's the big deal between them?

few months ago I've found a really awesome sample code from Apple site. The sample is called "LargeImageDownsizing" the wonderful thing is that it explain a lot about how image are read from resources and then rendered on screen. Digging into that…
Andrea
  • 26,120
  • 10
  • 85
  • 131
2
votes
1 answer

CATiledLayer isnt working on my iOS5 project

I have created new single view application (developing with iOS 5 sdk and Xcode 4.2), the app is now consisted of app delegate, view controller, scrollView (with CATiledLayer). Storyboard contains ViewController that contains UIScrollView which…
Skodik.o
  • 506
  • 4
  • 21
2
votes
1 answer

CATiledLayer to draw giant UIView with buttons?

I've got this giant UIView with around 600 UIButtons as subviews. The UIView is about 2000 by 2000 pixels and it's a subview on itself for a UIScrollView. I'm trying to implement CATiledLayer as the rendering layer for this giant UIView but I can't…
polyclick
  • 2,704
  • 4
  • 32
  • 58
2
votes
5 answers

CATiledLayer requests the same tile multiple times

Please see this simple CATiledLayer example https://github.com/seanhess/CATiledLayer-Example It consists of one viewController with a hierarchy like this: view: (frame = window size) scrollView: (frame = window size, content size = 200 x 4000) …
Sean Clark Hess
  • 15,859
  • 12
  • 52
  • 100
2
votes
2 answers

How to correctly handle threading when drawing Core Data entity information with CATiledLayer

I'm contemplating how to offload the drawing of a very large Core Data tree structure to CATiledLayer. CATiledLayer seems to be awesome because it performs drawing on a background thread and then fades in tiles whenever they're drawn. However,…
epologee
  • 11,229
  • 11
  • 68
  • 104
2
votes
0 answers

How to display a huge image (size 200G loading from network) in iOS?

My application needs to display a huge image, which is a world map size 200G on the remote server. The display should be draggable and scaleable, which means only the showing part/scale data is needed instantly, AND the around region should be…
Suge
  • 2,808
  • 3
  • 48
  • 79
2
votes
1 answer

fuzzy pixel straddling when drawing in a CATiledLayer on iPhone 4

I'm drawing a line in a CATiledLayer using the following code: - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { CGContextMoveToPoint(ctx, 130, 100.5); CGContextAddLineToPoint(ctx, 160, 100.5); …
vs1400
  • 31
  • 4
2
votes
1 answer

Correct touch location after zooming and panning a pdf drawn in CATiledLayer on top of the UIScrollview in iOS

I am working on Atlas App in which I am displaying map which I can zoom and pan using pdf file. I am using vfr reader for this purpose and it is working fine. I want to detect the touch location so that I can get the correct state selected. I am…
PriyaJain
  • 99
  • 1
  • 2
  • 6
2
votes
0 answers

Problem with UIScrollView and CATiledLayer

I'm working on the example code named PhotoScroller (an Apple's example of WWDC 2010). There is an UIScrollView which return a custom UIView when zooming - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {     return…
Vinzius
  • 2,890
  • 2
  • 26
  • 27
2
votes
1 answer

CATiledLayer changing images with different sizes when zooming (Map related :)

I have an UIScrollView with a UIView which in turn contains a CATiledLayer which displays a map. I have to start with an overview where one can zoom in VERY deep. So I made 4 different images (actually PDFs) with 4 different sizes of the map (the…
Urs
  • 81
  • 2
  • 8