Domanda

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 wheel, writing my own Objective-C wrapper classes around the C functions like CGContextShowTextAtPoint, mirroring everything with CGContextSetTextMatrix(context, CGAffineTransformMakeScale(1, -1)) etc, etc, etc.

I can't use UIKit's context draw methods, because they cause race-condition crashes due to the concurrent background drawing in CATiledLayer.

What Objective-C libraries are already out there, that wrap the Core Text and Image functions for ease of use in a background context?

Cheers, EP.

UPDATE: The way things are going now, I will also settle for hints at a book or online resource other than the Apple Docs that extensively describe CoreText.

È stato utile?

Soluzione

So a week later I have come no closer to finding a library, although the list of libraries at cocoaobjects.com is very comprehensive. I have written my own wrappers now, even though it feels redundant.

What helped a lot was chapter 5 of the book "Beginning iPad development for iPhone developers: Mastering the iPad SDK". It has a very nice introduction to Core Text, especially with the block pointing out the toll-free bridging and the opaque C-types.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top