catiledlayer

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 custom rotation to that view: tiledView.transform = CGAffineTransformMakeRotation(angle);...

Using NSString's drawAtPoint method in place of CGContextShowGlyphsAtPoint problems

Hi, In my app I'm trying to render text along a path; this is fine for most characters but not for Japanese (or anything non mac-Roman). I've been advised to use [NSString drawAtPoint] which displays the correct characters in my CATiledLayer; however, they dissapear after approximately 5 seconds. In this time I can zoom the layer and th...

Are tile overlays possible with the iPhone's MapKit

I already have a tile source set up for use with the Google Maps JavaScript API. I am trying to translate this for use with the iPhone MapKit. I have correctly implemented the javascript zooming levels into mapkit. Whenever - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated is called, I snap the region to the ...

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 ways to detect the drawing status of CATiledLayer? Thanks for your help. ...

CATiledLayer and setNeedsDisplayInRect update problems

I have a view where I add a CATiledLayer as a sublayer. The view is inserted in a scroll view. When specifically requesting an update by sending setNeedsDisplayInRect: to the sublayer, my application hangs. Anyone more knowledgable on the why? EDIT: If I have a UIView explicitly using a CATiledLayer as a backing layer, calling the UI...

UIScrollView strange zoom behavior when content is a UIView subclass

Hi, I'm experiencing the following: I created a UIView subclass with a CATiledLayer as backing layer by overriding the layerClass method. The layer properties (delegate, tileSize, etc) are set in the initWithFrame: method of the subclass. +(Class)layerClass { return [CATiledLayer class]; } -(id)initWithFrame:(CGRect)frame { i...

How do I remove those rotation artefacts from my CATiledLayer?

Hello all, I have a CATiledLayer into which I render content in the following method - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx I used the QuartzDemo code to draw a pattern. This works very well until I apply a rotation transform to the layer's parentLayer (a UIView): rotated: These zigzag artefacts become w...

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 works in that it will zoom in and out, but it will only zoom to the top left corner. My ...

iPhone: CATiledLayer/UIScrollView wont scroll after zooming and only zooms to anchor point

Here is the problem... I am using CA Tiled Layer to display a large jpg. The view loads okay, and when I go to scroll around, it works fine. However, as soon as I zoom in or out once, it scrolls to the top left (to the anchor point) and will not scroll at all. The zooming works fine, but I just cannot scroll. Here is my code: #import <...

How to have CATiledLayer not block the main thread

I am implementing a CATiledLayer into a UIScrollView. In the CATiledLayer, I have a function to draw the layers like so: - (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx { CGContextTranslateCTM(ctx, 0.0f, 0.0f); CGContextScaleCTM(ctx, 1.0f, -1.0f); CGRect box = CGContextGetClipBoundingBox(ctx); NSData *d...

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 hosts the different marker's layers and acts as a grouping layer. So graphically, I have...

Why isn't my ScrollView/CATiledView zooming properly?

I have a UIScrollView backed by a CATiledLayer. The layer is pulling tiles from a server and displaying them in response to what is requested when drawLayer:inContext is called. Here's what it looks like: -(void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx{ ASIHTTPRequest *mapRequest; WMSServer *root = self.mapLayer.pa...

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 class without luck... Basically, I want to replicate the same that Mobile Safari does with t...

CATiled Layer Question~

Hi guys, Was wondering how to apply the CATiled Layer to a webView rather than a scrollView. Went through a lot of books as well as searches and found absolutely nothing regarding how to successfully apply a CATiled Layer to a webView. The basic functionality is to make the website rendering smoother on a webView. I'd really appreciate ...

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 largest has something like 5700 x 6700px) I add the smallest (the overview) to the CATiled...

CATiledLayer large image crashing app

This somewhat related to another post - but that one got kinda messed up - so I start from scratch: I have a CATiledLayer with a HUGE image in it (5780x6700px). The tiled layer is in a scrollview. When I start to scroll around, everything's fine up to a point where obviously too many tiles have been rendered. Then I get a memory warnin...

improving performance of a CATiledView

I have been looking for a way to improve the performance of my CATiledView. The view takes up nearly the entire screen (i have an iPad and iPhone version).Currently it takes about 12 seconds for the tiles to fill in completely (12 seconds on both devices). I have seen other apps use CATiledView and it take much less time for the tiles to...

Why is this CATiledLayer/PDF code slow?

Here is the code: http://dl.dropbox.com/u/5391413/PDFScroller.zip I took the WWDC 2010 PhotoScroller sample code that implements nested UIScrollViews for zooming, inside a UIScrollView for paging, and swapped out what I thought would be minimal amount of code required for displaying a multi-page PDF instead of images. It works. But it...

Resizing CATiledLayer's Using Scale Transforms vs. Bounds Manipulation

I've got my layer hosted workspace working so that using CATiledLayers for hundreds of images works nicely when the workspace is zoomed out substantially. All the images use lower resolution representations, and my application is much more responsive when panning and zooming large numbers of images. However, within my application I also...

CATiledLayer drawing problems on iPAD.

I am developing an application on iPAD to display pdf. I am using CATiledLayer to draw PDF pages. at a time i am displaying only one page of the pdf.if user clicks next or prev button i am displaying the pages accordingly. I have subclassed the CATiledLayer to make fadeDuration as 0.0. I am facing 2 problems. 1. my application is work...