Re: how to schedule NSLayoutManager
Re: how to schedule NSLayoutManager
- Subject: Re: how to schedule NSLayoutManager
- From: Douglas Davidson <email@hidden>
- Date: Fri, 8 Apr 2005 13:54:19 -0700
On Apr 8, 2005, at 1:47 PM, John Brownlow wrote: How does one 'force' the layout manager to do immediate layout, as opposed to doing it opportunistically when the runloop is idle?
To force immediate layout, simply ask a question that requires layout to answer it. The header is generally pretty clear about which methods will perform layout. For example, calling -lineFragmentRectForGlyphAtIndex:effectiveRange: will force layout for all glyphs up to at least the index specified, and all those in the same line. -textContainerForGlyphAtIndex:effectiveRange: will force layout for all glyphs up to at least the index specified, and with a non-NULL second argument, all those in the same container.
It is certainly open to you to turn off background layout and to use means like these to use your own mechanism to schedule layout at times and for portions of the text that you choose.
Douglas Davidson
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden