• 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
NSTextContainer and proposedRect
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextContainer and proposedRect


  • Subject: NSTextContainer and proposedRect
  • From: chaitanya pandit <email@hidden>
  • Date: Fri, 12 Dec 2008 15:20:35 +0530

Hello, list,
I'm finding it hard to understand the way the proposedRect should be handled in the NSTextContainer's lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect : method.
The problem arises in certain cases where i get a weird proposedRect t. Usually the proposedRect that is initially passed, has a zero X origin and a very large width.
But in certain cases, i get a proposedRect like say X=25; Y=18; Width=120; Height=14 even though i didn't return this as the remaining rect in the last call. I don't understand why it's X=25 instead of being 0.
Now considering that my container width is 400, and there is a square hole in the text container that will intersect the proposed rect at X=55; and Width=50, should i divide proposed rect as:


rectToReturn:X=25;Y=18;Width=30;Height=14 and rectRemained:X=105; Y=18; Width=15; Height=14?

Or should the rectRemained extend till the right edge of the text container?

I'd appreciate if some one can help me clearing the concepts.
Thanks,
Chaitanya



_______________________________________________

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


  • Prev by Date: Re: AddressBook Framework, adding multiple records
  • Next by Date: Re: Design for showing ridiculously huge number of images in Table View
  • Previous by thread: odd "image not found"
  • Next by thread: Plug-In Additions to Core Data Model
  • Index(es):
    • Date
    • Thread