How to use NSString's sizeWithFont and drawInRect to workout how much of a string to draw
I'm drawing multiple 'pages' of imagery using a CGContext in the iOS. I've used sizeWithFont and drawInRect combinations extensively in my app. What I need to do is split a large chunk of text across multiple pages. I can size it and work out whether or not it needs another page but how do I know where to chop it? Do I have to do an ugly loop to check word by word until I find a string length that perfectly fits the page and then chop the string at that point? Is there a smarter way? Any ideas? Thanks. The NSString additions to UIKit for drawing text, you can pre-determine the exact amount of