
git-subtree-dir: submodules/AsyncDisplayKit git-subtree-mainline: d06f423e0ed3df1fed9bd10d79ee312a9179b632 git-subtree-split: 02bedc12816e251ad71777f9d2578329b6d2bef6
1.7 KiB
Executable File
title | layout | permalink | prevPage | nextPage |
---|---|---|---|---|
Synchronous Concurrency | docs | /docs/synchronous-concurrency.html | subtree-rasterization.html | corner-rounding.html |
Both ASViewController
and ASCellNode
have a property called neverShowPlaceholders
.
By setting this property to YES, the main thread will be blocked until display has completed for the cell or view controller's view.
Using this option does not eliminate all of the performance advantages of Texture. Normally, a given node has been preloading and is almost done when it reaches the screen, so the blocking time is very short. Even if the rangeTuningParameters are set to 0 this option outperforms UIKit. While the main thread is waiting, all subnode display executes concurrently, thus synchronous concurrency.
See the NSSpain 2015 talk video for a visual walkthrough of this behavior.
node.neverShowPlaceholders = YES;
node.neverShowPlaceholders = true
Usually, if a cell hasn't finished its display pass before it has reached the screen it will show placeholders until it has drawing its content. Setting this option to YES makes your scrolling node or ASViewController act more like UIKit, and in fact makes Texture scrolling visually indistinguishable from UIKit's, except that it's faster.
