@implementation WXComponentManager
- (void)_startDisplayLink
{
_displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(_handleDisplayLink)];
[_displayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
}
- (void)_handleDisplayLink
{
WXAssertComponentThread();
[self _layoutAndSyncUI];
}
@end
// incubator-weex/ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m:818
|-[WXComponentManager _handleDisplayLink]
-[WXComponentManager _layoutAndSyncUI]
-[WXComponentManager _layout]
// incubator-weex/ios/sdk/WeexSDK/Sources/Layout/Layout.c:1287
wx_layoutNode (WX_LAYOUT_PREFIX(layoutNode))
#define WX_LAYOUT_NAMESPACE wx_
#define WX_LAYOUT_PREFIX(symbol) WX_NAMESPACE_PREFIX(WX_LAYOUT_NAMESPACE, symbol)
#define layoutNode WX_LAYOUT_PREFIX(layoutNode)
com.taobao.weex.component
wx_layoutNode() at incubator-weex/ios/sdk/WeexSDK/Sources/Layout/Layout.c:1287
-[WXComponentManager _layout]
-[WXComponentManager _layoutAndSyncUI]
-[WXComponentManager _handleDisplayLink]
__clang_call_terminate ()
-[NSRunLoop(NSRunLoop) runMode:beforeDate:] ()
-[WXComponentManager _runLoopThread]
__NSThread__start__ ()
thread_start ()
数据结构
布局流程 图示layoutNodeImpl.png