• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Printing a View [solved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing a View [solved]


  • Subject: Re: Printing a View [solved]
  • From: Graham Cox <email@hidden>
  • Date: Thu, 16 Jul 2009 14:34:44 +1000


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 (email@hidden)

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:
This email sent to email@hidden


References: 
 >Re: Printing a View (From: Matt Neuburg <email@hidden>)
 >Re: Printing a View [solved] (From: "K. Darcy Otto" <email@hidden>)

  • Prev by Date: Re: Printing a View [solved]
  • Next by Date: Re: Japanese Language
  • Previous by thread: Re: Printing a View [solved]
  • Next by thread: [iPhone] Multi-touch gestures in table views?
  • Index(es):
    • Date
    • Thread