WXListComponent.m文件中还包含以下代码:
```
- (void)fixFlicker
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
// FIXME:(ง •̀_•́)ง┻━┻ Stupid scoll view, always reset content offset
to zero by calling _adjustContentOffsetIfNecessary after insert cells.
// So if you pull down list while list is rendering, the list will be
flickering.
// Demo:
// Have to hook _adjustContentOffsetIfNecessary here.
// Any other more elegant way?
NSString *a = @"ntOffsetIfNe";
NSString *b = @"adjustConte";
NSString *originSelector = [NSString stringWithFormat:@"_%@%@cessary",
b, a];
[[self class] weex_swizzle:[WXTableView class]
Method:NSSelectorFromString(originSelector)
withMethod:@selector(fixedFlickerSelector)];
});
}
```
a,b,originSelector三行代码雷到我了!!!为什么要这样写?
[ Full content available at:
https://github.com/apache/incubator-weex/issues/1493 ]
This message was relayed via gitbox.apache.org for [email protected]