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
1
vote
0 answers

How to stop iOS running out of memory when at max zoom level on CATiledLayer?

I have a CATiledLayer inside a UIScrollView. When I pinch to zoom in as far as possible the memory occupied by "other processes" momentarily becomes very high. Sometimes it is enough for jetsam to kill my app and sometimes my iPad will spontaneously…
Tom K
  • 430
  • 5
  • 22
1
vote
0 answers

Basic implementation of CATiledLayer flashing

Because zoomed-in scroll view’s content was fuzzy, I implemented CATiledLayer as this article recommends. I made basic implementation like here I found. Edges become more smooth, but when I moving views with UIPanGestureRecognizer, content starts…
János
  • 32,867
  • 38
  • 193
  • 353
1
vote
1 answer

Why won't my CATiledLayer scroll in a UIScrollView after zooming?

I'm currently having the following problem with CATiledLayer: when the view first loads, the scrolling works perfectly, but then when you zoom once, the view snaps to the anchor point (top left corner) and it can no longer scroll at all. The zooming…
Brodie
  • 3,526
  • 8
  • 42
  • 61
1
vote
2 answers

A way to detect CATiledLayer?

I am using CATiledLayer to display a pdf page.. But the layer do have some time to draw context. Therefore, I try to add an background beside this layer and remove the background after CATiledLayer is successful display.. My question is Is there any…
Kevin
  • 49
  • 6
1
vote
1 answer

CATiledLayer drawing crash

in my application I use have the following views hierarchy: UIView ----UIScrollView --------TiledView (UIView subclass, uses CATiledLayer for drawing) ----OverlayView (UIView subclass) In short - TiledView displays large tiled image I also apply…
Vladimir
  • 170,431
  • 36
  • 387
  • 313
1
vote
2 answers

Display large images on iOS without precut tiles

I'm building a camera application that saves the image data to a single JPEG file in the sandbox. The images average at about 2mb in size. Problem : I cannot display the images in a photo viewer because having a few images in memory throws memory…
Homeschooldev
  • 405
  • 1
  • 7
  • 18
1
vote
0 answers

iOS Best way to draw multiple small images on a large UIView

I have a very, very large UIView, which uses a CATiledLayer. I need to render a lot of small images onto it. These small images are stored in one large image (1024x1024). They may have transparency. At the moment, I use CGImageCreateWithImageInRect…
PhilipG
  • 113
  • 6
1
vote
1 answer

iOS CATiledLayer and TilingView scale problems?

I am using the TilingView from the Apple PhotoScroller example to tile some images. This works great for most of my images, but I have a few get weird scale values. I set the level of detail to 4. My images are all scaled at different values,…
jlgaustin
  • 253
  • 2
  • 10
1
vote
0 answers

CATiledlayer setContents nil give me a crash

I have a uiview with CATiledlayer. I want to reuse the view, so I wrote: self.layer.contents = nil; [self.layer setNeedDisplay]; but I got a random crash. Stack trace follows: 0 libsystem_kernel.dylib 0x3929908c __psynch_cvwait + 24 1…
1
vote
1 answer

IOS replace CATiledLayer with OpenGL

I have a remote controller app, which is using CATiledLayer to display remote desktop. All drawing is made by drawRect: method. I have some really rare crashes when resizing remote screen's resolution. I was trying to debug this issue but nothing…
haawa
  • 3,078
  • 1
  • 26
  • 35
1
vote
0 answers

Message send to deallocated instance of viewcontroller when popviewcontroller

I'm developing an app using ARC with a navigation controller, the first view controller have a button linked to an ibaction that call the push of the second view controller. In the second viewcontroler a button pop the view controller to the first…
1
vote
0 answers

Custom drawing with CATiledLayer creates artifacts

I've got a simple UIView class that draws some text in it's drawRect routine: [mString drawInRect:theFrameRect withFont:theFont]; That looks OK at regular resolution, but when zoomed, it's fuzzy: [image removed, not enough posts] So, I added some…
1
vote
2 answers

Using CATiledLayer to display a large image that has been programmatically split into tiles

I'm running into an issue with using CATiledLayer... I have a large image, a map, that is 4726 x 2701. Basically I'm needing to break this image into tiles and be able to zoom in to view a lot of detail, but also be able to zoom all the way out and…
Homeschooldev
  • 405
  • 1
  • 7
  • 18
1
vote
1 answer

Keeping an image in view after removed from superview

I have extracted some code from the PhotoScroller sample code from Apple to use the CATiledLayer. I have an image of 8000x7000px loaded from internet, in tiles. This is kind of a map-function in my app. I also have two almost identical images, with…
Sti
  • 8,275
  • 9
  • 62
  • 124
1
vote
1 answer

How to draw markers on a zoomable UIView using UIScrollView and CATiledLayer

I want to draw markers on a zoomable UIView that's using UIScrollView and CATiledLayer. I'm currently using the same setup as the PhotoScroller demo app from Apple. I've no problem drawing shapes, but i want them to stay on the same location even…
Niek H.
  • 585
  • 1
  • 5
  • 19