Disable asyncDataFetching in ASTableView and ASCollectionView init methods.

It's currently unreliable for some use cases that issue editing calls while
content is displayed or being interacted with.  The performance gain is not
sufficient to sacrifice correctness for the clients that hit this issue,
so it will remain off until fully resolved.
This commit is contained in:
Scott Goodson
2015-06-14 19:59:39 -07:00
parent a4a03fdcf4
commit ba5a6e15c0
2 changed files with 20 additions and 6 deletions

View File

@@ -136,6 +136,10 @@ static BOOL _isInterceptedSelector(SEL sel)
{
if (!(self = [super initWithFrame:frame collectionViewLayout:layout]))
return nil;
// FIXME: asyncDataFetching is currently unreliable for some use cases.
// https://github.com/facebook/AsyncDisplayKit/issues/385
asyncDataFetchingEnabled = NO;
ASDisplayNodeAssert([layout isKindOfClass:UICollectionViewFlowLayout.class], @"only flow layouts are currently supported");
@@ -165,8 +169,10 @@ static BOOL _isInterceptedSelector(SEL sel)
return self;
}
-(void)dealloc {
// a little defense move here.
- (void)dealloc
{
// Sometimes the UIKit classes can call back to their delegate even during deallocation.
// This bug might be iOS 7-specific.
super.delegate = nil;
super.dataSource = nil;
}