| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
That's what stumped me, then, when I tried to do it. I thought it so obvious that the cursor rects should be calculated once for the whole view, and that the scroll view would automatically clip and compensate for that, that I refused to consider any other alternative :-)
Shouldn't we file a bug on that? Recalculating the rects after every scroll is inefficient and inconsistent with other behavior (for text inside a scroll view).
I think it may be that at the time of the first display, the text view isn't fully laid out yet, so calling glyphRangeForBoundingRect will return invalid data. (I ran into this several times when trying to scroll to someplace in the middle). You need to figure out some call to lay out the whole view first, if it isn't already. I forget what I used, but I didn't like it.
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.