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

CATiledLayer drawLayer:inContext: crashing when the view is deallocated while the image to draw is being retrieved

My app crashes when my ViewController gets deallocated while my CATiledLayer is retrieving the image to draw in a background thread. I get a message -[MyViewController respondsToSelector:]: message sent to deallocated instance 0x8f58e00 and the…
Altealice
  • 3,572
  • 3
  • 21
  • 41
4
votes
0 answers

How to fix various MKTileOverlay rendering problems?

I'm currently in the process of converting a custom map from using a CATiledLayer scroll view to using custom map tiles in an MKMapView with an MKTileOverlay. Whilst the CATiledLayer-approach generally works well and looks nicer, you get a lot of…
Robert
  • 5,735
  • 3
  • 40
  • 53
4
votes
3 answers

UIScrollView w/ Large CATiledLayer + Overlay that renders fast

I've been working on something for weeks now (iOS) and I can't seem to figure out an acceptable solution. Requirements Display a 10000x10000 pixel background image Zooming and scrolling responsive Overlay on top that has custom drawing Elements in…
psy
  • 2,791
  • 26
  • 26
4
votes
1 answer

Rendering of a vast grid in a Scrollview container without CATiledLayer?

I'm looking for any advice on ways to have a rather large scrollview (let's say 8192x8192) which is essentially a grid and it has subviews of about 5-100 buttons placed in it. The brute force approach runs out of memory as CALayer seems to be…
sradforth
  • 2,176
  • 2
  • 23
  • 37
4
votes
2 answers

Huge images in iOS app without CATiledLayer?

I have an image at about 7000x6000px. I need this to be in a scrollview/imageView in my app, however this is way to huge for display. It is supposed to be a kind of map. I was hoping to keep the size of the app to the minimum, and the image is just…
Sti
  • 8,275
  • 9
  • 62
  • 124
4
votes
2 answers

How to cache CGContextRef

Unsatisfied with my previous results, I have been asked to create a freehand drawing view that will not blur when zoomed. The only way I can imagine this is possible is to use a CATiledLayer because otherwise it is just too slow when drawing a line…
borrrden
  • 33,256
  • 8
  • 74
  • 109
3
votes
2 answers

iOS CATiledLayer crash

I have a pdf reader app for the iPad where I am using a scrollview to display each page. I keep the page in view and one page either side of the page in view. I have seperate views for portrait and landscape views. The portrait view showns a single…
booboo-a-choo
  • 779
  • 2
  • 8
  • 14
3
votes
1 answer

Objective-C libraries wrapping Core Text / Core Image?

Drawing large scrollable content with CATiledLayer works great in my application. What does not work so great is drawing images and multiline text with the Core Text and Core Image APIs in C. I have the strong feeling that I'm trying to reinvent the…
epologee
  • 11,229
  • 11
  • 68
  • 104
3
votes
1 answer

CATiledLayer : Sample code

I need to load the higher resolution image in UIImageView. After going through approaches seems like,If we load higher resolution images memory usage goes huge [ width * height * 4 ] So to overcome this, need to implement CATiledLayer to support…
Sagar...
  • 1,062
  • 3
  • 15
  • 35
3
votes
1 answer

How to tile a UIWebView?

I need to use tiles with a UIWebview to improve the rendering and scrolling of the content. I tried to find some info in Google but it seems that there are no examples or technical info about this subject. I am doing some test with CATiledLayer…
franky
  • 31
  • 3
3
votes
0 answers

Disable backing store on CAShapeLayer or subclass CALayer to prevent "bogus layer size" warning

I want to overlay a large CATiledLayer with some vector drawing. To get started I'd like to use CAShapeLayer, which is to be replaced by some custom CALayer subclass or delegate. The good part is that it works. However, I get this warning on every…
mvds
  • 45,755
  • 8
  • 102
  • 111
3
votes
1 answer

How do I keep a CALayer, sublayer of a CATiledLayer, from changing it's scale after a zoom?

I have a CATiledLayer that is used to display a PDF page (this CATiledLayer is the layer type of my UIView which is a subview of a UIScrollView). I want to add overlay markers on this page. So I add a sublayer to my CATiledLayer. This sublayer again…
David
  • 9,635
  • 5
  • 62
  • 68
3
votes
1 answer

iOS - CATiledLayer renderInContext: results in distorted image

I have a CATiledLayer-backed UIScrollView which displays a really big image. What I would like to achieve is to capture this view into an UIImage (to use it as background for a progress bar view). There are several problems: at "100%" zoom (the…
Asylum
  • 569
  • 4
  • 21
3
votes
1 answer

Hiding CATiledLayer tile creation

Since in iOS5 Apple silently changed the tileSize limit to 1024. This limit has introduced a visual problem in my CATiledLayer in a scrollview. On Devices that have a larger screen size than the iPhone 5 you can see 2 (iPhone 5) or 4 (iPad) tiles…
David
  • 211
  • 3
  • 12
3
votes
1 answer

CATiledLayer: How to cause reload of just some tiles?

I'm using a tiled layer in a scroll view to display a custom view. The contents of the custom view change periodically, and I know the rectangle in which those changes occur. However I have found that if I do a setNeedsRedisplay only one tile is…
Frank E
  • 53
  • 5
1 2
3
10 11