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
2
votes
1 answer

CATiledLayer, iOS7 tiles not updating

In upgrading from iOS6 to iOS7, I think I've found a bug with CATiledLayer, and I'd like to have it verified by the community before submitting to Apple. The issue is that if you have a UIScrollView with many CATiledLayers within it, the tiles will…
Shaun Budhram
  • 3,690
  • 4
  • 30
  • 41
2
votes
1 answer

CATiledLayer subview causing memory warning and crash

Alright, here's what's happening... I have a UIView subclass, which includes two points (start and end), a CGPath between those two points and lot of UILabels. If I add that UIView subclass as a subview to my scrollview (over top of my CATiledLayer…
Homeschooldev
  • 405
  • 1
  • 7
  • 18
2
votes
0 answers

Rendering a large amount of text within a UIScrollView

I have a UIView in a UIScrollView. The UIScrollView only scrolls vertically, and doesn't zoom. In the UIView's drawRect: method I'm trying to color the background and draw some text. When the text's relatively short both operations work fine. When…
Max
  • 2,760
  • 1
  • 28
  • 47
2
votes
2 answers

A CATiledLayer-enabled UIView with drawRect-defined subviews crashes due to abnormal memory usage

We have an out-of-memory crash on the iPad 3 which we traced to the following scenario: A UIView which uses a CATiledLayer and draws content (say, a PDF) has subviews with their own drawRect methods (which, for example, highlight search results).…
Vladimir Gritsenko
  • 1,669
  • 11
  • 25
1
vote
1 answer

Need drawLayer to draw 3 PDF files to 3 different UIViews

I am loading 3 different PDF files and drying to use drawLayer to draw them into 3 UIviews. This works, but they are all 3 being drawn into the same layer of one UIview. I need them each drawn into their own UIView, but I can't figure out how to…
Redstar
  • 15
  • 5
1
vote
1 answer

CATiledLayer, CALayerDelegate and capturing touch events

How I would go about capturing touch events on a CATiledLayer? I have the following situation where if I change the view layer to a CATiledLayer the view stops capturing TouchesXXX events. Why does this happens and how should I address this…
ademar
  • 774
  • 8
  • 16
1
vote
1 answer

values of levelOfDetail and levelsOfDetailBias to render pdf on CATiledLayer in ios

i am developing a project in which i render PDF on the CATiledLayers.I have Used the CGPdf class methods to render the pdf and succeeded too. I would like to know the values to be used for levelsOfDetail and levelsOfDetailBias for avoiding any…
Dinakar
  • 1,198
  • 15
  • 37
1
vote
1 answer

CATiledLayer crashes when drawing previously prepared CGPath

I am using CATiledLayer as backing layer for my UIView, which I have put inside UIScrollView. In init method of my view I am creating CGPathRef object which draws simple line. When I am trying to draw this path inside drawLayer:inContext it…
Piotr Wach
  • 913
  • 2
  • 9
  • 22
1
vote
1 answer

ios5: drawRect called twice in CATiledLayer for the same Rect

I have a problem with a CATiledLayer. It is working perfect in on iOS 4, but has problems on iOS 5. My Problem ist that drawRect is called twice for the same rect from two different threads at the same time. Since I load images in this call, it…
Bastian
  • 10,403
  • 1
  • 31
  • 40
1
vote
0 answers

PDF and zoom - CATiledLayer

I have a problem, I'm not a programmer but I try to do some app for fun. I try to create a pdf viewer, I create a UIView class like this: - (id)initWithFrame:(CGRect)frame { self = [super initWithFrame:(CGRect)frame]; if (self) { …
francesco.venica
  • 1,703
  • 2
  • 19
  • 54
1
vote
1 answer

ZoomingPDFViewer apple example

I'm trying to understand Apple's example code for the ZoomingPDFViewer. Here are some questions that I have in my understanding of how it works in my mind. I'm not really sure if I understand it correctly. The link for their code is at:…
Crystal
  • 28,460
  • 62
  • 219
  • 393
1
vote
1 answer

Get rid of white tile borders in PhotoScroller

Apple has an iOS sample app called PhotoScroller, which demonstrates CATiledLayer and UIScrollViewer. The sample app shows white boxes around each tile, as a way of illustrating the tiling (i.e. when you zoom in, the tiles represent smaller parts of…
Hank
  • 8,289
  • 12
  • 47
  • 57
1
vote
1 answer

CATiledLayer with animating content

I've got this UIView which is backed by a CATiledLayer. My setup works pretty smooth at the moment but the horror starts when I want to animate certain view objects on this CATiledLayer. I've read that I can force the CATiledLayer to redraw itself…
polyclick
  • 2,704
  • 4
  • 32
  • 58
1
vote
1 answer

Render large CATiledLayer into smaller area

I have a CATiledLayer of size 4096 x 4096 which I want to render into a PNG of size 1024 x 1024 this isnt doing it... -(NSData *)createPNGFormat { UIGraphicsBeginImageContext(CGSizeMake(1024, 1024)); tiledLayer.transform =…
Warren Burton
  • 17,451
  • 3
  • 53
  • 73
1
vote
1 answer

Two visible CATiledLayers causing problems!

This issue has been encountered by someone else, but I've not seen any solutions - see ( http://openradar.appspot.com/6941930 ). I have a UIScrollView whose content view's layer contains two CATiledLayers. One tiled layer draws content quite fast…