On 16/07/2009, at 2:23 PM, K. Darcy Otto wrote:
There is probably some more efficient way to check where the page should be broken, but the above implementation works just fine.
Working code is always worth much more than theoretical code, but if your table has a constant height per row, you can simply take the proposed page height modulo the row height to find the amount "over", then subtract it to get the new page height that will fit an exact whole number of lines. It will be much faster than looping if you have many lines.
--Graham _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com