From c1275526ddfc64985678b6946838c6f12f44d717 Mon Sep 17 00:00:00 2001 From: Max Gu Date: Tue, 14 Jun 2016 10:15:57 -0700 Subject: [PATCH 001/247] Re-enabling HLS video constructed from URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apple claims in the AVFoundationProgramming Guide that HLS videos can be constructed only through URL, but later with iOS 4.3 release notes it claimed to bring updates to how the HLS videos should be initialized, which works with asset too. I’ve tested with both, and it looks like initializing with asset is buggy. --- AsyncDisplayKit/ASVideoNode.mm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 8290e9da4d..6f3ab3e266 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -120,11 +120,16 @@ static NSString * const kStatus = @"status"; { ASDN::MutexLocker l(_videoLock); + AVPlayerItem *playerItem = nil; if (_asset != nil) { - return [[AVPlayerItem alloc] initWithAsset:_asset]; + if ([_asset isKindOfClass:[AVURLAsset class]] && _asset.tracks.count == 0) { + playerItem = [[AVPlayerItem alloc] initWithURL:((AVURLAsset *)_asset).URL]; + } else { + playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; + } } - return nil; + return playerItem; } - (void)prepareToPlayAsset:(AVAsset *)asset withKeys:(NSArray *)requestedKeys @@ -686,4 +691,4 @@ static NSString * const kStatus = @"status"; } @end -#endif \ No newline at end of file +#endif From 062bcf3631de69f596d970c21aa1ce25869d02a2 Mon Sep 17 00:00:00 2001 From: Gareth Reese Date: Tue, 21 Jun 2016 07:51:58 +0100 Subject: [PATCH 002/247] [ASVideoNode] issue #1782 Placeholder images are replaced by a blank placeholder. Now checks the .URL property of the parent class as well as the .image to ensure that new placeholders aren't generated. --- AsyncDisplayKit/ASVideoNode.mm | 4 ++-- examples/Videos/Sample/ViewController.m | 28 ++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 8290e9da4d..95bb35f7dd 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -151,7 +151,7 @@ static NSString * const kStatus = @"status"; self.player = [AVPlayer playerWithPlayerItem:playerItem]; } - if (self.image == nil) { + if (self.image == nil && self.URL == nil) { [self generatePlaceholderImage]; } @@ -284,7 +284,7 @@ static NSString * const kStatus = @"status"; if ([change[NSKeyValueChangeNewKey] integerValue] == AVPlayerItemStatusReadyToPlay) { self.playerState = ASVideoNodePlayerStateReadyToPlay; // If we don't yet have a placeholder image update it now that we should have data available for it - if (self.image == nil) { + if (self.image == nil && self.URL == nil) { [self generatePlaceholderImage]; } } diff --git a/examples/Videos/Sample/ViewController.m b/examples/Videos/Sample/ViewController.m index 43a0fd6755..e2a6e22b88 100644 --- a/examples/Videos/Sample/ViewController.m +++ b/examples/Videos/Sample/ViewController.m @@ -46,6 +46,9 @@ ASVideoNode *simonVideoNode = self.simonVideoNode; [_rootNode addSubnode:simonVideoNode]; + ASVideoNode *hlsVideoNode = self.hlsVideoNode; + [_rootNode addSubnode:hlsVideoNode]; + _rootNode.layoutSpecBlock = ^ASLayoutSpec *(ASDisplayNode * _Nonnull node, ASSizeRange constrainedSize) { guitarVideoNode.layoutPosition = CGPointMake(0, 0); guitarVideoNode.preferredFrameSize = CGSizeMake([UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height/3); @@ -55,8 +58,13 @@ simonVideoNode.layoutPosition = CGPointMake(0, [UIScreen mainScreen].bounds.size.height - ([UIScreen mainScreen].bounds.size.height/3)); simonVideoNode.preferredFrameSize = CGSizeMake([UIScreen mainScreen].bounds.size.width/2, [UIScreen mainScreen].bounds.size.height/3); - return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[guitarVideoNode, nicCageVideoNode, simonVideoNode]]; + + hlsVideoNode.layoutPosition = CGPointMake(0, [UIScreen mainScreen].bounds.size.height/3); + hlsVideoNode.preferredFrameSize = CGSizeMake([UIScreen mainScreen].bounds.size.width/2, [UIScreen mainScreen].bounds.size.height/3); + + return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[guitarVideoNode, nicCageVideoNode, simonVideoNode, hlsVideoNode]]; }; + [self.view addSubnode:_rootNode]; } @@ -117,6 +125,24 @@ return simonVideoNode; } +- (ASVideoNode *)hlsVideoNode; +{ + ASVideoNode *hlsVideoNode = [[ASVideoNode alloc] init]; + + hlsVideoNode.delegate = self; + hlsVideoNode.asset = [AVAsset assetWithURL:[NSURL URLWithString:@"http://devimages.apple.com/iphone/samples/bipbop/gear1/prog_index.m3u8"]]; + hlsVideoNode.gravity = AVLayerVideoGravityResize; + hlsVideoNode.backgroundColor = [UIColor lightGrayColor]; + hlsVideoNode.shouldAutorepeat = YES; + hlsVideoNode.shouldAutoplay = YES; + hlsVideoNode.muted = YES; + + // Placeholder image + hlsVideoNode.URL = [NSURL URLWithString:@"https://upload.wikimedia.org/wikipedia/en/5/52/Testcard_F.jpg"]; + + return hlsVideoNode; +} + - (ASButtonNode *)playButton; { ASButtonNode *playButtonNode = [[ASButtonNode alloc] init]; From 83d610cd54fd1d9e73daf1b94b3a8c988fa943a6 Mon Sep 17 00:00:00 2001 From: George A Date: Tue, 21 Jun 2016 16:13:55 +0200 Subject: [PATCH 003/247] [ASMapNode] Toggle user interaction when liveMap changes (#1753) [ASMapNode] Change map snapshot when updating it with a new region (#1754) [ASMapNode] Commented out code that is causing inaccurate behavior [ASMapNode] Added the ability to zoom in and show annotations, similar to showAnnotations:animated: of MKMapView. Added a basic example for ASMapNode to try out the different changes --- AsyncDisplayKit/ASMapNode.h | 16 + AsyncDisplayKit/ASMapNode.mm | 69 +++- examples/ASMapNode/Podfile | 6 + .../Sample.xcodeproj/project.pbxproj | 377 ++++++++++++++++++ .../xcshareddata/xcschemes/Sample.xcscheme | 91 +++++ examples/ASMapNode/Sample/AppDelegate.h | 26 ++ examples/ASMapNode/Sample/AppDelegate.m | 36 ++ .../AppIcon.appiconset/Contents.json | 38 ++ .../Sample/Base.lproj/LaunchScreen.storyboard | 27 ++ examples/ASMapNode/Sample/Info.plist | 43 ++ examples/ASMapNode/Sample/MapHandlerNode.h | 24 ++ examples/ASMapNode/Sample/MapHandlerNode.m | 262 ++++++++++++ examples/ASMapNode/Sample/ViewController.h | 24 ++ examples/ASMapNode/Sample/ViewController.m | 53 +++ examples/ASMapNode/Sample/main.m | 25 ++ 15 files changed, 1108 insertions(+), 9 deletions(-) create mode 100644 examples/ASMapNode/Podfile create mode 100644 examples/ASMapNode/Sample.xcodeproj/project.pbxproj create mode 100644 examples/ASMapNode/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme create mode 100644 examples/ASMapNode/Sample/AppDelegate.h create mode 100644 examples/ASMapNode/Sample/AppDelegate.m create mode 100644 examples/ASMapNode/Sample/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/ASMapNode/Sample/Base.lproj/LaunchScreen.storyboard create mode 100644 examples/ASMapNode/Sample/Info.plist create mode 100644 examples/ASMapNode/Sample/MapHandlerNode.h create mode 100644 examples/ASMapNode/Sample/MapHandlerNode.m create mode 100644 examples/ASMapNode/Sample/ViewController.h create mode 100644 examples/ASMapNode/Sample/ViewController.m create mode 100644 examples/ASMapNode/Sample/main.m diff --git a/AsyncDisplayKit/ASMapNode.h b/AsyncDisplayKit/ASMapNode.h index f7b7c6c014..80d63d4bb0 100644 --- a/AsyncDisplayKit/ASMapNode.h +++ b/AsyncDisplayKit/ASMapNode.h @@ -14,6 +14,16 @@ NS_ASSUME_NONNULL_BEGIN +typedef NS_OPTIONS(NSUInteger, ASMapNodeShowAnnotationsOptions) +{ + /** The annotations' positions are ignored, use the region or options specified instead. */ + ASMapNodeShowAnnotationsOptionsIgnored = 0, + /** The annotations' positions are used to calculate the region to show in the map, equivalent to showAnnotations:animated. */ + ASMapNodeShowAnnotationsOptionsZoomed = 1 << 0, + /** This will only have an effect if combined with the Zoomed state with liveMap turned on.*/ + ASMapNodeShowAnnotationsOptionsAnimated = 1 << 1 +}; + @interface ASMapNode : ASImageNode /** @@ -54,6 +64,12 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, copy) NSArray> *annotations; +/** + * @abstract This property specifies how to show the annotations. + * @default Default value is ASMapNodeShowAnnotationsIgnored + */ +@property (nonatomic, assign) ASMapNodeShowAnnotationsOptions showAnnotationsOptions; + @end NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index c8c2599b38..ad4371d248 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -24,7 +24,7 @@ MKMapSnapshotter *_snapshotter; BOOL _snapshotAfterLayout; NSArray *_annotations; - CLLocationCoordinate2D _centerCoordinateOfMap; +// CLLocationCoordinate2D _centerCoordinateOfMap; } @end @@ -46,8 +46,9 @@ _needsMapReloadOnBoundsChange = YES; _liveMap = NO; - _centerCoordinateOfMap = kCLLocationCoordinate2DInvalid; +// _centerCoordinateOfMap = kCLLocationCoordinate2DInvalid; _annotations = @[]; + _showAnnotationsOptions = ASMapNodeShowAnnotationsOptionsIgnored; return self; } @@ -55,7 +56,6 @@ { [super didLoad]; if (self.isLiveMap) { - self.userInteractionEnabled = YES; [self addLiveMap]; } } @@ -161,7 +161,18 @@ - (void)setRegion:(MKCoordinateRegion)region { - self.options.region = region; + MKMapSnapshotOptions * __weak oldOptions = self.options; + MKMapSnapshotOptions * options = [[MKMapSnapshotOptions alloc] init]; + options.camera = oldOptions.camera; + options.mapRect = oldOptions.mapRect; + options.mapType = oldOptions.mapType; + options.showsPointsOfInterest = oldOptions.showsPointsOfInterest; + options.showsBuildings = oldOptions.showsBuildings; + options.size = oldOptions.size; + options.scale = oldOptions.scale; + options.region = region; + self.options = options; +// self.options.region = region; } #pragma mark - Snapshotter @@ -257,6 +268,7 @@ - (void)addLiveMap { ASDisplayNodeAssertMainThread(); + self.userInteractionEnabled = YES; if (!_mapView) { __weak ASMapNode *weakSelf = self; _mapView = [[MKMapView alloc] initWithFrame:CGRectZero]; @@ -265,17 +277,23 @@ [_mapView addAnnotations:_annotations]; [weakSelf setNeedsLayout]; [weakSelf.view addSubview:_mapView]; - - if (CLLocationCoordinate2DIsValid(_centerCoordinateOfMap)) { - [_mapView setCenterCoordinate:_centerCoordinateOfMap]; + + if (self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { + BOOL const animated = self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsAnimated; + [_mapView showAnnotations:_mapView.annotations animated:animated]; } + +// if (CLLocationCoordinate2DIsValid(_centerCoordinateOfMap)) { +// [_mapView setCenterCoordinate:_centerCoordinateOfMap]; +// } } } - (void)removeLiveMap { + self.userInteractionEnabled = false; // FIXME: With MKCoordinateRegion, isn't the center coordinate fully specified? Do we need this? - _centerCoordinateOfMap = _mapView.centerCoordinate; +// _centerCoordinateOfMap = _mapView.centerCoordinate; [_mapView removeFromSuperview]; _mapView = nil; } @@ -295,11 +313,44 @@ if (self.isLiveMap) { [_mapView removeAnnotations:_mapView.annotations]; [_mapView addAnnotations:annotations]; + + if (self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { + BOOL const animated = self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsAnimated; + [_mapView showAnnotations:_mapView.annotations animated:animated]; + } } else { - [self takeSnapshot]; + if (self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { + self.region = [self regionToFitAnnotations:annotations]; + } + else { + [self takeSnapshot]; + } } } +-(MKCoordinateRegion)regionToFitAnnotations:(NSArray> *)annotations +{ + if([annotations count] == 0) + return MKCoordinateRegionForMapRect(MKMapRectWorld); + + CLLocationCoordinate2D topLeftCoord = CLLocationCoordinate2DMake(-90, 180); + CLLocationCoordinate2D bottomRightCoord = CLLocationCoordinate2DMake(90, -180); + + for (id annotation in _annotations) { + topLeftCoord = CLLocationCoordinate2DMake(fmax(topLeftCoord.latitude, annotation.coordinate.latitude), + fmin(topLeftCoord.longitude, annotation.coordinate.longitude)); + bottomRightCoord = CLLocationCoordinate2DMake(fmin(bottomRightCoord.latitude, annotation.coordinate.latitude), + fmax(bottomRightCoord.longitude, annotation.coordinate.longitude)); + } + + MKCoordinateRegion region = MKCoordinateRegionMake(CLLocationCoordinate2DMake(topLeftCoord.latitude - (topLeftCoord.latitude - bottomRightCoord.latitude) * 0.5, + topLeftCoord.longitude + (bottomRightCoord.longitude - topLeftCoord.longitude) * 0.5), + MKCoordinateSpanMake(fabs(topLeftCoord.latitude - bottomRightCoord.latitude) * 2, + fabs(bottomRightCoord.longitude - topLeftCoord.longitude) * 2)); + + return region; +} + #pragma mark - Layout - (void)setSnapshotSizeWithReloadIfNeeded:(CGSize)snapshotSize { diff --git a/examples/ASMapNode/Podfile b/examples/ASMapNode/Podfile new file mode 100644 index 0000000000..5c30ce798e --- /dev/null +++ b/examples/ASMapNode/Podfile @@ -0,0 +1,6 @@ +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '7.0' +target 'Sample' do + pod 'AsyncDisplayKit', :path => '../..' +end + diff --git a/examples/ASMapNode/Sample.xcodeproj/project.pbxproj b/examples/ASMapNode/Sample.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..b7da6bb298 --- /dev/null +++ b/examples/ASMapNode/Sample.xcodeproj/project.pbxproj @@ -0,0 +1,377 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 5CF3EF5E344946731D4F13F2 /* libPods-Sample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 465082D55CCF1B0CB1AEBACC /* libPods-Sample.a */; }; + 5E5E62841D13F39400D81E38 /* MapHandlerNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E5E62831D13F39400D81E38 /* MapHandlerNode.m */; }; + 694993D21C8B334F00491CA5 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 694993D11C8B334F00491CA5 /* main.m */; }; + 694993D51C8B334F00491CA5 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 694993D41C8B334F00491CA5 /* AppDelegate.m */; }; + 694993D81C8B334F00491CA5 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 694993D71C8B334F00491CA5 /* ViewController.m */; }; + 694993DD1C8B334F00491CA5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 694993DC1C8B334F00491CA5 /* Assets.xcassets */; }; + 694993E01C8B334F00491CA5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 694993DE1C8B334F00491CA5 /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 15AD337503831C4D33FF8B3A /* Pods-Sample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig"; sourceTree = ""; }; + 465082D55CCF1B0CB1AEBACC /* libPods-Sample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Sample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 5E5E62821D13F39400D81E38 /* MapHandlerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapHandlerNode.h; sourceTree = ""; }; + 5E5E62831D13F39400D81E38 /* MapHandlerNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapHandlerNode.m; sourceTree = ""; }; + 694993CD1C8B334F00491CA5 /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 694993D11C8B334F00491CA5 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 694993D31C8B334F00491CA5 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 694993D41C8B334F00491CA5 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 694993D61C8B334F00491CA5 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 694993D71C8B334F00491CA5 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 694993DC1C8B334F00491CA5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 694993DF1C8B334F00491CA5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 694993E11C8B334F00491CA5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 97482F27BE2F7583EFE1BC2C /* Pods-Sample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.release.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 694993CA1C8B334F00491CA5 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5CF3EF5E344946731D4F13F2 /* libPods-Sample.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 0DFDB4376BA084DAC7C1976E /* Pods */ = { + isa = PBXGroup; + children = ( + 15AD337503831C4D33FF8B3A /* Pods-Sample.debug.xcconfig */, + 97482F27BE2F7583EFE1BC2C /* Pods-Sample.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 478C8D7C412DCBDFE14640D8 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 465082D55CCF1B0CB1AEBACC /* libPods-Sample.a */, + ); + name = Frameworks; + sourceTree = ""; + }; + 694993C41C8B334F00491CA5 = { + isa = PBXGroup; + children = ( + 694993CF1C8B334F00491CA5 /* Sample */, + 694993CE1C8B334F00491CA5 /* Products */, + 0DFDB4376BA084DAC7C1976E /* Pods */, + 478C8D7C412DCBDFE14640D8 /* Frameworks */, + ); + sourceTree = ""; + }; + 694993CE1C8B334F00491CA5 /* Products */ = { + isa = PBXGroup; + children = ( + 694993CD1C8B334F00491CA5 /* Sample.app */, + ); + name = Products; + sourceTree = ""; + }; + 694993CF1C8B334F00491CA5 /* Sample */ = { + isa = PBXGroup; + children = ( + 694993D31C8B334F00491CA5 /* AppDelegate.h */, + 694993D41C8B334F00491CA5 /* AppDelegate.m */, + 694993D61C8B334F00491CA5 /* ViewController.h */, + 694993D71C8B334F00491CA5 /* ViewController.m */, + 5E5E62821D13F39400D81E38 /* MapHandlerNode.h */, + 5E5E62831D13F39400D81E38 /* MapHandlerNode.m */, + 694993DC1C8B334F00491CA5 /* Assets.xcassets */, + 694993D01C8B334F00491CA5 /* Supporting Files */, + ); + path = Sample; + sourceTree = ""; + }; + 694993D01C8B334F00491CA5 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 694993E11C8B334F00491CA5 /* Info.plist */, + 694993DE1C8B334F00491CA5 /* LaunchScreen.storyboard */, + 694993D11C8B334F00491CA5 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 694993CC1C8B334F00491CA5 /* Sample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 694993E41C8B334F00491CA5 /* Build configuration list for PBXNativeTarget "Sample" */; + buildPhases = ( + 80035273449C25F4B2E1454F /* [CP] Check Pods Manifest.lock */, + 694993C91C8B334F00491CA5 /* Sources */, + 694993CA1C8B334F00491CA5 /* Frameworks */, + 694993CB1C8B334F00491CA5 /* Resources */, + 06EE2E0ABEB6289D4775A867 /* [CP] Copy Pods Resources */, + 23FC03B282CBD9014D868DF6 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Sample; + productName = Sample; + productReference = 694993CD1C8B334F00491CA5 /* Sample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 694993C51C8B334F00491CA5 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = AsyncDisplayKit; + TargetAttributes = { + 694993CC1C8B334F00491CA5 = { + CreatedOnToolsVersion = 7.2.1; + }; + }; + }; + buildConfigurationList = 694993C81C8B334F00491CA5 /* Build configuration list for PBXProject "Sample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 694993C41C8B334F00491CA5; + productRefGroup = 694993CE1C8B334F00491CA5 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 694993CC1C8B334F00491CA5 /* Sample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 694993CB1C8B334F00491CA5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 694993E01C8B334F00491CA5 /* LaunchScreen.storyboard in Resources */, + 694993DD1C8B334F00491CA5 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 06EE2E0ABEB6289D4775A867 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 23FC03B282CBD9014D868DF6 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 80035273449C25F4B2E1454F /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 694993C91C8B334F00491CA5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5E5E62841D13F39400D81E38 /* MapHandlerNode.m in Sources */, + 694993D81C8B334F00491CA5 /* ViewController.m in Sources */, + 694993D51C8B334F00491CA5 /* AppDelegate.m in Sources */, + 694993D21C8B334F00491CA5 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 694993DE1C8B334F00491CA5 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 694993DF1C8B334F00491CA5 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 694993E21C8B334F00491CA5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 694993E31C8B334F00491CA5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 694993E51C8B334F00491CA5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 15AD337503831C4D33FF8B3A /* Pods-Sample.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Sample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.AsyncDisplayKit.Sample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 694993E61C8B334F00491CA5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 97482F27BE2F7583EFE1BC2C /* Pods-Sample.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Sample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.AsyncDisplayKit.Sample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 694993C81C8B334F00491CA5 /* Build configuration list for PBXProject "Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 694993E21C8B334F00491CA5 /* Debug */, + 694993E31C8B334F00491CA5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 694993E41C8B334F00491CA5 /* Build configuration list for PBXNativeTarget "Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 694993E51C8B334F00491CA5 /* Debug */, + 694993E61C8B334F00491CA5 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 694993C51C8B334F00491CA5 /* Project object */; +} diff --git a/examples/ASMapNode/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/ASMapNode/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..c00064c54d --- /dev/null +++ b/examples/ASMapNode/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/ASMapNode/Sample/AppDelegate.h b/examples/ASMapNode/Sample/AppDelegate.h new file mode 100644 index 0000000000..4591d34854 --- /dev/null +++ b/examples/ASMapNode/Sample/AppDelegate.h @@ -0,0 +1,26 @@ +// +// AppDelegate.h +// Sample +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + + +@end + diff --git a/examples/ASMapNode/Sample/AppDelegate.m b/examples/ASMapNode/Sample/AppDelegate.m new file mode 100644 index 0000000000..e56bcd4ec0 --- /dev/null +++ b/examples/ASMapNode/Sample/AppDelegate.m @@ -0,0 +1,36 @@ +// +// AppDelegate.m +// Sample +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#import "AppDelegate.h" +#import "ViewController.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + // Override point for customization after application launch. + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + self.window.backgroundColor = [UIColor whiteColor]; + self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[ViewController new]]; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/examples/ASMapNode/Sample/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples/ASMapNode/Sample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..118c98f746 --- /dev/null +++ b/examples/ASMapNode/Sample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/examples/ASMapNode/Sample/Base.lproj/LaunchScreen.storyboard b/examples/ASMapNode/Sample/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f4fc7f7736 --- /dev/null +++ b/examples/ASMapNode/Sample/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/ASMapNode/Sample/Info.plist b/examples/ASMapNode/Sample/Info.plist new file mode 100644 index 0000000000..6105445463 --- /dev/null +++ b/examples/ASMapNode/Sample/Info.plist @@ -0,0 +1,43 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples/ASMapNode/Sample/MapHandlerNode.h b/examples/ASMapNode/Sample/MapHandlerNode.h new file mode 100644 index 0000000000..f51924419f --- /dev/null +++ b/examples/ASMapNode/Sample/MapHandlerNode.h @@ -0,0 +1,24 @@ +// +// MapHandlerNode.h +// Sample +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#import + +@interface MapHandlerNode : ASDisplayNode + + +@end + diff --git a/examples/ASMapNode/Sample/MapHandlerNode.m b/examples/ASMapNode/Sample/MapHandlerNode.m new file mode 100644 index 0000000000..e3308291c6 --- /dev/null +++ b/examples/ASMapNode/Sample/MapHandlerNode.m @@ -0,0 +1,262 @@ +// +// MapHandlerNode.m +// Sample +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#import "MapHandlerNode.h" + +#import + +#import +#import +#import + +#import +#import + +@interface MapHandlerNode () + +@property (nonatomic, strong) ASEditableTextNode * latEditableNode; +@property (nonatomic, strong) ASEditableTextNode * lonEditableNode; +@property (nonatomic, strong) ASEditableTextNode * deltaLatEditableNode; +@property (nonatomic, strong) ASEditableTextNode * deltaLonEditableNode; +@property (nonatomic, strong) ASButtonNode * updateRegionButton; +@property (nonatomic, strong) ASButtonNode * liveMapToggleButton; +@property (nonatomic, strong) ASMapNode * mapNode; + +@end + +@implementation MapHandlerNode + +#pragma mark - Lifecycle + +- (instancetype)init +{ + if (!(self = [super init])) + return nil; + + _latEditableNode = [[ASEditableTextNode alloc] init]; + _lonEditableNode = [[ASEditableTextNode alloc] init]; + _deltaLatEditableNode = [[ASEditableTextNode alloc] init]; + _deltaLonEditableNode = [[ASEditableTextNode alloc] init]; + + _updateRegionButton = [[ASButtonNode alloc] init]; + _liveMapToggleButton = [[ASButtonNode alloc] init]; + _mapNode = [[ASMapNode alloc] init]; + + [self addSubnode:_latEditableNode]; + [self addSubnode:_lonEditableNode]; + [self addSubnode:_deltaLatEditableNode]; + [self addSubnode:_deltaLonEditableNode]; + + [self addSubnode:_updateRegionButton]; + [self addSubnode:_liveMapToggleButton]; + [self addSubnode:_mapNode]; + + return self; +} + +- (void)didLoad +{ + [super didLoad]; + + _latEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", _mapNode.region.center.latitude]]; + _lonEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", _mapNode.region.center.longitude]]; + _deltaLatEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", _mapNode.region.span.latitudeDelta]]; + _deltaLonEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", _mapNode.region.span.longitudeDelta]]; + + [self configureEditableNodes:_latEditableNode]; + [self configureEditableNodes:_lonEditableNode]; + [self configureEditableNodes:_deltaLatEditableNode]; + [self configureEditableNodes:_deltaLonEditableNode]; + + _mapNode.mapDelegate = self; + + [_updateRegionButton setTitle:@"Update Region" withFont:nil withColor:[UIColor blueColor] forState:ASControlStateNormal]; + [_updateRegionButton setTitle:@"Update Region" withFont:[UIFont systemFontOfSize:14] withColor:[UIColor blueColor] forState:ASControlStateHighlighted]; + [_updateRegionButton addTarget:self action:@selector(updateRegion) forControlEvents:ASControlNodeEventTouchUpInside]; + [_liveMapToggleButton setTitle:[self liveMapStr] withFont:nil withColor:[UIColor blueColor] forState:ASControlStateNormal]; + [_liveMapToggleButton setTitle:[self liveMapStr] withFont:[UIFont systemFontOfSize:14] withColor:[UIColor blueColor] forState:ASControlStateHighlighted]; + [_liveMapToggleButton addTarget:self action:@selector(toggleLiveMap) forControlEvents:ASControlNodeEventTouchUpInside]; +} + +#pragma mark - Layout + +- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize +{ +#define SPACING 5 +#define HEIGHT 30 + CGSize preferredSize = CGSizeMake(constrainedSize.max.width * 0.3, HEIGHT); + + _latEditableNode.preferredFrameSize = _lonEditableNode.preferredFrameSize = preferredSize; + _deltaLatEditableNode.preferredFrameSize = _deltaLonEditableNode.preferredFrameSize = preferredSize; + _updateRegionButton.preferredFrameSize = _liveMapToggleButton.preferredFrameSize = preferredSize; + + _latEditableNode.flexGrow = _lonEditableNode.flexGrow = true; + _deltaLatEditableNode.flexGrow = _deltaLonEditableNode.flexGrow = true; + _updateRegionButton.flexGrow = _liveMapToggleButton.flexGrow = true; + + _mapNode.flexGrow = true; + + ASStackLayoutSpec * lonlatSpec = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionHorizontal + spacing:SPACING + justifyContent:ASStackLayoutJustifyContentStart + alignItems:ASStackLayoutAlignItemsCenter + children:@[_latEditableNode, _lonEditableNode]]; + lonlatSpec.flexGrow = true; + + ASStackLayoutSpec * deltaLonlatSpec = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionHorizontal + spacing:SPACING + justifyContent:ASStackLayoutJustifyContentStart + alignItems:ASStackLayoutAlignItemsCenter + children:@[_deltaLatEditableNode, _deltaLonEditableNode]]; + deltaLonlatSpec.flexGrow = true; + + ASStackLayoutSpec * lonlatConfigSpec = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionVertical + spacing:SPACING + justifyContent:ASStackLayoutJustifyContentStart + alignItems:ASStackLayoutAlignItemsStretch + children:@[lonlatSpec, deltaLonlatSpec]]; + lonlatConfigSpec.flexGrow = true; + + ASStackLayoutSpec * buttonsSpec = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionVertical + spacing:SPACING + justifyContent:ASStackLayoutJustifyContentStart + alignItems:ASStackLayoutAlignItemsStretch + children:@[_updateRegionButton, _liveMapToggleButton]]; + buttonsSpec.flexGrow = true; + + ASStackLayoutSpec * dashboardSpec = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionHorizontal + spacing:SPACING + justifyContent:ASStackLayoutJustifyContentStart + alignItems:ASStackLayoutAlignItemsStretch + children:@[lonlatConfigSpec, buttonsSpec]]; + dashboardSpec.flexGrow = true; + + ASInsetLayoutSpec * insetSpec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:UIEdgeInsetsMake(20, 10, 0, 10) child:dashboardSpec]; + + ASStackLayoutSpec * layoutSpec = [ASStackLayoutSpec stackLayoutSpecWithDirection:ASStackLayoutDirectionVertical + spacing:SPACING + justifyContent:ASStackLayoutJustifyContentStart + alignItems:ASStackLayoutAlignItemsStretch + children:@[insetSpec, _mapNode ]]; + return layoutSpec; +} + +#pragma mark - Button actions + +-(void)updateRegion +{ + NSNumberFormatter *f = [[NSNumberFormatter alloc] init]; + f.numberStyle = NSNumberFormatterDecimalStyle; + + double const lat = [f numberFromString:_latEditableNode.attributedText.string].doubleValue; + double const lon = [f numberFromString:_lonEditableNode.attributedText.string].doubleValue; + double const deltaLat = [f numberFromString:_deltaLatEditableNode.attributedText.string].doubleValue; + double const deltaLon = [f numberFromString:_deltaLonEditableNode.attributedText.string].doubleValue; + + MKCoordinateRegion region = MKCoordinateRegionMake(CLLocationCoordinate2DMake(lat, lon), + MKCoordinateSpanMake(deltaLat, deltaLon)); + + _mapNode.region = region; + +// MKMapSnapshotOptions * __weak oldOptions = _mapNode.options; +// MKMapSnapshotOptions * options = [[MKMapSnapshotOptions alloc] init]; +// options.camera = oldOptions.camera; +// options.mapRect = oldOptions.mapRect; +// options.mapType = oldOptions.mapType; +// options.showsPointsOfInterest = oldOptions.showsPointsOfInterest; +// options.showsBuildings = oldOptions.showsBuildings; +// options.size = oldOptions.size; +// options.scale = oldOptions.scale; +// options.region = region; +// _mapNode.options = options; + + NSLog(@"Region updated"); +} + +-(void)toggleLiveMap +{ + _mapNode.liveMap = !_mapNode.liveMap; + NSString * const liveMapStr = [self liveMapStr]; + [_liveMapToggleButton setTitle:liveMapStr withFont:nil withColor:[UIColor blueColor] forState:ASControlStateNormal]; + [_liveMapToggleButton setTitle:liveMapStr withFont:[UIFont systemFontOfSize:14] withColor:[UIColor blueColor] forState:ASControlStateHighlighted]; + NSLog(@"UserInteractionEnabled: %i", _mapNode.userInteractionEnabled); +} + +#pragma mark - Helpers + +-(NSString *)liveMapStr +{ + return _mapNode.liveMap ? @"Live Map is ON" : @"Live Map is OFF"; +} + +-(void)configureEditableNodes:(ASEditableTextNode *)node +{ + node.returnKeyType = node == _deltaLonEditableNode ? UIReturnKeyDone : UIReturnKeyNext; + node.delegate = self; +} + +#pragma mark - ASEditableTextNodeDelegate + +- (BOOL)editableTextNode:(ASEditableTextNode *)editableTextNode shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text +{ + if([text isEqualToString:@"\n"]) { + if(editableTextNode == _latEditableNode) + [_lonEditableNode becomeFirstResponder]; + else if(editableTextNode == _lonEditableNode) + [_deltaLatEditableNode becomeFirstResponder]; + else if(editableTextNode == _deltaLatEditableNode) + [_deltaLonEditableNode becomeFirstResponder]; + else if(editableTextNode == _deltaLonEditableNode) { + [_deltaLonEditableNode resignFirstResponder]; + [self updateRegion]; + } + return NO; + } + + NSMutableCharacterSet * s = [NSMutableCharacterSet characterSetWithCharactersInString:@".-"]; + [s formUnionWithCharacterSet:[NSCharacterSet decimalDigitCharacterSet]]; + [s invert]; + + NSRange r = [text rangeOfCharacterFromSet:s]; + if(r.location != NSNotFound) { + return NO; + } + + if([editableTextNode.attributedText.string rangeOfString:@"."].location != NSNotFound && + [text rangeOfString:@"."].location != NSNotFound) { + return NO; + } + + if ([editableTextNode.attributedText.string rangeOfString:@"-"].location != NSNotFound && + [text rangeOfString:@"-"].location != NSNotFound && + range.location > 0) { + return NO; + } + + return YES; +} + +#pragma mark - MKMapViewDelegate + +- (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated { + _latEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", mapView.region.center.latitude]]; + _lonEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", mapView.region.center.longitude]]; + _deltaLatEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", mapView.region.span.latitudeDelta]]; + _deltaLonEditableNode.attributedText = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%f", mapView.region.span.longitudeDelta]]; +} + +@end diff --git a/examples/ASMapNode/Sample/ViewController.h b/examples/ASMapNode/Sample/ViewController.h new file mode 100644 index 0000000000..c2a4b5f166 --- /dev/null +++ b/examples/ASMapNode/Sample/ViewController.h @@ -0,0 +1,24 @@ +// +// ViewController.h +// Sample +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#import + +@interface ViewController : ASViewController + + +@end + diff --git a/examples/ASMapNode/Sample/ViewController.m b/examples/ASMapNode/Sample/ViewController.m new file mode 100644 index 0000000000..53967e2035 --- /dev/null +++ b/examples/ASMapNode/Sample/ViewController.m @@ -0,0 +1,53 @@ +// +// ViewController.m +// Sample +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#import "ViewController.h" + +#import "MapHandlerNode.h" + +@interface ViewController () + +@end + +@implementation ViewController + + +#pragma mark - Lifecycle + +- (instancetype)init +{ + self = [super initWithNode:[[MapHandlerNode alloc] init]]; + if (self == nil) { return self; } + + return self; +} + +#pragma mark - UIViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + +} + +- (void)viewWillAppear:(BOOL)animated +{ + [super viewWillAppear:animated]; + self.navigationController.navigationBarHidden = true; +} + +@end diff --git a/examples/ASMapNode/Sample/main.m b/examples/ASMapNode/Sample/main.m new file mode 100644 index 0000000000..791ef4b743 --- /dev/null +++ b/examples/ASMapNode/Sample/main.m @@ -0,0 +1,25 @@ +// +// main.m +// Sample +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +// FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} From d850057916d0ff5d7669f99dfa9c4b41548b7d93 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Thu, 23 Jun 2016 16:25:48 -0700 Subject: [PATCH 004/247] [Travis CI] move carthageBuildTest to examples_extra to avoid Travis error --- {examples => examples_extra}/CarthageBuildTest/Cartfile | 0 .../CarthageBuildTest/CarthageExample/AppDelegate.h | 0 .../CarthageBuildTest/CarthageExample/AppDelegate.m | 0 .../Assets.xcassets/AppIcon.appiconset/Contents.json | 0 .../CarthageExample/Base.lproj/LaunchScreen.storyboard | 0 .../CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard | 0 .../CarthageBuildTest/CarthageExample/Info.plist | 0 .../CarthageBuildTest/CarthageExample/ViewController.h | 0 .../CarthageBuildTest/CarthageExample/ViewController.m | 0 .../CarthageBuildTest/CarthageExample/main.m | 0 {examples => examples_extra}/CarthageBuildTest/README.md | 0 .../CarthageBuildTest/Sample.xcodeproj/project.pbxproj | 0 .../Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata | 0 .../project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings | 0 .../Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename {examples => examples_extra}/CarthageBuildTest/Cartfile (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/AppDelegate.h (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/AppDelegate.m (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/Info.plist (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/ViewController.h (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/ViewController.m (100%) rename {examples => examples_extra}/CarthageBuildTest/CarthageExample/main.m (100%) rename {examples => examples_extra}/CarthageBuildTest/README.md (100%) rename {examples => examples_extra}/CarthageBuildTest/Sample.xcodeproj/project.pbxproj (100%) rename {examples => examples_extra}/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename {examples => examples_extra}/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (100%) rename {examples => examples_extra}/CarthageBuildTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme (100%) diff --git a/examples/CarthageBuildTest/Cartfile b/examples_extra/CarthageBuildTest/Cartfile similarity index 100% rename from examples/CarthageBuildTest/Cartfile rename to examples_extra/CarthageBuildTest/Cartfile diff --git a/examples/CarthageBuildTest/CarthageExample/AppDelegate.h b/examples_extra/CarthageBuildTest/CarthageExample/AppDelegate.h similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/AppDelegate.h rename to examples_extra/CarthageBuildTest/CarthageExample/AppDelegate.h diff --git a/examples/CarthageBuildTest/CarthageExample/AppDelegate.m b/examples_extra/CarthageBuildTest/CarthageExample/AppDelegate.m similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/AppDelegate.m rename to examples_extra/CarthageBuildTest/CarthageExample/AppDelegate.m diff --git a/examples/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json b/examples_extra/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json rename to examples_extra/CarthageBuildTest/CarthageExample/Assets.xcassets/AppIcon.appiconset/Contents.json diff --git a/examples/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard b/examples_extra/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard rename to examples_extra/CarthageBuildTest/CarthageExample/Base.lproj/LaunchScreen.storyboard diff --git a/examples/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard b/examples_extra/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard rename to examples_extra/CarthageBuildTest/CarthageExample/Base.lproj/Main.storyboard diff --git a/examples/CarthageBuildTest/CarthageExample/Info.plist b/examples_extra/CarthageBuildTest/CarthageExample/Info.plist similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/Info.plist rename to examples_extra/CarthageBuildTest/CarthageExample/Info.plist diff --git a/examples/CarthageBuildTest/CarthageExample/ViewController.h b/examples_extra/CarthageBuildTest/CarthageExample/ViewController.h similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/ViewController.h rename to examples_extra/CarthageBuildTest/CarthageExample/ViewController.h diff --git a/examples/CarthageBuildTest/CarthageExample/ViewController.m b/examples_extra/CarthageBuildTest/CarthageExample/ViewController.m similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/ViewController.m rename to examples_extra/CarthageBuildTest/CarthageExample/ViewController.m diff --git a/examples/CarthageBuildTest/CarthageExample/main.m b/examples_extra/CarthageBuildTest/CarthageExample/main.m similarity index 100% rename from examples/CarthageBuildTest/CarthageExample/main.m rename to examples_extra/CarthageBuildTest/CarthageExample/main.m diff --git a/examples/CarthageBuildTest/README.md b/examples_extra/CarthageBuildTest/README.md similarity index 100% rename from examples/CarthageBuildTest/README.md rename to examples_extra/CarthageBuildTest/README.md diff --git a/examples/CarthageBuildTest/Sample.xcodeproj/project.pbxproj b/examples_extra/CarthageBuildTest/Sample.xcodeproj/project.pbxproj similarity index 100% rename from examples/CarthageBuildTest/Sample.xcodeproj/project.pbxproj rename to examples_extra/CarthageBuildTest/Sample.xcodeproj/project.pbxproj diff --git a/examples/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples_extra/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from examples/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to examples_extra/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/examples/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/examples_extra/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings similarity index 100% rename from examples/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings rename to examples_extra/CarthageBuildTest/Sample.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings diff --git a/examples/CarthageBuildTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples_extra/CarthageBuildTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme similarity index 100% rename from examples/CarthageBuildTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme rename to examples_extra/CarthageBuildTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme From 997d37dc83feeb03d2fccda76a8bec4b2c92bbc5 Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 23 Jun 2016 20:07:45 -0700 Subject: [PATCH 005/247] [ASEnvironment] Don't relayout as a result of clearing a traitCollection's context (#1759) * Don't relayout as a result of clearing a traitCollection's context I'm not completely sure this change is the best solution. Here is context: An ASEnvironmentTraitCollection has a pointer to an optional context that an ASVC is the owner of. When the ASVC is dealloc'ed, we go through all subnodes of the VC and clear out the context so that the struct isn't holding on to a garbage pointer. Setting the traitCollection on ASCollectionNode/ASTableNode causes the cells to relayout if the trait collection changed (this is a special case for these two nodes since their cells are not actually subnodes). Setting the context to nil registered as a trait collection change and was causing a layout even as we were dealloc'ing the VC. The logic I'm implementing here is: If the trait collection changed AND the displayContext did not, then we should relayout. If the trait collection changed AND the new displayContext is non-nil then we should layout In the case where the trait collection change was caused soley by the displayContext going from non-nil to nil, then we should NOT layout. ``` // At this point we know that the two traits collections are NOT equal for some reason BOOL needsLayout = (oldTraits.displayContext == currentTraits.displayContext) || currentTraits.displayContext != nil; ``` Is there a better place/safer way to do this? * removed extra setNeedsLayout call --- AsyncDisplayKit/Details/ASEnvironment.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index 6c395aa18e..e267de1e8a 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -147,6 +147,9 @@ ASDISPLAYNODE_EXTERN_C_END // // If there is any new downward propagating state, it should be added to this define. // +// If the only change in a trait collection is that its dislplayContext has gone from non-nil to nil, +// assume that we are clearing the context as part of a ASVC dealloc and do not trigger a layout. +// // This logic is used in both ASCollectionNode and ASTableNode #define ASEnvironmentCollectionTableSetEnvironmentState(lock) \ - (void)setEnvironmentState:(ASEnvironmentState)environmentState\ @@ -156,12 +159,16 @@ ASDISPLAYNODE_EXTERN_C_END [super setEnvironmentState:environmentState];\ ASEnvironmentTraitCollection currentTraits = environmentState.environmentTraitCollection;\ if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(currentTraits, oldTraits) == NO) {\ + /* Must dispatch to main for self.view && [self.view.dataController completedNodes]*/ \ ASPerformBlockOnMainThread(^{\ + BOOL needsLayout = (oldTraits.displayContext == currentTraits.displayContext) || currentTraits.displayContext != nil;\ NSArray *> *completedNodes = [self.view.dataController completedNodes];\ for (NSArray *sectionArray in completedNodes) {\ for (ASCellNode *cellNode in sectionArray) {\ ASEnvironmentStatePropagateDown(cellNode, currentTraits);\ - [cellNode setNeedsLayout];\ + if (needsLayout) {\ + [cellNode setNeedsLayout];\ + }\ }\ }\ });\ From 457e08005f3c1e03e73447fe25825c24eb31e7f1 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 23 Jun 2016 21:08:44 -0700 Subject: [PATCH 006/247] [ASDataController] Remove asyncDataFetching Option, Cleanup (#1794) * [ASDataController] Add some assertions to clarify what queues things happen on * [ASCollectionDataController] Optimize willReloadData * [ASDataController] Minor optimizations, no functional changes * [ASDataController] Always reload data on _editingTransactionQueue * [ASDataController] Remove async data fetching option, deprecate callbacks * [ASDataController] Not mutable * [ASMultidimensionalArrayUtils] Use fast enumeration * Optimize ASMultidimensionalArrayUtils --- AsyncDisplayKit/ASCollectionView.h | 6 +- AsyncDisplayKit/ASCollectionView.mm | 34 +- AsyncDisplayKit/ASTableView.h | 24 +- AsyncDisplayKit/ASTableView.mm | 34 +- .../Details/ASChangeSetDataController.m | 13 +- .../Details/ASCollectionDataController.mm | 14 +- AsyncDisplayKit/Details/ASDataController.h | 25 -- AsyncDisplayKit/Details/ASDataController.mm | 316 +++++++++--------- .../Private/ASMultidimensionalArrayUtils.mm | 22 +- AsyncDisplayKitTests/ASTableViewTests.m | 3 +- 10 files changed, 192 insertions(+), 299 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index a2d5e2ec44..9b7fe864b5 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -407,8 +407,9 @@ NS_ASSUME_NONNULL_BEGIN * due to the data access in async mode. * * @param collectionView The sender. + * @deprecated The data source is always accessed on the main thread, and this method will not be called. */ -- (void)collectionViewLockDataSource:(ASCollectionView *)collectionView; +- (void)collectionViewLockDataSource:(ASCollectionView *)collectionView ASDISPLAYNODE_DEPRECATED; /** * Indicator to unlock the data source for data fetching in async mode. @@ -416,8 +417,9 @@ NS_ASSUME_NONNULL_BEGIN * due to the data access in async mode. * * @param collectionView The sender. + * @deprecated The data source is always accessed on the main thread, and this method will not be called. */ -- (void)collectionViewUnlockDataSource:(ASCollectionView *)collectionView; +- (void)collectionViewUnlockDataSource:(ASCollectionView *)collectionView ASDISPLAYNODE_DEPRECATED; @end diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 0c979f4320..68031f464a 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -112,7 +112,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; BOOL _performingBatchUpdates; NSMutableArray *_batchUpdateBlocks; - BOOL _asyncDataFetchingEnabled; _ASCollectionViewNodeSizeInvalidationContext *_queuedNodeSizeInvalidationContext; // Main thread only BOOL _isDeallocating; @@ -155,14 +154,10 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; unsigned int asyncDataSourceNodeForItemAtIndexPath:1; unsigned int asyncDataSourceNodeBlockForItemAtIndexPath:1; unsigned int asyncDataSourceNumberOfSectionsInCollectionView:1; - unsigned int asyncDataSourceCollectionViewLockDataSource:1; - unsigned int asyncDataSourceCollectionViewUnlockDataSource:1; unsigned int asyncDataSourceCollectionViewConstrainedSizeForNodeAtIndexPath:1; } _asyncDataSourceFlags; } -@property (atomic, assign) BOOL asyncDataSourceLocked; - // Used only when ASCollectionView is created directly rather than through ASCollectionNode. // We create a node so that logic related to appearance, memory management, etc can be located there // for both the node-based and view-based version of the table. @@ -231,7 +226,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; _rangeController.delegate = self; _rangeController.layoutController = _layoutController; - _dataController = [[ASCollectionDataController alloc] initWithAsyncDataFetching:NO]; + _dataController = [[ASCollectionDataController alloc] init]; _dataController.delegate = _rangeController; _dataController.dataSource = self; _dataController.environmentDelegate = self; @@ -240,9 +235,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; _leadingScreensForBatching = 2.0; - _asyncDataFetchingEnabled = NO; - _asyncDataSourceLocked = NO; - _performingBatchUpdates = NO; _batchUpdateBlocks = [NSMutableArray array]; @@ -375,9 +367,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; _asyncDataSourceFlags.asyncDataSourceNodeForItemAtIndexPath = [_asyncDataSource respondsToSelector:@selector(collectionView:nodeForItemAtIndexPath:)]; _asyncDataSourceFlags.asyncDataSourceNodeBlockForItemAtIndexPath = [_asyncDataSource respondsToSelector:@selector(collectionView:nodeBlockForItemAtIndexPath:)]; _asyncDataSourceFlags.asyncDataSourceNumberOfSectionsInCollectionView = [_asyncDataSource respondsToSelector:@selector(numberOfSectionsInCollectionView:)]; - _asyncDataSourceFlags.asyncDataSourceCollectionViewLockDataSource = [_asyncDataSource respondsToSelector:@selector(collectionViewLockDataSource:)]; - _asyncDataSourceFlags.asyncDataSourceCollectionViewUnlockDataSource = [_asyncDataSource respondsToSelector:@selector(collectionViewUnlockDataSource:)]; - _asyncDataSourceFlags.asyncDataSourceCollectionViewConstrainedSizeForNodeAtIndexPath = [_asyncDataSource respondsToSelector:@selector(collectionView:constrainedSizeForNodeAtIndexPath:)];; + _asyncDataSourceFlags.asyncDataSourceCollectionViewConstrainedSizeForNodeAtIndexPath = [_asyncDataSource respondsToSelector:@selector(collectionView:constrainedSizeForNodeAtIndexPath:)]; // Data-source must implement collectionView:nodeForItemAtIndexPath: or collectionView:nodeBlockForItemAtIndexPath: ASDisplayNodeAssertTrue(_asyncDataSourceFlags.asyncDataSourceNodeBlockForItemAtIndexPath || _asyncDataSourceFlags.asyncDataSourceNodeForItemAtIndexPath); @@ -937,26 +927,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } } -- (void)dataControllerLockDataSource -{ - ASDisplayNodeAssert(!self.asyncDataSourceLocked, @"The data source has already been locked"); - - self.asyncDataSourceLocked = YES; - if (_asyncDataSourceFlags.asyncDataSourceCollectionViewLockDataSource) { - [_asyncDataSource collectionViewLockDataSource:self]; - } -} - -- (void)dataControllerUnlockDataSource -{ - ASDisplayNodeAssert(self.asyncDataSourceLocked, @"The data source has already been unlocked"); - - self.asyncDataSourceLocked = NO; - if (_asyncDataSourceFlags.asyncDataSourceCollectionViewUnlockDataSource) { - [_asyncDataSource collectionViewUnlockDataSource:self]; - } -} - - (id)dataControllerEnvironment { if (self.collectionNode) { diff --git a/AsyncDisplayKit/ASTableView.h b/AsyncDisplayKit/ASTableView.h index 4ab4877121..7d36cc3d4d 100644 --- a/AsyncDisplayKit/ASTableView.h +++ b/AsyncDisplayKit/ASTableView.h @@ -44,18 +44,8 @@ NS_ASSUME_NONNULL_BEGIN * The frame of the table view changes as table cells are added and deleted. * * @param style A constant that specifies the style of the table view. See UITableViewStyle for descriptions of valid constants. - * - * @param asyncDataFetchingEnabled This option is reserved for future use, and currently a no-op. - * - * @discussion If asyncDataFetching is enabled, the `ASTableView` will fetch data through `tableView:numberOfRowsInSection:` and - * `tableView:nodeForRowAtIndexPath:` in async mode from background thread. Otherwise, the methods will be invoked synchronically - * from calling thread. - * Enabling asyncDataFetching could avoid blocking main thread for `ASCellNode` allocation, which is frequently reported issue for - * large scale data. On another hand, the application code need take the responsibility to avoid data inconsistence. Specifically, - * we will lock the data source through `tableViewLockDataSource`, and unlock it by `tableViewUnlockDataSource` after the data fetching. - * The application should not update the data source while the data source is locked, to keep data consistence. */ -- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style asyncDataFetching:(BOOL)asyncDataFetchingEnabled; +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style; /** * Tuning parameters for a range type in full mode. @@ -363,8 +353,9 @@ NS_ASSUME_NONNULL_BEGIN * due to the data access in async mode. * * @param tableView The sender. + * @deprecated The data source is always accessed on the main thread, and this method will not be called. */ -- (void)tableViewLockDataSource:(ASTableView *)tableView; +- (void)tableViewLockDataSource:(ASTableView *)tableView ASDISPLAYNODE_DEPRECATED; /** * Indicator to unlock the data source for data fetching in asyn mode. @@ -372,8 +363,9 @@ NS_ASSUME_NONNULL_BEGIN * due to the data access in async mode. * * @param tableView The sender. + * @deprecated The data source is always accessed on the main thread, and this method will not be called. */ -- (void)tableViewUnlockDataSource:(ASTableView *)tableView; +- (void)tableViewUnlockDataSource:(ASTableView *)tableView ASDISPLAYNODE_DEPRECATED; @end @@ -458,4 +450,10 @@ NS_ASSUME_NONNULL_BEGIN @protocol ASTableViewDelegate @end +@interface ASTableView (Deprecated) + +- (instancetype)initWithFrame:(CGRect)frame style:(UITableViewStyle)style asyncDataFetching:(BOOL)asyncDataFetchingEnabled ASDISPLAYNODE_DEPRECATED; + +@end + NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 871589b49d..c978bb9e5e 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -100,8 +100,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; ASRangeController *_rangeController; - BOOL _asyncDataFetchingEnabled; - ASBatchContext *_batchContext; NSIndexPath *_pendingVisibleIndexPath; @@ -133,12 +131,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; unsigned int asyncDataSourceNumberOfSectionsInTableView:1; unsigned int asyncDataSourceTableViewNodeBlockForRowAtIndexPath:1; unsigned int asyncDataSourceTableViewNodeForRowAtIndexPath:1; - unsigned int asyncDataSourceTableViewLockDataSource:1; - unsigned int asyncDataSourceTableViewUnlockDataSource:1; } _asyncDataSourceFlags; } -@property (atomic, assign) BOOL asyncDataSourceLocked; @property (nonatomic, strong, readwrite) ASDataController *dataController; // Used only when ASTableView is created directly rather than through ASTableNode. @@ -177,16 +172,13 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; _rangeController.dataSource = self; _rangeController.delegate = self; - _dataController = [[dataControllerClass alloc] initWithAsyncDataFetching:NO]; + _dataController = [[dataControllerClass alloc] init]; _dataController.dataSource = self; _dataController.delegate = _rangeController; _dataController.environmentDelegate = self; _layoutController.dataSource = _dataController; - _asyncDataFetchingEnabled = NO; - _asyncDataSourceLocked = NO; - _leadingScreensForBatching = 2.0; _batchContext = [[ASBatchContext alloc] init]; @@ -290,8 +282,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; _asyncDataSourceFlags.asyncDataSourceNumberOfSectionsInTableView = [_asyncDataSource respondsToSelector:@selector(numberOfSectionsInTableView:)]; _asyncDataSourceFlags.asyncDataSourceTableViewNodeForRowAtIndexPath = [_asyncDataSource respondsToSelector:@selector(tableView:nodeForRowAtIndexPath:)]; _asyncDataSourceFlags.asyncDataSourceTableViewNodeBlockForRowAtIndexPath = [_asyncDataSource respondsToSelector:@selector(tableView:nodeBlockForRowAtIndexPath:)]; - _asyncDataSourceFlags.asyncDataSourceTableViewLockDataSource = [_asyncDataSource respondsToSelector:@selector(tableViewLockDataSource:)]; - _asyncDataSourceFlags.asyncDataSourceTableViewUnlockDataSource = [_asyncDataSource respondsToSelector:@selector(tableViewUnlockDataSource:)]; // Data source must implement tableView:nodeBlockForRowAtIndexPath: or tableView:nodeForRowAtIndexPath: ASDisplayNodeAssertTrue(_asyncDataSourceFlags.asyncDataSourceTableViewNodeBlockForRowAtIndexPath || _asyncDataSourceFlags.asyncDataSourceTableViewNodeForRowAtIndexPath); @@ -1083,28 +1073,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; CGSizeMake(_nodesConstrainedWidth, FLT_MAX)); } -- (void)dataControllerLockDataSource -{ - ASDisplayNodeAssert(!self.asyncDataSourceLocked, @"The data source has already been locked"); - - self.asyncDataSourceLocked = YES; - - if (_asyncDataSourceFlags.asyncDataSourceTableViewLockDataSource) { - [_asyncDataSource tableViewLockDataSource:self]; - } -} - -- (void)dataControllerUnlockDataSource -{ - ASDisplayNodeAssert(self.asyncDataSourceLocked, @"The data source has already been unlocked"); - - self.asyncDataSourceLocked = NO; - - if (_asyncDataSourceFlags.asyncDataSourceTableViewUnlockDataSource) { - [_asyncDataSource tableViewUnlockDataSource:self]; - } -} - - (NSUInteger)dataController:(ASDataController *)dataController rowsInSection:(NSUInteger)section { return [_asyncDataSource tableView:self numberOfRowsInSection:section]; diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index 21fe2b8842..efce00ad31 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -26,17 +26,6 @@ @implementation ASChangeSetDataController -- (instancetype)initWithAsyncDataFetching:(BOOL)asyncDataFetchingEnabled -{ - if (!(self = [super initWithAsyncDataFetching:asyncDataFetchingEnabled])) { - return nil; - } - - _changeSetBatchUpdateCounter = 0; - - return self; -} - #pragma mark - Batching (External API) - (void)beginUpdates @@ -66,6 +55,8 @@ [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions]; } + // TODO: Shouldn't reloads be processed before deletes, since deletes affect + // the index space and reloads don't? for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload]) { [super reloadSections:change.indexSet withAnimationOptions:change.animationOptions]; } diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index c29fef148f..b54583c2a2 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -32,9 +32,9 @@ NSMutableDictionary *> *_pendingContexts; } -- (instancetype)initWithAsyncDataFetching:(BOOL)asyncDataFetchingEnabled +- (instancetype)init { - self = [super initWithAsyncDataFetching:asyncDataFetchingEnabled]; + self = [super init]; if (self != nil) { _pendingContexts = [NSMutableDictionary dictionary]; } @@ -53,15 +53,13 @@ - (void)willReloadData { - NSArray *keys = _pendingContexts.allKeys; - for (NSString *kind in keys) { - NSMutableArray *contexts = _pendingContexts[kind]; + [_pendingContexts enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray * _Nonnull contexts, __unused BOOL * _Nonnull stop) { // Remove everything that existed before the reload, now that we're ready to insert replacements NSArray *indexPaths = [self indexPathsForEditingNodesOfKind:kind]; [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; NSArray *editingNodes = [self editingNodesOfKind:kind]; - NSMutableIndexSet *indexSet = [[NSMutableIndexSet alloc] initWithIndexesInRange:NSMakeRange(0, editingNodes.count)]; + NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndexesInRange:NSMakeRange(0, editingNodes.count)]; [self deleteSectionsOfKind:kind atIndexSet:indexSet completion:nil]; // Insert each section @@ -75,8 +73,8 @@ [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; - [_pendingContexts removeObjectForKey:kind]; - } + }]; + [_pendingContexts removeAllObjects]; } - (void)prepareForInsertSections:(NSIndexSet *)sections diff --git a/AsyncDisplayKit/Details/ASDataController.h b/AsyncDisplayKit/Details/ASDataController.h index 74ed8f0edb..a740d4f1ce 100644 --- a/AsyncDisplayKit/Details/ASDataController.h +++ b/AsyncDisplayKit/Details/ASDataController.h @@ -57,17 +57,6 @@ FOUNDATION_EXPORT NSString * const ASDataControllerRowNodeKind; */ - (NSUInteger)numberOfSectionsInDataController:(ASDataController *)dataController; -/** - Lock the data source for data fetching. - */ -- (void)dataControllerLockDataSource; - -/** - Unlock the data source after data fetching. - */ -- (void)dataControllerUnlockDataSource; - - @end @protocol ASDataControllerEnvironmentDelegate @@ -135,20 +124,6 @@ FOUNDATION_EXPORT NSString * const ASDataControllerRowNodeKind; */ @property (nonatomic, weak) id environmentDelegate; -/** - * Designated initializer. - * - * @param asyncDataFetchingEnabled Enable the data fetching in async mode. - * - * @discussion If enabled, we will fetch data through `dataController:nodeAtIndexPath:` and `dataController:rowsInSection:` in background thread. - * Otherwise, the methods will be invoked synchronically in calling thread. Enabling data fetching in async mode could avoid blocking main thread - * while allocating cell on main thread, which is frequently reported issue for handling large scale data. On another hand, the application code - * will take the responsibility to avoid data inconsistency. Specifically, we will lock the data source through `dataControllerLockDataSource`, - * and unlock it by `dataControllerUnlockDataSource` after the data fetching. The application should not update the data source while - * the data source is locked. - */ -- (instancetype)initWithAsyncDataFetching:(BOOL)asyncDataFetchingEnabled; - /** @name Data Updating */ - (void)beginUpdates; diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 296f67b81d..86967fc99a 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -44,8 +44,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; NSMutableArray *_pendingEditCommandBlocks; // To be run on the main thread. Handles begin/endUpdates tracking. NSOperationQueue *_editingTransactionQueue; // Serial background queue. Dispatches concurrent layout and manages _editingNodes. - BOOL _asyncDataFetchingEnabled; - BOOL _initialReloadDataHasBeenCalled; BOOL _delegateDidInsertNodes; @@ -62,7 +60,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; #pragma mark - Lifecycle -- (instancetype)initWithAsyncDataFetching:(BOOL)asyncDataFetchingEnabled +- (instancetype)init { if (!(self = [super init])) { return nil; @@ -83,7 +81,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; _editingTransactionQueue.name = @"org.AsyncDisplayKit.ASDataController.editingTransactionQueue"; _batchUpdateCounter = 0; - _asyncDataFetchingEnabled = asyncDataFetchingEnabled; return self; } @@ -119,6 +116,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)batchLayoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock { + ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + NSUInteger blockSize = [[ASDataController class] parallelProcessorCount] * kASDataControllerSizingCountPerProcessor; NSUInteger count = contexts.count; @@ -143,8 +142,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_layoutNode:(ASCellNode *)node withConstrainedSize:(ASSizeRange)constrainedSize { - [node measureWithSizeRange:constrainedSize]; - node.frame = CGRectMake(0.0f, 0.0f, node.calculatedSize.width, node.calculatedSize.height); + CGSize size = [node measureWithSizeRange:constrainedSize].size; + node.frame = { .size = size }; } /** @@ -152,6 +151,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_batchLayoutNodesFromContexts:(NSArray *)contexts withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { + ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + [self batchLayoutNodesFromContexts:contexts ofKind:ASDataControllerRowNodeKind completion:^(NSArray *nodes, NSArray *indexPaths) { // Insert finished nodes into data storage [self _insertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; @@ -163,6 +164,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_layoutNodes:(NSArray *)nodes fromContexts:(NSArray *)contexts atIndexesOfRange:(NSRange)range ofKind:(NSString *)kind { + ASDisplayNodeAssert([NSOperationQueue currentQueue] != _editingTransactionQueue, @"%@ should not be called on the editing transaction queue", NSStringFromSelector(_cmd)); + if (_dataSource == nil) { return; } @@ -182,6 +185,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)_layoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock { + ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + if (!contexts.count || _dataSource == nil) { return; } @@ -278,7 +283,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; NSMutableArray *editingNodes = _editingNodes[kind]; ASInsertElementsIntoMultidimensionalArrayAtIndexPaths(editingNodes, indexPaths, nodes); - _editingNodes[kind] = editingNodes; // Deep copy is critical here, or future edits to the sub-arrays will pollute state between _editing and _complete on different threads. NSMutableArray *completedNodes = ASTwoDimensionalArrayDeepMutableCopy(editingNodes); @@ -359,7 +363,11 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_insertNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { + ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + [self insertNodes:nodes ofKind:ASDataControllerRowNodeKind atIndexPaths:indexPaths completion:^(NSArray *nodes, NSArray *indexPaths) { + ASDisplayNodeAssertMainThread(); + if (_delegateDidInsertNodes) [_delegate dataController:self didInsertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; }]; @@ -373,7 +381,11 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_deleteNodesAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { + ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + [self deleteNodesOfKind:ASDataControllerRowNodeKind atIndexPaths:indexPaths completion:^(NSArray *nodes, NSArray *indexPaths) { + ASDisplayNodeAssertMainThread(); + if (_delegateDidDeleteNodes) [_delegate dataController:self didDeleteNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; }]; @@ -387,7 +399,11 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_insertSections:(NSMutableArray *)sections atIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { + ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + [self insertSections:sections ofKind:ASDataControllerRowNodeKind atIndexSet:indexSet completion:^(NSArray *sections, NSIndexSet *indexSet) { + ASDisplayNodeAssertMainThread(); + if (_delegateDidInsertSections) [_delegate dataController:self didInsertSections:sections atIndexSet:indexSet withAnimationOptions:animationOptions]; }]; @@ -401,7 +417,11 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_deleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { + ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + [self deleteSectionsOfKind:ASDataControllerRowNodeKind atIndexSet:indexSet completion:^(NSIndexSet *indexSet) { + ASDisplayNodeAssertMainThread(); + if (_delegateDidDeleteSections) [_delegate dataController:self didDeleteSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions]; }]; @@ -426,49 +446,44 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; ASDisplayNodeAssertMainThread(); [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - [self accessDataSourceSynchronously:synchronously withBlock:^{ - NSUInteger sectionCount = [_dataSource numberOfSectionsInDataController:self]; - NSIndexSet *sectionIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)]; - NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sectionIndexSet]; + NSUInteger sectionCount = [_dataSource numberOfSectionsInDataController:self]; + NSIndexSet *sectionIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)]; + NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sectionIndexSet]; - // Allow subclasses to perform setup before going into the edit transaction - [self prepareForReloadData]; + // Allow subclasses to perform setup before going into the edit transaction + [self prepareForReloadData]; + + [_editingTransactionQueue addOperationWithBlock:^{ + LOG(@"Edit Transaction - reloadData"); - void (^transactionBlock)() = ^{ - LOG(@"Edit Transaction - reloadData"); - - // Remove everything that existed before the reload, now that we're ready to insert replacements - NSMutableArray *editingNodes = _editingNodes[ASDataControllerRowNodeKind]; - NSUInteger editingNodesSectionCount = editingNodes.count; - - if (editingNodesSectionCount) { - NSMutableIndexSet *indexSet = [[NSMutableIndexSet alloc] initWithIndexesInRange:NSMakeRange(0, editingNodesSectionCount)]; - [self _deleteNodesAtIndexPaths:ASIndexPathsForTwoDimensionalArray(editingNodes) withAnimationOptions:animationOptions]; - [self _deleteSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions]; - } - - [self willReloadData]; - - // Insert empty sections - NSMutableArray *sections = [NSMutableArray arrayWithCapacity:sectionCount]; - for (int i = 0; i < sectionCount; i++) { - [sections addObject:[[NSMutableArray alloc] init]]; - } - [self _insertSections:sections atIndexSet:sectionIndexSet withAnimationOptions:animationOptions]; - - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - - if (completion) { - dispatch_async(dispatch_get_main_queue(), completion); - } - }; + // Remove everything that existed before the reload, now that we're ready to insert replacements + NSMutableArray *editingNodes = _editingNodes[ASDataControllerRowNodeKind]; + NSUInteger editingNodesSectionCount = editingNodes.count; - if (synchronously) { - transactionBlock(); - } else { - [_editingTransactionQueue addOperationWithBlock:transactionBlock]; + if (editingNodesSectionCount) { + NSIndexSet *indexSet = [[NSIndexSet alloc] initWithIndexesInRange:NSMakeRange(0, editingNodesSectionCount)]; + [self _deleteNodesAtIndexPaths:ASIndexPathsForTwoDimensionalArray(editingNodes) withAnimationOptions:animationOptions]; + [self _deleteSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions]; + } + + [self willReloadData]; + + // Insert empty sections + NSMutableArray *sections = [NSMutableArray arrayWithCapacity:sectionCount]; + for (int i = 0; i < sectionCount; i++) { + [sections addObject:[[NSMutableArray alloc] init]]; + } + [self _insertSections:sections atIndexSet:sectionIndexSet withAnimationOptions:animationOptions]; + + [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; + + if (completion) { + dispatch_async(dispatch_get_main_queue(), completion); } }]; + if (synchronously) { + [self waitUntilAllUpdatesAreCommitted]; + } }]; } @@ -491,45 +506,21 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; #pragma mark - Data Source Access (Calling _dataSource) -/** - * Safely locks access to the data source and executes the given block, unlocking once complete. - * - * @discussion When `asyncDataFetching` is enabled, the block is executed on a background thread. - */ -- (void)accessDataSourceWithBlock:(dispatch_block_t)block -{ - [self accessDataSourceSynchronously:NO withBlock:block]; -} - -- (void)accessDataSourceSynchronously:(BOOL)synchronously withBlock:(dispatch_block_t)block -{ - if (!synchronously && _asyncDataFetchingEnabled) { - [_dataSource dataControllerLockDataSource]; - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ - block(); - [_dataSource dataControllerUnlockDataSource]; - }); - } else { - [_dataSource dataControllerLockDataSource]; - block(); - [_dataSource dataControllerUnlockDataSource]; - } -} - /** * Fetches row contexts for the provided sections from the data source. */ - (NSArray *)_populateFromDataSourceWithSectionIndexSet:(NSIndexSet *)indexSet { + ASDisplayNodeAssertMainThread(); + id environment = [self.environmentDelegate dataControllerEnvironment]; ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; NSMutableArray *contexts = [NSMutableArray array]; - [indexSet enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { - NSUInteger rowNum = [_dataSource dataController:self rowsInSection:idx]; - NSIndexPath *sectionIndex = [[NSIndexPath alloc] initWithIndex:idx]; + [indexSet enumerateIndexesUsingBlock:^(NSUInteger sectionIndex, BOOL *stop) { + NSUInteger rowNum = [_dataSource dataController:self rowsInSection:sectionIndex]; for (NSUInteger i = 0; i < rowNum; i++) { - NSIndexPath *indexPath = [sectionIndex indexPathByAddingIndex:i]; + NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sectionIndex]; ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; @@ -628,24 +619,22 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; LOG(@"Edit Command - insertSections: %@", sections); [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - [self accessDataSourceWithBlock:^{ - NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sections]; + NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sections]; - [self prepareForInsertSections:sections]; + [self prepareForInsertSections:sections]; + + [_editingTransactionQueue addOperationWithBlock:^{ + [self willInsertSections:sections]; + + LOG(@"Edit Transaction - insertSections: %@", sections); + NSMutableArray *sectionArray = [NSMutableArray arrayWithCapacity:sections.count]; + for (NSUInteger i = 0; i < sections.count; i++) { + [sectionArray addObject:[NSMutableArray array]]; + } + + [self _insertSections:sectionArray atIndexSet:sections withAnimationOptions:animationOptions]; - [_editingTransactionQueue addOperationWithBlock:^{ - [self willInsertSections:sections]; - - LOG(@"Edit Transaction - insertSections: %@", sections); - NSMutableArray *sectionArray = [NSMutableArray arrayWithCapacity:sections.count]; - for (NSUInteger i = 0; i < sections.count; i++) { - [sectionArray addObject:[NSMutableArray array]]; - } - - [self _insertSections:sectionArray atIndexSet:sections withAnimationOptions:animationOptions]; - - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; + [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; }]; }]; } @@ -678,23 +667,21 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - [self accessDataSourceWithBlock:^{ - NSArray *contexts= [self _populateFromDataSourceWithSectionIndexSet:sections]; + NSArray *contexts= [self _populateFromDataSourceWithSectionIndexSet:sections]; - [self prepareForReloadSections:sections]; + [self prepareForReloadSections:sections]; + + [_editingTransactionQueue addOperationWithBlock:^{ + [self willReloadSections:sections]; + + NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(_editingNodes[ASDataControllerRowNodeKind], sections); - [_editingTransactionQueue addOperationWithBlock:^{ - [self willReloadSections:sections]; + LOG(@"Edit Transaction - reloadSections: updatedIndexPaths: %@, indexPaths: %@, _editingNodes: %@", updatedIndexPaths, indexPaths, ASIndexPathsForTwoDimensionalArray(_editingNodes[ASDataControllerRowNodeKind])); + + [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(_editingNodes[ASDataControllerRowNodeKind], sections); - - LOG(@"Edit Transaction - reloadSections: updatedIndexPaths: %@, indexPaths: %@, _editingNodes: %@", updatedIndexPaths, indexPaths, ASIndexPathsForTwoDimensionalArray(_editingNodes[ASDataControllerRowNodeKind])); - - [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - - // reinsert the elements - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; + // reinsert the elements + [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; }]; }]; } @@ -818,27 +805,25 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; - [self accessDataSourceWithBlock:^{ - id environment = [self.environmentDelegate dataControllerEnvironment]; - ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; - - for (NSIndexPath *indexPath in sortedIndexPaths) { - ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; - ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; - [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock - indexPath:indexPath - constrainedSize:constrainedSize - environmentTraitCollection:environmentTraitCollection]]; - } + id environment = [self.environmentDelegate dataControllerEnvironment]; + ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; + + for (NSIndexPath *indexPath in sortedIndexPaths) { + ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; + ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; + [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock + indexPath:indexPath + constrainedSize:constrainedSize + environmentTraitCollection:environmentTraitCollection]]; + } - [self prepareForInsertRowsAtIndexPaths:indexPaths]; + [self prepareForInsertRowsAtIndexPaths:indexPaths]; - [_editingTransactionQueue addOperationWithBlock:^{ - [self willInsertRowsAtIndexPaths:indexPaths]; + [_editingTransactionQueue addOperationWithBlock:^{ + [self willInsertRowsAtIndexPaths:indexPaths]; - LOG(@"Edit Transaction - insertRows: %@", indexPaths); - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; + LOG(@"Edit Transaction - insertRows: %@", indexPaths); + [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; }]; }]; } @@ -874,35 +859,32 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - // Reloading requires re-fetching the data. Load it on the current calling thread, locking the data source. - [self accessDataSourceWithBlock:^{ - NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; - - // Sort indexPath to avoid messing up the index when deleting - // FIXME: Shouldn't deletes be sorted in descending order? - NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; - - id environment = [self.environmentDelegate dataControllerEnvironment]; - ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; - - for (NSIndexPath *indexPath in sortedIndexPaths) { - ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; - ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; - [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock - indexPath:indexPath - constrainedSize:constrainedSize - environmentTraitCollection:environmentTraitCollection]]; - } + NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; + + // Sort indexPath to avoid messing up the index when deleting + // FIXME: Shouldn't deletes be sorted in descending order? + NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; + + id environment = [self.environmentDelegate dataControllerEnvironment]; + ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; + + for (NSIndexPath *indexPath in sortedIndexPaths) { + ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; + ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; + [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock + indexPath:indexPath + constrainedSize:constrainedSize + environmentTraitCollection:environmentTraitCollection]]; + } - [self prepareForReloadRowsAtIndexPaths:indexPaths]; - - [_editingTransactionQueue addOperationWithBlock:^{ - [self willReloadRowsAtIndexPaths:indexPaths]; + [self prepareForReloadRowsAtIndexPaths:indexPaths]; + + [_editingTransactionQueue addOperationWithBlock:^{ + [self willReloadRowsAtIndexPaths:indexPaths]; - LOG(@"Edit Transaction - reloadRows: %@", indexPaths); - [self _deleteNodesAtIndexPaths:sortedIndexPaths withAnimationOptions:animationOptions]; - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; + LOG(@"Edit Transaction - reloadRows: %@", indexPaths); + [self _deleteNodesAtIndexPaths:sortedIndexPaths withAnimationOptions:animationOptions]; + [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; }]; }]; } @@ -935,16 +917,18 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; return; } - [self accessDataSourceWithBlock:^{ - [nodes enumerateObjectsUsingBlock:^(NSMutableArray *section, NSUInteger sectionIndex, BOOL *stop) { - [section enumerateObjectsUsingBlock:^(ASCellNode *node, NSUInteger rowIndex, BOOL *stop) { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex]; - ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; - ASLayout *layout = [node measureWithSizeRange:constrainedSize]; - node.frame = CGRectMake(0.0f, 0.0f, layout.size.width, layout.size.height); - }]; - }]; - }]; + NSUInteger sectionIndex = 0; + for (NSMutableArray *section in nodes) { + NSUInteger rowIndex = 0; + for (ASCellNode *node in section) { + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex]; + ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; + CGSize size = [node measureWithSizeRange:constrainedSize].size; + node.frame = { .size = size }; + rowIndex += 1; + } + sectionIndex += 1; + } } - (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions @@ -1021,17 +1005,15 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode; { ASDisplayNodeAssertMainThread(); - - NSArray *nodes = [self completedNodes]; - NSUInteger numberOfNodes = nodes.count; + NSInteger section = 0; // Loop through each section to look for the cellNode - for (NSUInteger i = 0; i < numberOfNodes; i++) { - NSArray *sectionNodes = nodes[i]; - NSUInteger cellIndex = [sectionNodes indexOfObjectIdenticalTo:cellNode]; - if (cellIndex != NSNotFound) { - return [NSIndexPath indexPathForRow:cellIndex inSection:i]; + for (NSArray *sectionNodes in [self completedNodes]) { + NSUInteger item = [sectionNodes indexOfObjectIdenticalTo:cellNode]; + if (item != NSNotFound) { + return [NSIndexPath indexPathForItem:item inSection:section]; } + section += 1; } return nil; diff --git a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm index 5c7e437387..370f533980 100644 --- a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm +++ b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm @@ -11,6 +11,10 @@ #import "ASAssert.h" #import "ASMultidimensionalArrayUtils.h" +// Import UIKit to get [NSIndexPath indexPathForItem:inSection:] which uses +// static memory addresses rather than allocating new index path objects. +#import + #pragma mark - Internal Methods static void ASRecursivelyUpdateMultidimensionalArrayAtIndexPaths(NSMutableArray *mutableArray, @@ -25,8 +29,10 @@ static void ASRecursivelyUpdateMultidimensionalArrayAtIndexPaths(NSMutableArray } if (curIndexPath.length < dimension - 1) { - for (int i = 0; i < mutableArray.count; i++) { - ASRecursivelyUpdateMultidimensionalArrayAtIndexPaths(mutableArray[i], indexPaths, curIdx, [curIndexPath indexPathByAddingIndex:i], dimension, updateBlock); + NSInteger i = 0; + for (NSMutableArray *subarray in mutableArray) { + ASRecursivelyUpdateMultidimensionalArrayAtIndexPaths(subarray, indexPaths, curIdx, [curIndexPath indexPathByAddingIndex:i], dimension, updateBlock); + i += 1; } } else { NSMutableIndexSet *indexSet = [[NSMutableIndexSet alloc] init]; @@ -72,7 +78,12 @@ static BOOL ASElementExistsAtIndexPathForMultidimensionalArray(NSArray *array, N NSUInteger indexesLength = indexLength - 1; NSUInteger indexes[indexesLength]; [indexPath getIndexes:indexes range:NSMakeRange(1, indexesLength)]; - NSIndexPath *indexPathByRemovingFirstIndex = [NSIndexPath indexPathWithIndexes:indexes length:indexesLength]; + NSIndexPath *indexPathByRemovingFirstIndex; + if (indexesLength == 2) { + indexPathByRemovingFirstIndex = [NSIndexPath indexPathForItem:indexes[1] inSection:indexes[0]]; + } else { + indexPathByRemovingFirstIndex = [NSIndexPath indexPathWithIndexes:indexes length:indexesLength]; + } return ASElementExistsAtIndexPathForMultidimensionalArray(array[firstIndex], indexPathByRemovingFirstIndex); } @@ -184,9 +195,8 @@ NSArray *ASIndexPathsForTwoDimensionalArray(NSArray * twoDimensionalA NSUInteger section = 0; for (NSArray *subarray in twoDimensionalArray) { ASDisplayNodeCAssert([subarray isKindOfClass:[NSArray class]], @"This function expects NSArray *"); - NSUInteger itemCount = subarray.count; - for (NSUInteger item = 0; item < itemCount; item++) { - [result addObject:[NSIndexPath indexPathWithIndexes:(const NSUInteger []){ section, item } length:2]]; + for (NSUInteger item = 0; item < subarray.count; item++) { + [result addObject:[NSIndexPath indexPathForItem:item inSection:section]]; } section++; } diff --git a/AsyncDisplayKitTests/ASTableViewTests.m b/AsyncDisplayKitTests/ASTableViewTests.m index 19a827ea28..7cb13fb8ca 100644 --- a/AsyncDisplayKitTests/ASTableViewTests.m +++ b/AsyncDisplayKitTests/ASTableViewTests.m @@ -408,8 +408,7 @@ { CGSize tableViewSize = CGSizeMake(100, 500); ASTestTableView *tableView = [[ASTestTableView alloc] initWithFrame:CGRectMake(0, 0, tableViewSize.width, tableViewSize.height) - style:UITableViewStylePlain - asyncDataFetching:YES]; + style:UITableViewStylePlain]; ASTableViewFilledDataSource *dataSource = [ASTableViewFilledDataSource new]; tableView.asyncDelegate = dataSource; From 77f24231b3c19637dba4a71e94cb2406ef77ddbf Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 10:13:51 -0700 Subject: [PATCH 007/247] [Documentation] Add a comment why we prefer -indexPathForItem:inSection: --- AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm index 370f533980..eea54f5028 100644 --- a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm +++ b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm @@ -79,6 +79,7 @@ static BOOL ASElementExistsAtIndexPathForMultidimensionalArray(NSArray *array, N NSUInteger indexes[indexesLength]; [indexPath getIndexes:indexes range:NSMakeRange(1, indexesLength)]; NSIndexPath *indexPathByRemovingFirstIndex; + // Use -indexPathForItem:inSection: if possible because it does not allocate into the heap if (indexesLength == 2) { indexPathByRemovingFirstIndex = [NSIndexPath indexPathForItem:indexes[1] inSection:indexes[0]]; } else { From 71d9f64535b2824d9c9c09552d14fe0782438de7 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 23 Jun 2016 15:52:00 -0700 Subject: [PATCH 008/247] Carry over first-pass change set improvements --- AsyncDisplayKit.xcodeproj/project.pbxproj | 8 ++ AsyncDisplayKit/ASTableView.mm | 13 ++ AsyncDisplayKit/ASTableViewInternal.h | 3 + .../Details/ASChangeSetDataController.m | 20 ++- .../Details/NSIndexSet+ASHelpers.h | 23 ++++ .../Details/NSIndexSet+ASHelpers.m | 62 +++++++++ .../Private/_ASHierarchyChangeSet.h | 31 +++-- .../Private/_ASHierarchyChangeSet.m | 120 +++++++++++------- AsyncDisplayKitTests/ASTableViewThrashTests.m | 2 + .../TestResources/ASThrashTestRecordedCase | 2 +- 10 files changed, 224 insertions(+), 60 deletions(-) create mode 100644 AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h create mode 100644 AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 62c3baffc7..9fa6625a99 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -546,6 +546,8 @@ CC3B208E1C3F7D0A00798563 /* ASWeakSetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.m */; }; CC3B20901C3F892D00798563 /* ASBridgedPropertiesTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */; }; CC4981B31D1A02BE004E13CC /* ASTableViewThrashTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981B21D1A02BE004E13CC /* ASTableViewThrashTests.m */; }; + CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; + CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; CC7FD9DE1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; CC7FD9DF1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */; }; CC7FD9E11BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */; }; @@ -937,6 +939,8 @@ CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASWeakSetTests.m; sourceTree = ""; }; CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASBridgedPropertiesTests.mm; sourceTree = ""; }; CC4981B21D1A02BE004E13CC /* ASTableViewThrashTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASTableViewThrashTests.m; sourceTree = ""; }; + CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSIndexSet+ASHelpers.h"; sourceTree = ""; }; + CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSIndexSet+ASHelpers.m"; sourceTree = ""; }; CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASPhotosFrameworkImageRequest.h; sourceTree = ""; }; CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPhotosFrameworkImageRequest.m; sourceTree = ""; }; CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPhotosFrameworkImageRequestTests.m; sourceTree = ""; }; @@ -1229,6 +1233,8 @@ 058D09E1195D050800B7D73C /* Details */ = { isa = PBXGroup; children = ( + CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */, + CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */, 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */, 058D09E2195D050800B7D73C /* _ASDisplayLayer.h */, 058D09E3195D050800B7D73C /* _ASDisplayLayer.mm */, @@ -1634,6 +1640,7 @@ ACF6ED2D1B17843500DA7C62 /* ASRatioLayoutSpec.h in Headers */, AC47D9451B3BB41900AAEE9D /* ASRelativeSize.h in Headers */, 291B63FB1AA53A7A000A71B3 /* ASScrollDirection.h in Headers */, + CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */, D785F6621A74327E00291744 /* ASScrollNode.h in Headers */, 058D0A7F195D05F900B7D73C /* ASSentinel.h in Headers */, 9C8221951BA237B80037F19A /* ASStackBaselinePositionedLayout.h in Headers */, @@ -2101,6 +2108,7 @@ ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.mm in Sources */, 68FC85DF1CE29AB700EDD713 /* ASNavigationController.m in Sources */, ACF6ED251B17843500DA7C62 /* ASLayout.mm in Sources */, + CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */, DB55C2631C6408D6004EDCF5 /* _ASTransitionContext.m in Sources */, 92074A631CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */, 251B8EFA1BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m in Sources */, diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index c978bb9e5e..13e77c1a52 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -145,6 +145,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; // Always set, whether ASCollectionView is created directly or via ASCollectionNode. @property (nonatomic, weak) ASTableNode *tableNode; +@property (nonatomic) BOOL test_enableSuperUpdateCallLogging; @end @implementation ASTableView @@ -974,6 +975,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super insertRowsAtIndexPaths]: %@", indexPaths); + } [super insertRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -994,6 +998,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super deleteRowsAtIndexPaths]: %@", indexPaths); + } [super deleteRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -1015,6 +1022,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super insertSections]: %@", indexSet); + } [super insertSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); @@ -1031,6 +1041,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super deleteSections]: %@", indexSet); + } [super deleteSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); diff --git a/AsyncDisplayKit/ASTableViewInternal.h b/AsyncDisplayKit/ASTableViewInternal.h index 93cdca0fcb..22ac11ff7e 100644 --- a/AsyncDisplayKit/ASTableViewInternal.h +++ b/AsyncDisplayKit/ASTableViewInternal.h @@ -34,4 +34,7 @@ */ - (instancetype)_initWithFrame:(CGRect)frame style:(UITableViewStyle)style dataControllerClass:(Class)dataControllerClass ownedByNode:(BOOL)ownedByNode; +/// Set YES and we'll log every time we call [super insertRows…] etc +@property (nonatomic) BOOL test_enableSuperUpdateCallLogging; + @end diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index efce00ad31..57fb476c79 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -14,6 +14,7 @@ #import "ASInternalHelpers.h" #import "_ASHierarchyChangeSet.h" #import "ASAssert.h" +#import "NSIndexSet+ASHelpers.h" #import "ASDataController+Subclasses.h" @@ -47,10 +48,18 @@ [super beginUpdates]; + for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload]) { + [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; + } + for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; } + for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload]) { + [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions]; + } + for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions]; } @@ -58,13 +67,12 @@ // TODO: Shouldn't reloads be processed before deletes, since deletes affect // the index space and reloads don't? for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload]) { - [super reloadSections:change.indexSet withAnimationOptions:change.animationOptions]; + NSIndexSet *newIndexes = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { + return [_changeSet newSectionForOldSection:idx]; + }]; + [super insertSections:newIndexes withAnimationOptions:change.animationOptions]; } - - for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload]) { - [super reloadRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; - } - + for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeInsert]) { [super insertSections:change.indexSet withAnimationOptions:change.animationOptions]; } diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h new file mode 100644 index 0000000000..fc8fc6cafe --- /dev/null +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h @@ -0,0 +1,23 @@ +// +// NSIndexSet+ASHelpers.h +// AsyncDisplayKit +// +// Created by Adlai Holler on 6/23/16. +// Copyright © 2016 Facebook. All rights reserved. +// + +#import + +@interface NSIndexSet (ASHelpers) + +- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger))block; + +- (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes; + +/// Returns all the item indexes from the given index paths that are in the given section. ++ (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section; + +/// If you've got an old index, and you insert items using this index set, this returns the new index. +- (NSUInteger)as_indexByInsertingItemsBelowIndex:(NSUInteger)index; + +@end diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m new file mode 100644 index 0000000000..183ae959e4 --- /dev/null +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -0,0 +1,62 @@ +// +// NSIndexSet+ASHelpers.m +// AsyncDisplayKit +// +// Created by Adlai Holler on 6/23/16. +// Copyright © 2016 Facebook. All rights reserved. +// + +@import UIKit; + +#import "NSIndexSet+ASHelpers.h" + +@implementation NSIndexSet (ASHelpers) + +- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger))block +{ + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + [self enumerateIndexesUsingBlock:^(NSUInteger idx, __unused BOOL * _Nonnull stop) { + NSUInteger newIndex = block(idx); + if (newIndex != NSNotFound) { + [result addIndex:newIndex]; + } + }]; + return result; +} + +- (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes +{ + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + [indexes enumerateRangesInRange:range options:kNilOptions usingBlock:^(NSRange range, BOOL * _Nonnull stop) { + [result addIndexesInRange:range]; + }]; + }]; + return result; +} + ++ (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section +{ + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + for (NSIndexPath *indexPath in indexPaths) { + if (indexPath.section == section) { + [result addIndex:indexPath.item]; + } + } + return result; +} + +- (NSUInteger)as_indexByInsertingItemsBelowIndex:(NSUInteger)index +{ + __block NSUInteger newIndex = index; + [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { + if (idx <= newIndex) { + newIndex += 1; + } else { + *stop = YES; + } + }]; + return newIndex; +} + +@end diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index 6ec3b4ca75..d46d0a3622 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -13,6 +13,8 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + typedef NSUInteger ASDataControllerAnimationOptions; typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @@ -34,11 +36,11 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @property (nonatomic, readonly) ASDataControllerAnimationOptions animationOptions; /// Index paths are sorted descending for changeType .Delete, ascending otherwise -@property (nonatomic, strong, readonly) NSArray *indexPaths; +@property (nonatomic, strong, readonly) NSArray *indexPaths; @property (nonatomic, readonly) _ASHierarchyChangeType changeType; -+ (NSDictionary *)sectionToIndexSetMapFromChanges:(NSArray *)changes ofType:(_ASHierarchyChangeType)changeType; ++ (NSDictionary *)sectionToIndexSetMapFromChanges:(NSArray<_ASHierarchyItemChange *> *)changes ofType:(_ASHierarchyChangeType)changeType; @end @interface _ASHierarchyChangeSet : NSObject @@ -56,7 +58,15 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @precondition The change set must be completed. @returns The new section index, or NSNotFound if the given section was deleted. */ -- (NSInteger)newSectionForOldSection:(NSInteger)oldSection; +- (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection; + +/** + Get the index path after the update for the item at the given index path before the update. + + @precondition The change set must be completed. + @returns The new index path, or nil if the given item (or its section) was deleted. + */ +- (nullable NSIndexPath *)newIndexPathForOldIndexPath:(NSIndexPath *)indexPath; @property (nonatomic, readonly) BOOL completed; @@ -77,13 +87,18 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { - Inserted sections, ascending order - Inserted items, ascending order */ -- (NSArray /*<_ASHierarchySectionChange *>*/ *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; -- (NSArray /*<_ASHierarchyItemChange *>*/ *)itemChangesOfType:(_ASHierarchyChangeType)changeType; +- (NSArray <_ASHierarchySectionChange *> *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; +- (NSArray <_ASHierarchyItemChange *> *)itemChangesOfType:(_ASHierarchyChangeType)changeType; + +/// Returns all item indexes affected by changes of the given type in the given section. +- (NSIndexSet *)indexesForItemChangesOfType:(_ASHierarchyChangeType)changeType inSection:(NSUInteger)section; - (void)deleteSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; - (void)insertSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; - (void)reloadSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; -- (void)insertItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; -- (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; -- (void)reloadItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)insertItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)reloadItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; @end + +NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index c89fc99332..9b32376faf 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -12,6 +12,7 @@ #import "_ASHierarchyChangeSet.h" #import "ASInternalHelpers.h" +#import "NSIndexSet+ASHelpers.h" @interface _ASHierarchySectionChange () - (instancetype)initWithChangeType:(_ASHierarchyChangeType)changeType indexSet:(NSIndexSet *)indexSet animationOptions:(ASDataControllerAnimationOptions)animationOptions; @@ -23,7 +24,7 @@ + (void)sortAndCoalesceChanges:(NSMutableArray *)changes; /// Returns all the indexes from all the `indexSet`s of the given `_ASHierarchySectionChange` objects. -+ (NSMutableIndexSet *)allIndexesInChanges:(NSArray *)changes; ++ (NSMutableIndexSet *)allIndexesInSectionChanges:(NSArray *)changes; @end @interface _ASHierarchyItemChange () @@ -36,14 +37,29 @@ + (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)sections; @end +@implementation NSIndexSet (ASHierarchyHelpers) + +- (NSIndexSet *)intersectionWithIndexes:(NSIndexSet *)indexes +{ + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + [indexes enumerateRangesInRange:range options:kNilOptions usingBlock:^(NSRange range, BOOL * _Nonnull stop) { + [result addIndexesInRange:range]; + }]; + }]; + return result; +} + +@end + @interface _ASHierarchyChangeSet () -@property (nonatomic, strong, readonly) NSMutableArray *insertItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray *deleteItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray *reloadItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray *insertSectionChanges; -@property (nonatomic, strong, readonly) NSMutableArray *deleteSectionChanges; -@property (nonatomic, strong, readonly) NSMutableArray *reloadSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *insertItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *deleteItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *reloadItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *insertSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *deleteSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *reloadSectionChanges; @end @@ -103,24 +119,52 @@ } } -- (NSInteger)newSectionForOldSection:(NSInteger)oldSection +- (NSIndexSet *)indexesForItemChangesOfType:(_ASHierarchyChangeType)changeType inSection:(NSUInteger)section +{ + [self _ensureCompleted]; + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + for (_ASHierarchyItemChange *change in [self itemChangesOfType:changeType]) { + [result addIndexes:[NSIndexSet as_indexSetFromIndexPaths:change.indexPaths inSection:section]]; + } + return result; +} + +- (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection { [self _ensureCompleted]; if ([_deletedSections containsIndex:oldSection]) { return NSNotFound; } - __block NSInteger newIndex = oldSection - [_deletedSections countOfIndexesInRange:NSMakeRange(0, oldSection)]; - [_insertedSections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= newIndex) { - newIndex += 1; - } else { - *stop = YES; - } - }]; + NSUInteger newIndex = oldSection - [_deletedSections countOfIndexesInRange:NSMakeRange(0, oldSection)]; + newIndex = [_insertedSections as_indexByInsertingItemsBelowIndex:newIndex]; return newIndex; } +- (nullable NSIndexPath *)newIndexPathForOldIndexPath:(NSIndexPath *)indexPath +{ + [self _ensureCompleted]; + // If section was deleted, nil + NSUInteger oldSection = indexPath.section; + NSUInteger newSection = [self newSectionForOldSection:oldSection]; + if (newSection == NSNotFound) { + return nil; + } + + NSUInteger newItem = indexPath.item; + NSIndexSet *deletedItemsInOldSection = [self indexesForItemChangesOfType:_ASHierarchyChangeTypeDelete inSection:oldSection]; + newItem -= [deletedItemsInOldSection countOfIndexesInRange:NSMakeRange(0, newItem)]; + + for (_ASHierarchyItemChange *change in _deleteItemChanges) { + // If item was deleted, nil + if ([change.indexPaths containsObject:indexPath]) { + return nil; + } + } + + return [NSIndexPath indexPathForItem:newItem inSection:newSection]; +} + - (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options { [self _ensureNotCompleted]; @@ -184,10 +228,13 @@ [_ASHierarchySectionChange sortAndCoalesceChanges:_insertSectionChanges]; [_ASHierarchySectionChange sortAndCoalesceChanges:_reloadSectionChanges]; - _deletedSections = [[_ASHierarchySectionChange allIndexesInChanges:_deleteSectionChanges] copy]; - _insertedSections = [[_ASHierarchySectionChange allIndexesInChanges:_insertSectionChanges] copy]; - _reloadedSections = [[_ASHierarchySectionChange allIndexesInChanges:_reloadSectionChanges] copy]; + _deletedSections = [[_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges] copy]; + _insertedSections = [[_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges] copy]; + _reloadedSections = [[_ASHierarchySectionChange allIndexesInSectionChanges:_reloadSectionChanges] copy]; + NSIndexSet *deletedAndReloaded = [_deletedSections intersectionWithIndexes:_reloadedSections]; + NSAssert(deletedAndReloaded.count == 0, @"Request to delete and reload the same section(s): %@", deletedAndReloaded); + // These are invalid old section indexes. NSMutableIndexSet *deletedOrReloaded = [_deletedSections mutableCopy]; [deletedOrReloaded addIndexes:_reloadedSections]; @@ -223,39 +270,22 @@ // - delete/reload indexPaths that are passed in should all be their current indexPaths // - insert indexPaths that are passed in should all be their future indexPaths after deletions for (NSIndexPath *indexPath in change.indexPaths) { - __block NSUInteger section = indexPath.section; - __block NSUInteger row = indexPath.row; - - - // Update section number based on section insertions/deletions that are above the current section - section -= [_deletedSections countOfIndexesInRange:NSMakeRange(0, section)]; - [_insertedSections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= section) { - section += 1; - } else { - *stop = YES; - } - }]; + NSUInteger section = [self newSectionForOldSection:indexPath.section]; + NSUInteger item = indexPath.item; // Update row number based on deletions that are above the current row in the current section NSIndexSet *indicesDeletedInSection = deletedIndexPathsMap[@(indexPath.section)]; - row -= [indicesDeletedInSection countOfIndexesInRange:NSMakeRange(0, row)]; + item -= [indicesDeletedInSection countOfIndexesInRange:NSMakeRange(0, item)]; // Update row number based on insertions that are above the current row in the future section NSIndexSet *indicesInsertedInSection = insertedIndexPathsMap[@(section)]; - [indicesInsertedInSection enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= row) { - row += 1; - } else { - *stop = YES; - } - }]; + item = [indicesInsertedInSection as_indexByInsertingItemsBelowIndex:item]; //TODO: reuse the old indexPath object if section and row aren't changed - NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:row inSection:section]; + NSIndexPath *newIndexPath = [NSIndexPath indexPathForItem:item inSection:section]; [newIndexPaths addObject:newIndexPath]; } - // All reload changes are coalesced into deletes and inserts + // All reload changes are translated into deletes and inserts // We delete the items that needs reload together with other deleted items, at their original index _ASHierarchyItemChange *deleteItemChangeFromReloadChange = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexPaths:change.indexPaths animationOptions:change.animationOptions presorted:NO]; [_deleteItemChanges addObject:deleteItemChangeFromReloadChange]; @@ -346,7 +376,7 @@ [changes setArray:result]; } -+ (NSMutableIndexSet *)allIndexesInChanges:(NSArray *)changes ++ (NSMutableIndexSet *)allIndexesInSectionChanges:(NSArray<_ASHierarchySectionChange *> *)changes { NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet]; for (_ASHierarchySectionChange *change in changes) { @@ -387,9 +417,9 @@ NSNumber *sectionKey = @(indexPath.section); NSMutableIndexSet *indexSet = sectionToIndexSetMap[sectionKey]; if (indexSet) { - [indexSet addIndex:indexPath.row]; + [indexSet addIndex:indexPath.item]; } else { - indexSet = [NSMutableIndexSet indexSetWithIndex:indexPath.row]; + indexSet = [NSMutableIndexSet indexSetWithIndex:indexPath.item]; sectionToIndexSetMap[sectionKey] = indexSet; } } diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index 5d6fa8f637..ffdfa7eec8 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -8,6 +8,7 @@ @import XCTest; #import +#import "ASTableViewInternal.h" // Set to 1 to use UITableView and see if the issue still exists. #define USE_UIKIT_REFERENCE 0 @@ -477,6 +478,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; } ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:_update.oldData]; + ds.tableView.test_enableSuperUpdateCallLogging = YES; [self applyUpdate:_update toDataSource:ds]; [self verifyDataSource:ds]; } diff --git a/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase b/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase index 9e8343590e..e9dc1e9cc0 100644 --- a/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase +++ b/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase @@ -1 +1 @@ -YnBsaXN0MDDUAAEAAgADAAQABQAGDfYN91gkdmVyc2lvblgkb2JqZWN0c1kkYXJjaGl2ZXJUJHRvcBIAAYagrxEDRQAHAAgADwAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5AEAARgBdAGEAaABrAG4AcQB0AHcAegB9AIAAgwCGAIkAjACPAJIAlQCYAJsAngChAKYAqgCuAMUAyADLAM4A0QDUANcA2gDdAOAA4wDmAOkA7ADvAPIA9QD4APsA/gEBAQUBHAEfASIBJQEoASsBLgExATQBNwE6AT0BQAFDAUYBSQFMAU8BUgFVAVgBXAFzAXYBeQF8AX8BggGFAYgBiwGOAZEBlAGXAZoBnQGgAaMBpgGpAawBrwG1AbkBvgHDAdsB4AHjAeYB6AHqAewB7wHyAfQB9gH5AfwB/wICAgUCBwIKAg0CDwITAhYCGAIaAhwCIAIjAiYCKQIsAkMCSAJLAk4CUwJWAl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gCjAKRfEBNBU1RocmFzaFRlc3RTZWN0aW9uogClAENfEBNBU1RocmFzaFRlc3RTZWN0aW9u0wCBAIIACwCnAKgAhYApEQGGgCfSABEACwCrADulAKwArQCuAK8AsIAqgCuALIAtgC6AENIAjwALALMAkRECbYAi0gCPAAsAtgCREQJugCLSAI8ACwC5AJERAm+AItIAjwALALwAkRECcIAi0gCPAAsAvwCREQJxgCLTAIEAggALAMIAwwCFgDARAYeAJ9IAEQALAMYAO6UAxwDIAMkAygDLgDGAMoAzgDSANYAQ0gCPAAsAzgCREQJygCLSAI8ACwDRAJERAnOAItIAjwALANQAkRECdIAi0gCPAAsA1wCREQJ1gCLSAI8ACwDaAJERAnaAItMAgQCCAAsA3QDeAIWANxEBiIAn0gARAAsA4QA7pQDiAOMA5ADlAOaAOIA5gDqAO4A8gBDSAI8ACwDpAJERAneAItIAjwALAOwAkRECeIAi0gCPAAsA7wCREQJ5gCLSAI8ACwDyAJERAnqAItIAjwALAPUAkRECe4Ai0wCBAIIACwD4APkAhYA+EQGJgCfSABEACwD8ADulAP0A/gD/AQABAYA/gECAQYBCgEOAENIAjwALAQQAkRECfIAi0gCPAAsBBwCREQJ9gCLSAI8ACwEKAJERAn6AItIAjwALAQ0AkRECf4Ai0gCPAAsBEACREQKAgCLSAD0APgBCAROiAEIAQ9IAEQALARUAO6QBFgEXARgBGYBGgEmAUIBSgBDTAIEAggALARwAqACFgEeAJ9IAEQALAR8AO6YArACtAK4BIwCvALCAKoArgCyASIAtgC6AENIAjwALASgAkREChoAi0wCBAIIACwErASwAhYBKEQGZgCfSABEACwEvADulATABMQEyATMBNIBLgEyATYBOgE+AENIAjwALATcAkRECgYAi0gCPAAsBOgCREQKCgCLSAI8ACwE9AJERAoOAItIAjwALAUAAkREChIAi0gCPAAsBQwCREQKFgCLTAIEAggALAUYA3gCFgFGAJ9IAEQALAUkAO6UA4gDjAOQA5QDmgDiAOYA6gDuAPIAQ0wCBAIIACwFRAPkAhYBTgCfSABEACwFUADumA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WMBZUFmAWaBaMFpgWoBbEFtAW2Bb8FwgXEBc0F0AXSBd8F4QXkBeYF7wX6BfwF/gYABgIGBAYGBg8GEgYUBh0GIAYiBisGLgYwBjkGPAY+BkcGSgZMBlkGWwZeBmAGaQZ0BnYGeAZ6BnwGfgaABokGjAaOBpcGmgacBqUGqAaqBrMGtga4BsEGxAbGBtMG1QbYBtoG4wbuBvAG8gb0BvYG+Ab6BwMHBgcIBxEHFAcWBx8HIgckBy0HMAcyBzsHPgdAB0kHTgdXB2AHYgdkB2YHaAdqB3cHeQd7B4QHkQeTB5UHlweZB5sHnQefB6gHqwetB7oHvAe/B8EHygfVB9cH2QfbB90H3wfhB+oH7QfvB/gH+wf9CAYICQgLCBQIFwgZCCIIJQgnCDQINgg4CEEITAhOCFAIUghUCFYIWAhlCGcIaQhyCH8IgQiDCIUIhwiJCIsIjQiWCJkImwikCKYIrwi6CLwIvgjACMIIxAjGCM8I0QjaCNwI5QjnCPAI8gj7CP0JBgkRCRMJFQkXCRkJGwkdCSYJKAkxCTMJPAk+CUcJSQlSCVQJXQlmCWgJaglsCW4JcAl5CXwJfgmACYkJigmMCZUJlgmYCaEJpAmmCagJuQm7CcQJxwnJCcsJ1AnhCeYJ8wn8CgsKEAofCjEKNgo7AAAAAAAAAgIAAAAAAAABrAAAAAAAAAAAAAAAAAAACj0= \ No newline at end of file From 35056f708b0d58fdd243f6195f0970dc273fb2ab Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 23 Jun 2016 16:57:09 -0700 Subject: [PATCH 009/247] [ASDataController] Improve update handling --- AsyncDisplayKit/ASTableView.mm | 6 ++ .../Details/ASChangeSetDataController.m | 24 ++--- .../Details/ASCollectionDataController.mm | 48 --------- .../Details/ASDataController+Subclasses.h | 44 --------- AsyncDisplayKit/Details/ASDataController.mm | 70 +------------ .../Details/NSIndexSet+ASHelpers.h | 4 +- .../Details/NSIndexSet+ASHelpers.m | 14 +++ .../Private/_ASHierarchyChangeSet.h | 4 +- .../Private/_ASHierarchyChangeSet.m | 99 ++++++++++--------- AsyncDisplayKitTests/ASTableViewThrashTests.m | 15 ++- 10 files changed, 95 insertions(+), 233 deletions(-) diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 13e77c1a52..c0dfd1fc15 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -456,18 +456,21 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController insertSections:sections withAnimationOptions:animation]; } - (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController deleteSections:sections withAnimationOptions:animation]; } - (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController reloadSections:sections withAnimationOptions:animation]; } @@ -480,18 +483,21 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } - (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index 57fb476c79..7802a6c1d5 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -48,30 +48,16 @@ [super beginUpdates]; - for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload]) { - [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; - } + NSAssert([_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload item changes to have been converted into insert/deletes."); + NSAssert([_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload section changes to have been converted into insert/deletes."); for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; } - for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload]) { - [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions]; - } - for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions]; } - - // TODO: Shouldn't reloads be processed before deletes, since deletes affect - // the index space and reloads don't? - for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload]) { - NSIndexSet *newIndexes = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { - return [_changeSet newSectionForOldSection:idx]; - }]; - [super insertSections:newIndexes withAnimationOptions:change.animationOptions]; - } for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeInsert]) { [super insertSections:change.indexSet withAnimationOptions:change.animationOptions]; @@ -123,7 +109,8 @@ if ([self batchUpdating]) { [_changeSet reloadSections:sections animationOptions:animationOptions]; } else { - [super reloadSections:sections withAnimationOptions:animationOptions]; + [super deleteSections:sections withAnimationOptions:animationOptions]; + [super insertSections:sections withAnimationOptions:animationOptions]; } } @@ -166,7 +153,8 @@ if ([self batchUpdating]) { [_changeSet reloadItems:indexPaths animationOptions:animationOptions]; } else { - [super reloadRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; + [super deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; + [super insertRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; } } diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index b54583c2a2..df0e7d592b 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -115,30 +115,6 @@ } } -- (void)prepareForReloadSections:(NSIndexSet *)sections -{ - for (NSString *kind in [self supplementaryKinds]) { - NSMutableArray *contexts = [NSMutableArray array]; - [self _populateSupplementaryNodesOfKind:kind withSections:sections mutableContexts:contexts]; - _pendingContexts[kind] = contexts; - } -} - -- (void)willReloadSections:(NSIndexSet *)sections -{ - NSArray *keys = _pendingContexts.allKeys; - for (NSString *kind in keys) { - NSMutableArray *contexts = _pendingContexts[kind]; - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet([self editingNodesOfKind:kind], sections); - [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; - // reinsert the elements - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { - [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; - }]; - [_pendingContexts removeObjectForKey:kind]; - } -} - - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { for (NSString *kind in [self supplementaryKinds]) { @@ -187,30 +163,6 @@ } } -- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - for (NSString *kind in [self supplementaryKinds]) { - NSMutableArray *contexts = [NSMutableArray array]; - [self _populateSupplementaryNodesOfKind:kind atIndexPaths:indexPaths mutableContexts:contexts]; - _pendingContexts[kind] = contexts; - } -} - -- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - NSArray *keys = _pendingContexts.allKeys; - for (NSString *kind in keys) { - NSMutableArray *contexts = _pendingContexts[kind]; - - [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; - // reinsert the elements - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { - [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; - }]; - [_pendingContexts removeObjectForKey:kind]; - } -} - - (void)_populateSupplementaryNodesOfKind:(NSString *)kind withMutableContexts:(NSMutableArray *)contexts { id environment = [self.environmentDelegate dataControllerEnvironment]; diff --git a/AsyncDisplayKit/Details/ASDataController+Subclasses.h b/AsyncDisplayKit/Details/ASDataController+Subclasses.h index d837540362..099a9bfe45 100644 --- a/AsyncDisplayKit/Details/ASDataController+Subclasses.h +++ b/AsyncDisplayKit/Details/ASDataController+Subclasses.h @@ -128,28 +128,6 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (void)willDeleteSections:(NSIndexSet *)sections; -/** - * Notifies the subclass to perform any work needed before the given sections will be reloaded. - * - * @discussion This method will be performed before the data controller enters its editing queue, usually on the main - * thread. The data source is locked at this point and accessing it is safe. Use this method to set up any nodes or - * data stores before entering into editing the backing store on a background thread. - * - * @param sections Indices of sections to be reloaded - */ -- (void)prepareForReloadSections:(NSIndexSet *)sections; - -/** - * Notifies the subclass that the data controller will reload the sections in the given index set - * - * @discussion This method will be performed on the data controller's editing background queue before the parent's - * concrete implementation. This is a great place to perform any additional transformations like supplementary views - * or header/footer nodes. - * - * @param sections Indices of sections to be reloaded - */ -- (void)willReloadSections:(NSIndexSet *)sections; - /** * Notifies the subclass that the data controller will move a section to a new position * @@ -206,26 +184,4 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (void)willDeleteRowsAtIndexPaths:(NSArray *)indexPaths; -/** - * Notifies the subclass to perform any work needed before the given rows will be reloaded. - * - * @discussion This method will be performed before the data controller enters its editing queue, usually on the main - * thread. The data source is locked at this point and accessing it is safe. Use this method to set up any nodes or - * data stores before entering into editing the backing store on a background thread. - * - * @param indexPaths Index paths for the rows to be reloaded. - */ -- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths; - -/** - * Notifies the subclass that the data controller will reload the rows at the given index paths. - * - * @discussion This method will be performed on the data controller's editing background queue before the parent's - * concrete implementation. This is a great place to perform any additional transformations like supplementary views - * or header/footer nodes. - * - * @param indexPaths Index paths for the rows to be reloaded. - */ -- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths; - @end diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 86967fc99a..74869de0d7 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -65,6 +65,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; if (!(self = [super init])) { return nil; } + ASDisplayNodeAssert(![self isMemberOfClass:[ASDataController class]], @"ASDataController is an abstract class and should not be instantiated. Instantiate a subclass instead."); _completedNodes = [NSMutableDictionary dictionary]; _editingNodes = [NSMutableDictionary dictionary]; @@ -661,29 +662,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)reloadSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - [self performEditCommandWithBlock:^{ - ASDisplayNodeAssertMainThread(); - LOG(@"Edit Command - reloadSections: %@", sections); - - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - - NSArray *contexts= [self _populateFromDataSourceWithSectionIndexSet:sections]; - - [self prepareForReloadSections:sections]; - - [_editingTransactionQueue addOperationWithBlock:^{ - [self willReloadSections:sections]; - - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(_editingNodes[ASDataControllerRowNodeKind], sections); - - LOG(@"Edit Transaction - reloadSections: updatedIndexPaths: %@, indexPaths: %@, _editingNodes: %@", updatedIndexPaths, indexPaths, ASIndexPathsForTwoDimensionalArray(_editingNodes[ASDataControllerRowNodeKind])); - - [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - - // reinsert the elements - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; - }]; + ASDisplayNodeAssert(NO, @"ASDataController does not support %@. Call this on ASChangeSetDataController the reload will be broken into delete & insert.", NSStringFromSelector(_cmd)); } - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions @@ -781,16 +760,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; // Optional template hook for subclasses (See ASDataController+Subclasses.h) } -- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - -- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - #pragma mark - Row Editing (External API) - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions @@ -853,40 +822,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - [self performEditCommandWithBlock:^{ - ASDisplayNodeAssertMainThread(); - LOG(@"Edit Command - reloadRows: %@", indexPaths); - - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - - NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; - - // Sort indexPath to avoid messing up the index when deleting - // FIXME: Shouldn't deletes be sorted in descending order? - NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; - - id environment = [self.environmentDelegate dataControllerEnvironment]; - ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; - - for (NSIndexPath *indexPath in sortedIndexPaths) { - ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; - ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; - [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock - indexPath:indexPath - constrainedSize:constrainedSize - environmentTraitCollection:environmentTraitCollection]]; - } - - [self prepareForReloadRowsAtIndexPaths:indexPaths]; - - [_editingTransactionQueue addOperationWithBlock:^{ - [self willReloadRowsAtIndexPaths:indexPaths]; - - LOG(@"Edit Transaction - reloadRows: %@", indexPaths); - [self _deleteNodesAtIndexPaths:sortedIndexPaths withAnimationOptions:animationOptions]; - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; - }]; + ASDisplayNodeAssert(NO, @"ASDataController does not support %@. Call this on ASChangeSetDataController and the reload will be broken into delete & insert.", NSStringFromSelector(_cmd)); } - (void)relayoutAllNodes diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h index fc8fc6cafe..54e9ac0126 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h @@ -10,7 +10,7 @@ @interface NSIndexSet (ASHelpers) -- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger))block; +- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger idx))block; - (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes; @@ -20,4 +20,6 @@ /// If you've got an old index, and you insert items using this index set, this returns the new index. - (NSUInteger)as_indexByInsertingItemsBelowIndex:(NSUInteger)index; +- (NSString *)as_smallDescription; + @end diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m index 183ae959e4..feac7ec8d0 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -59,4 +59,18 @@ return newIndex; } +- (NSString *)as_smallDescription +{ + NSMutableString *result = [NSMutableString stringWithString:@"{ "]; + [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + if (range.length == 1) { + [result appendFormat:@"%lu ", (unsigned long)range.location]; + } else { + [result appendFormat:@"%lu-%lu ", (unsigned long)range.location, (unsigned long)NSMaxRange(range)]; + } + }]; + [result appendString:@"}"]; + return result; +} + @end diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index d46d0a3622..9387a91d56 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -23,6 +23,8 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { _ASHierarchyChangeTypeInsert }; +NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); + @interface _ASHierarchySectionChange : NSObject // FIXME: Generalize this to `changeMetadata` dict? @@ -49,8 +51,6 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @property (nonatomic, strong, readonly) NSIndexSet *deletedSections; /// @precondition The change set must be completed. @property (nonatomic, strong, readonly) NSIndexSet *insertedSections; -/// @precondition The change set must be completed. -@property (nonatomic, strong, readonly) NSIndexSet *reloadedSections; /** Get the section index after the update for the given section before the update. diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index 9b32376faf..26adef5cd1 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -13,6 +13,21 @@ #import "_ASHierarchyChangeSet.h" #import "ASInternalHelpers.h" #import "NSIndexSet+ASHelpers.h" +#import "ASAssert.h" + +NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) +{ + switch (changeType) { + case _ASHierarchyChangeTypeInsert: + return @"Insert"; + case _ASHierarchyChangeTypeDelete: + return @"Delete"; + case _ASHierarchyChangeTypeReload: + return @"Reload"; + default: + return @"(invalid)"; + } +} @interface _ASHierarchySectionChange () - (instancetype)initWithChangeType:(_ASHierarchyChangeType)changeType indexSet:(NSIndexSet *)indexSet animationOptions:(ASDataControllerAnimationOptions)animationOptions; @@ -37,21 +52,6 @@ + (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)sections; @end -@implementation NSIndexSet (ASHierarchyHelpers) - -- (NSIndexSet *)intersectionWithIndexes:(NSIndexSet *)indexes -{ - NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; - [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { - [indexes enumerateRangesInRange:range options:kNilOptions usingBlock:^(NSRange range, BOOL * _Nonnull stop) { - [result addIndexesInRange:range]; - }]; - }]; - return result; -} - -@end - @interface _ASHierarchyChangeSet () @property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *insertItemChanges; @@ -224,37 +224,30 @@ - (void)_sortAndCoalesceChangeArrays { @autoreleasepool { + + // Split reloaded section indexes into deletes and inserts + // Delete the old section, insert the new section it corresponds to. + for (_ASHierarchySectionChange *change in _reloadSectionChanges) { + NSIndexSet *newSections = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { + NSUInteger newSec = [self newSectionForOldSection:idx]; + NSAssert(newSec != NSNotFound, nil); + return newSec; + }]; + + _ASHierarchySectionChange *deleteChange = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexSet:change.indexSet animationOptions:change.animationOptions]; + [_deleteSectionChanges addObject:deleteChange]; + + _ASHierarchySectionChange *insertChange = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexSet:newSections animationOptions:change.animationOptions]; + [_insertSectionChanges addObject:insertChange]; + } + + _reloadSectionChanges = nil; + [_ASHierarchySectionChange sortAndCoalesceChanges:_deleteSectionChanges]; [_ASHierarchySectionChange sortAndCoalesceChanges:_insertSectionChanges]; [_ASHierarchySectionChange sortAndCoalesceChanges:_reloadSectionChanges]; - - _deletedSections = [[_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges] copy]; - _insertedSections = [[_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges] copy]; - _reloadedSections = [[_ASHierarchySectionChange allIndexesInSectionChanges:_reloadSectionChanges] copy]; - - NSIndexSet *deletedAndReloaded = [_deletedSections intersectionWithIndexes:_reloadedSections]; - NSAssert(deletedAndReloaded.count == 0, @"Request to delete and reload the same section(s): %@", deletedAndReloaded); - - // These are invalid old section indexes. - NSMutableIndexSet *deletedOrReloaded = [_deletedSections mutableCopy]; - [deletedOrReloaded addIndexes:_reloadedSections]; - - // These are invalid new section indexes. - NSMutableIndexSet *insertedOrReloaded = [_insertedSections mutableCopy]; - - // Get the new section that each reloaded section index corresponds to. - // Coalesce reload sections' indexes into deletes and inserts - [_reloadedSections enumerateIndexesUsingBlock:^(NSUInteger oldIndex, __unused BOOL * stop) { - NSUInteger newIndex = [self newSectionForOldSection:oldIndex]; - if (newIndex != NSNotFound) { - [insertedOrReloaded addIndex:newIndex]; - } - [deletedOrReloaded addIndex:oldIndex]; - }]; - - _deletedSections = deletedOrReloaded; - _insertedSections = insertedOrReloaded; - _reloadedSections = nil; + _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; + _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; // reload items changes need to be adjusted so that we access the correct indexPaths in the datasource NSDictionary *insertedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_insertItemChanges ofType:_ASHierarchyChangeTypeInsert]; @@ -296,13 +289,17 @@ [_reloadItemChanges removeAllObjects]; // Ignore item deletes in reloaded/deleted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:deletedOrReloaded]; + [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:_deletedSections]; // Ignore item inserts in reloaded(new)/inserted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_insertItemChanges ignoringChangesInSections:insertedOrReloaded]; + [_ASHierarchyItemChange sortAndCoalesceChanges:_insertItemChanges ignoringChangesInSections:_insertedSections]; } } +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@ %p: deletedSections=%@, insertedSections=%@, deletedItems=%@, insertedItems=%@>", NSStringFromClass(self.class), self, _deletedSections, _insertedSections, _deleteItemChanges, _insertItemChanges]; +} @end @@ -313,6 +310,7 @@ { self = [super init]; if (self) { + ASDisplayNodeAssert(indexSet.count > 0, @"Request to create _ASHierarchySectionChange with no sections!"); _changeType = changeType; _indexSet = indexSet; _animationOptions = animationOptions; @@ -385,6 +383,11 @@ return indexes; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: anim=%lu, type=%@, indexes=%@>", NSStringFromClass(self.class), (unsigned long)_animationOptions, NSStringFromASHierarchyChangeType(_changeType), [self.indexSet as_smallDescription]]; +} + @end @implementation _ASHierarchyItemChange @@ -393,6 +396,7 @@ { self = [super init]; if (self) { + ASDisplayNodeAssert(indexPaths.count > 0, @"Request to create _ASHierarchyItemChange with no items!"); _changeType = changeType; if (presorted) { _indexPaths = indexPaths; @@ -489,4 +493,9 @@ [changes setArray:result]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: anim=%lu, type=%@, indexPaths=%@>", NSStringFromClass(self.class), (unsigned long)_animationOptions, NSStringFromASHierarchyChangeType(_changeType), self.indexPaths]; +} + @end diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index ffdfa7eec8..02910a1d06 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -446,17 +446,22 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; @implementation ASTableViewThrashTests { // The current update, which will be logged in case of a failure. ASThrashUpdate *_update; + BOOL _failed; } #pragma mark Overrides - (void)tearDown { + if (_failed && _update != nil) { + NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation); + } + _failed = NO; _update = nil; } // NOTE: Despite the documentation, this is not always called if an exception is caught. - (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filePath atLine:(NSUInteger)lineNumber expected:(BOOL)expected { - [self logCurrentUpdateIfNeeded]; + _failed = YES; [super recordFailureWithDescription:description inFile:filePath atLine:lineNumber expected:expected]; } @@ -497,12 +502,6 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; #pragma mark Helpers -- (void)logCurrentUpdateIfNeeded { - if (_update != nil) { - NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation); - } -} - - (void)applyUpdate:(ASThrashUpdate *)update toDataSource:(ASThrashDataSource *)dataSource { TableView *tableView = dataSource.tableView; @@ -535,7 +534,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; [tableView waitUntilAllUpdatesAreCommitted]; #endif } @catch (NSException *exception) { - [self logCurrentUpdateIfNeeded]; + _failed = YES; @throw exception; } } From 9c70cec8d88a0436f17cad7927e1d06682da4dcf Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 23 Jun 2016 16:58:23 -0700 Subject: [PATCH 010/247] Improve update handling more --- AsyncDisplayKit/ASCollectionView.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 68031f464a..63bbefc603 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -498,18 +498,21 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)insertSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController insertSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)deleteSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController deleteSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)reloadSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController reloadSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } @@ -522,18 +525,21 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)insertItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } From 681876bd59673872a97c185a8f21058cdf416135 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 23 Jun 2016 17:10:33 -0700 Subject: [PATCH 011/247] Fix more issues with data integrity --- AsyncDisplayKit/Private/_ASHierarchyChangeSet.m | 7 ++++++- AsyncDisplayKitTests/ASTableViewThrashTests.m | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index 26adef5cd1..0b2137fe75 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -131,6 +131,8 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) - (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection { + ASDisplayNodeAssertNotNil(_deletedSections, @"Cannot call %@ before `markCompleted` returns.", NSStringFromSelector(_cmd)); + ASDisplayNodeAssertNotNil(_insertedSections, @"Cannot call %@ before `markCompleted` returns.", NSStringFromSelector(_cmd)); [self _ensureCompleted]; if ([_deletedSections containsIndex:oldSection]) { return NSNotFound; @@ -225,6 +227,10 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) { @autoreleasepool { + // Give these their "pre-reloads" values. Once we add in the reloads we'll re-process them. + _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; + _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; + // Split reloaded section indexes into deletes and inserts // Delete the old section, insert the new section it corresponds to. for (_ASHierarchySectionChange *change in _reloadSectionChanges) { @@ -245,7 +251,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) [_ASHierarchySectionChange sortAndCoalesceChanges:_deleteSectionChanges]; [_ASHierarchySectionChange sortAndCoalesceChanges:_insertSectionChanges]; - [_ASHierarchySectionChange sortAndCoalesceChanges:_reloadSectionChanges]; _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index 02910a1d06..92b3cc2f2c 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -146,7 +146,7 @@ static volatile int32_t ASThrashTestSectionNextID = 1; } - (NSString *)description { - return [NSString stringWithFormat:@"
", (unsigned long)_sectionID, (unsigned long)self.items.count]; + return [NSString stringWithFormat:@"
", (unsigned long)_sectionID, (unsigned long)self.items.count, ASThrashArrayDescription(self.items)]; } - (id)copyWithZone:(NSZone *)zone { @@ -554,7 +554,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; XCTAssertEqual([tableView rectForRowAtIndexPath:indexPath].size.height, item.rowHeight); #else ASThrashTestNode *node = (ASThrashTestNode *)[tableView nodeForRowAtIndexPath:indexPath]; - XCTAssertEqual(node.item, item); + XCTAssertEqualObjects(node.item, item, @"Wrong node at index path %@", indexPath); #endif } } From d8d2524b89b07bb683dd0b968136b28f611550b7 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 23 Jun 2016 17:28:22 -0700 Subject: [PATCH 012/247] One more critical update integrity fix --- AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h | 4 ++-- AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m | 4 ++-- AsyncDisplayKit/Private/_ASHierarchyChangeSet.m | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h index 54e9ac0126..179e685639 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h @@ -17,8 +17,8 @@ /// Returns all the item indexes from the given index paths that are in the given section. + (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section; -/// If you've got an old index, and you insert items using this index set, this returns the new index. -- (NSUInteger)as_indexByInsertingItemsBelowIndex:(NSUInteger)index; +/// If you've got an old index, and you insert items using this index set, this returns the change to get to the new index. +- (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index; - (NSString *)as_smallDescription; diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m index feac7ec8d0..0837ad0eaa 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -46,7 +46,7 @@ return result; } -- (NSUInteger)as_indexByInsertingItemsBelowIndex:(NSUInteger)index +- (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index { __block NSUInteger newIndex = index; [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { @@ -56,7 +56,7 @@ *stop = YES; } }]; - return newIndex; + return newIndex - index; } - (NSString *)as_smallDescription diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index 0b2137fe75..e7218f6d23 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -139,7 +139,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) } NSUInteger newIndex = oldSection - [_deletedSections countOfIndexesInRange:NSMakeRange(0, oldSection)]; - newIndex = [_insertedSections as_indexByInsertingItemsBelowIndex:newIndex]; + newIndex += [_insertedSections as_indexChangeByInsertingItemsBelowIndex:newIndex]; return newIndex; } @@ -276,7 +276,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) item -= [indicesDeletedInSection countOfIndexesInRange:NSMakeRange(0, item)]; // Update row number based on insertions that are above the current row in the future section NSIndexSet *indicesInsertedInSection = insertedIndexPathsMap[@(section)]; - item = [indicesInsertedInSection as_indexByInsertingItemsBelowIndex:item]; + item += [indicesInsertedInSection as_indexChangeByInsertingItemsBelowIndex:item]; //TODO: reuse the old indexPath object if section and row aren't changed NSIndexPath *newIndexPath = [NSIndexPath indexPathForItem:item inSection:section]; From 5d72f2f2ccefc2d2aec9a0e2f08fe189aad0e6c2 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 23 Jun 2016 17:30:18 -0700 Subject: [PATCH 013/247] Enable the thrash testing --- AsyncDisplayKitTests/ASTableViewThrashTests.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index 92b3cc2f2c..62ddffdd90 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -20,8 +20,8 @@ #define TableView ASTableView #endif -#define kInitialSectionCount 20 -#define kInitialItemCount 20 +#define kInitialSectionCount 10 +#define kInitialItemCount 10 #define kMinimumItemCount 5 #define kMinimumSectionCount 3 #define kFickleness 0.1 @@ -488,7 +488,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; [self verifyDataSource:ds]; } -- (void)DISABLED_testThrashingWildly { +- (void)testThrashingWildly { for (NSInteger i = 0; i < kThrashingIterationCount; i++) { [self setUp]; ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:[ASThrashTestSection sectionsWithCount:kInitialSectionCount]]; From 84e8b2686c84edd98f53f4d15fe6b819bb840fc9 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 13:03:51 -0700 Subject: [PATCH 014/247] [ASDataController] Combine isolated reloads into a batch --- AsyncDisplayKit/Details/ASChangeSetDataController.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index 7802a6c1d5..f6615d1bdb 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -109,8 +109,10 @@ if ([self batchUpdating]) { [_changeSet reloadSections:sections animationOptions:animationOptions]; } else { + [self beginUpdates]; [super deleteSections:sections withAnimationOptions:animationOptions]; [super insertSections:sections withAnimationOptions:animationOptions]; + [self endUpdates]; } } @@ -153,8 +155,10 @@ if ([self batchUpdating]) { [_changeSet reloadItems:indexPaths animationOptions:animationOptions]; } else { + [self beginUpdates]; [super deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; [super insertRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; + [self endUpdates]; } } From 304f8f6cb1e06bcb9b720697d66d87792c825551 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 13:17:00 -0700 Subject: [PATCH 015/247] [ASHierarchyChangeSet] Clean up and add documentation --- .../Private/_ASHierarchyChangeSet.h | 4 ++-- .../Private/_ASHierarchyChangeSet.m | 21 ++++++++----------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index 9387a91d56..f514be705b 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -87,8 +87,8 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); - Inserted sections, ascending order - Inserted items, ascending order */ -- (NSArray <_ASHierarchySectionChange *> *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; -- (NSArray <_ASHierarchyItemChange *> *)itemChangesOfType:(_ASHierarchyChangeType)changeType; +- (nullable NSArray <_ASHierarchySectionChange *> *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; +- (nullable NSArray <_ASHierarchyItemChange *> *)itemChangesOfType:(_ASHierarchyChangeType)changeType; /// Returns all item indexes affected by changes of the given type in the given section. - (NSIndexSet *)indexesForItemChangesOfType:(_ASHierarchyChangeType)changeType inSection:(NSUInteger)section; diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index e7218f6d23..9075f36878 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -227,16 +227,16 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) { @autoreleasepool { + // Split reloaded sections into [delete(oldIndex), insert(newIndex)] + // Give these their "pre-reloads" values. Once we add in the reloads we'll re-process them. _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; - // Split reloaded section indexes into deletes and inserts - // Delete the old section, insert the new section it corresponds to. for (_ASHierarchySectionChange *change in _reloadSectionChanges) { NSIndexSet *newSections = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { NSUInteger newSec = [self newSectionForOldSection:idx]; - NSAssert(newSec != NSNotFound, nil); + NSAssert(newSec != NSNotFound, @"Request to reload deleted section %lu", (unsigned long)idx); return newSec; }]; @@ -254,13 +254,14 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; - // reload items changes need to be adjusted so that we access the correct indexPaths in the datasource + // Split reloaded items into [delete(oldIndexPath), insert(newIndexPath)] + NSDictionary *insertedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_insertItemChanges ofType:_ASHierarchyChangeTypeInsert]; NSDictionary *deletedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_deleteItemChanges ofType:_ASHierarchyChangeTypeDelete]; for (_ASHierarchyItemChange *change in _reloadItemChanges) { NSAssert(change.changeType == _ASHierarchyChangeTypeReload, @"It must be a reload change to be in here"); - NSMutableArray *newIndexPaths = [NSMutableArray array]; + NSMutableArray *newIndexPaths = [NSMutableArray arrayWithCapacity:change.indexPaths.count]; // Every indexPaths in the change need to update its section and/or row // depending on all the deletions and insertions @@ -278,7 +279,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) NSIndexSet *indicesInsertedInSection = insertedIndexPathsMap[@(section)]; item += [indicesInsertedInSection as_indexChangeByInsertingItemsBelowIndex:item]; - //TODO: reuse the old indexPath object if section and row aren't changed NSIndexPath *newIndexPath = [NSIndexPath indexPathForItem:item inSection:section]; [newIndexPaths addObject:newIndexPath]; } @@ -291,7 +291,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) _ASHierarchyItemChange *insertItemChangeFromReloadChange = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexPaths:newIndexPaths animationOptions:change.animationOptions presorted:NO]; [_insertItemChanges addObject:insertItemChangeFromReloadChange]; } - [_reloadItemChanges removeAllObjects]; + _reloadItemChanges = nil; // Ignore item deletes in reloaded/deleted sections. [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:_deletedSections]; @@ -436,7 +436,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return sectionToIndexSetMap; } -+ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)sections ++ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)ignoredSections { if (changes.count < 1) { return; @@ -450,12 +450,9 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) // All changed index paths, sorted NSMutableArray *allIndexPaths = [NSMutableArray new]; - NSPredicate *indexPathInValidSection = [NSPredicate predicateWithBlock:^BOOL(NSIndexPath *indexPath, __unused NSDictionary *_) { - return ![sections containsIndex:indexPath.section]; - }]; for (_ASHierarchyItemChange *change in changes) { for (NSIndexPath *indexPath in change.indexPaths) { - if ([indexPathInValidSection evaluateWithObject:indexPath]) { + if (![ignoredSections containsIndex:indexPath.section]) { animationOptions[indexPath] = @(change.animationOptions); [allIndexPaths addObject:indexPath]; } From 27dc52c0c506e689d988373e8379bccd294cf38c Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 13:20:06 -0700 Subject: [PATCH 016/247] [ASHierarchyChangeSet] Document reload-splitting behavior --- AsyncDisplayKit/Private/_ASHierarchyChangeSet.h | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index f514be705b..782607fd0c 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -71,6 +71,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); @property (nonatomic, readonly) BOOL completed; /// Call this once the change set has been constructed to prevent future modifications to the changeset. Calling this more than once is a programmer error. +/// NOTE: Calling this method will cause the changeset to convert all reloads into delete/insert pairs. - (void)markCompleted; /** From 0a525a3c16f3dca6245f2b9be4677f85f56ff8d7 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 13:52:16 -0700 Subject: [PATCH 017/247] [ASFlowLayoutController] Fix enumeration bug in ASFlowLayoutController --- AsyncDisplayKit/Details/ASFlowLayoutController.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/AsyncDisplayKit/Details/ASFlowLayoutController.mm index cb754bb9bf..ffd553ba96 100644 --- a/AsyncDisplayKit/Details/ASFlowLayoutController.mm +++ b/AsyncDisplayKit/Details/ASFlowLayoutController.mm @@ -92,12 +92,12 @@ currPath.row++; // Once we reach the end of the section, advance to the next one. Keep advancing if the next section is zero-sized. - while (currPath.row >= [(NSArray *)completedNodes[currPath.section] count] && currPath.section < completedNodes.count - 1) { + while (currPath.row >= [(NSArray *)completedNodes[currPath.section] count] && currPath.section < endPath.section) { currPath.row = 0; currPath.section++; - ASDisplayNodeAssert(currPath.section <= endPath.section, @"currPath should never reach a further section than endPath"); } } + ASDisplayNodeAssert(currPath.section <= endPath.section, @"currPath should never reach a further section than endPath"); [indexPathSet addObject:[NSIndexPath indexPathWithASIndexPath:endPath]]; From 211dcdf0e8f827347c3fceecd019067728b8ad6d Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 13:56:08 -0700 Subject: [PATCH 018/247] [_ASHierarchyChangeSet] Remove unused new method --- .../Private/_ASHierarchyChangeSet.h | 8 ------- .../Private/_ASHierarchyChangeSet.m | 24 ------------------- 2 files changed, 32 deletions(-) diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index 782607fd0c..755d82004d 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -60,14 +60,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); */ - (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection; -/** - Get the index path after the update for the item at the given index path before the update. - - @precondition The change set must be completed. - @returns The new index path, or nil if the given item (or its section) was deleted. - */ -- (nullable NSIndexPath *)newIndexPathForOldIndexPath:(NSIndexPath *)indexPath; - @property (nonatomic, readonly) BOOL completed; /// Call this once the change set has been constructed to prevent future modifications to the changeset. Calling this more than once is a programmer error. diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index 9075f36878..d1b54438a0 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -143,30 +143,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return newIndex; } -- (nullable NSIndexPath *)newIndexPathForOldIndexPath:(NSIndexPath *)indexPath -{ - [self _ensureCompleted]; - // If section was deleted, nil - NSUInteger oldSection = indexPath.section; - NSUInteger newSection = [self newSectionForOldSection:oldSection]; - if (newSection == NSNotFound) { - return nil; - } - - NSUInteger newItem = indexPath.item; - NSIndexSet *deletedItemsInOldSection = [self indexesForItemChangesOfType:_ASHierarchyChangeTypeDelete inSection:oldSection]; - newItem -= [deletedItemsInOldSection countOfIndexesInRange:NSMakeRange(0, newItem)]; - - for (_ASHierarchyItemChange *change in _deleteItemChanges) { - // If item was deleted, nil - if ([change.indexPaths containsObject:indexPath]) { - return nil; - } - } - - return [NSIndexPath indexPathForItem:newItem inSection:newSection]; -} - - (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options { [self _ensureNotCompleted]; From 0a354f8f4eaf6ddfb44b891a4d8f102453c27ed2 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 24 Jun 2016 15:48:23 -0700 Subject: [PATCH 019/247] [ASDataController] Remove implementation for unused hooks --- AsyncDisplayKit/Details/ASDataController.mm | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 74869de0d7..163b812e10 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -725,16 +725,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; // Optional template hook for subclasses (See ASDataController+Subclasses.h) } -- (void)prepareForReloadSections:(NSIndexSet *)sections -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - -- (void)willReloadSections:(NSIndexSet *)sections -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { // Optional template hook for subclasses (See ASDataController+Subclasses.h) From 3fb0e185049c77ebdc53e8e5df67cb01b5159031 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 24 Jun 2016 16:49:05 -0700 Subject: [PATCH 020/247] [ASTextNode] Further locking improvements for ASTextNode (#1813) * Further locking improvements for ASTextNode * Remove tighter holding of lock as this operation needs to complete with the lock held --- AsyncDisplayKit/ASTextNode.mm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 95d441452d..a1e3d6c3e7 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -326,8 +326,8 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; ASLayout *layout = self.calculatedLayout; - std::lock_guard l(_textLock); if (layout != nil) { + std::lock_guard l(_textLock); _constrainedSize = layout.size; _renderer.constrainedSize = layout.size; } @@ -713,6 +713,8 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; } if (highlightTargetLayer != nil) { + std::lock_guard l(_textLock); + NSArray *highlightRects = [[self _renderer] rectsForTextRange:highlightRange measureOption:ASTextKitRendererMeasureOptionBlock]; NSMutableArray *converted = [NSMutableArray arrayWithCapacity:highlightRects.count]; for (NSValue *rectValue in highlightRects) { @@ -906,8 +908,6 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI { ASDisplayNodeAssertMainThread(); - std::lock_guard l(_textLock); - [super touchesBegan:touches withEvent:event]; CGPoint point = [[touches anyObject] locationInView:self.view]; @@ -926,7 +926,11 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI BOOL linkCrossesVisibleRange = (lastCharIndex > range.location) && (lastCharIndex < NSMaxRange(range) - 1); if (inAdditionalTruncationMessage) { - NSRange visibleRange = [self _renderer].firstVisibleRange; + NSRange visibleRange = NSMakeRange(0, 0); + { + std::lock_guard l(_textLock); + visibleRange = [self _renderer].firstVisibleRange; + } NSRange truncationMessageRange = [self _additionalTruncationMessageRangeWithVisibleRange:visibleRange]; [self _setHighlightRange:truncationMessageRange forAttributeName:ASTextNodeTruncationTokenAttributeName value:nil animated:YES]; } else if (range.length && !linkCrossesVisibleRange && linkAttributeValue != nil && linkAttributeName != nil) { From e4abe898d5b15d28bc1eff6ea5cb91ee87690961 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Fri, 24 Jun 2016 16:53:10 -0700 Subject: [PATCH 021/247] [ASEditableTextNode] Support UITextInputTraits pass-through methods (threadsafe for use before view creation) (#1809) * [ASEditableTextNode] Support UITextInputTraits * consistent property attributes * remove logging, fix tests to account for UIKit weirdness * address @appleguy's comments --- AsyncDisplayKit/ASEditableTextNode.h | 13 +- AsyncDisplayKit/ASEditableTextNode.mm | 257 ++++++++++++++++-- .../ASEditableTextNodeTests.m | 88 +++++- 3 files changed, 332 insertions(+), 26 deletions(-) diff --git a/AsyncDisplayKit/ASEditableTextNode.h b/AsyncDisplayKit/ASEditableTextNode.h index 92e720f211..1ca7040b93 100644 --- a/AsyncDisplayKit/ASEditableTextNode.h +++ b/AsyncDisplayKit/ASEditableTextNode.h @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN @abstract Implements a node that supports text editing. @discussion Does not support layer backing. */ -@interface ASEditableTextNode : ASDisplayNode +@interface ASEditableTextNode : ASDisplayNode /** * @abstract Initializes an editable text node using default TextKit components. @@ -93,9 +93,16 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readwrite) UIEdgeInsets textContainerInset; /** - @abstract The returnKeyType of the keyboard. This value defaults to UIReturnKeyDefault. + @abstract properties. */ -@property (nonatomic, readwrite) UIReturnKeyType returnKeyType; +@property(nonatomic, readwrite, assign) UITextAutocapitalizationType autocapitalizationType; // default is UITextAutocapitalizationTypeSentences +@property(nonatomic, readwrite, assign) UITextAutocorrectionType autocorrectionType; // default is UITextAutocorrectionTypeDefault +@property(nonatomic, readwrite, assign) UITextSpellCheckingType spellCheckingType; // default is UITextSpellCheckingTypeDefault; +@property(nonatomic, readwrite, assign) UIKeyboardType keyboardType; // default is UIKeyboardTypeDefault +@property(nonatomic, readwrite, assign) UIKeyboardAppearance keyboardAppearance; // default is UIKeyboardAppearanceDefault +@property(nonatomic, readwrite, assign) UIReturnKeyType returnKeyType; // default is UIReturnKeyDefault (See note under UIReturnKeyType enum) +@property(nonatomic, readwrite, assign) BOOL enablesReturnKeyAutomatically; // default is NO (when YES, will automatically disable return key when text widget has zero-length contents, and will automatically enable when text widget has non-zero-length contents) +@property(nonatomic, readwrite, assign, getter=isSecureTextEntry) BOOL secureTextEntry; // default is NO /** @abstract Indicates whether the receiver's text view is the first responder, and thus has the keyboard visible and is prepared for editing by the user. diff --git a/AsyncDisplayKit/ASEditableTextNode.mm b/AsyncDisplayKit/ASEditableTextNode.mm index fda9fd6e52..2ea00acf12 100644 --- a/AsyncDisplayKit/ASEditableTextNode.mm +++ b/AsyncDisplayKit/ASEditableTextNode.mm @@ -17,6 +17,42 @@ #import "ASTextNodeWordKerner.h" #import "ASThread.h" +/** + @abstract Object to hold UITextView's pending UITextInputTraits +**/ +@interface _ASTextInputTraitsPendingState : NSObject + +@property (nonatomic, readwrite, assign) UITextAutocapitalizationType autocapitalizationType; +@property (nonatomic, readwrite, assign) UITextAutocorrectionType autocorrectionType; +@property (nonatomic, readwrite, assign) UITextSpellCheckingType spellCheckingType; +@property (nonatomic, readwrite, assign) UIKeyboardAppearance keyboardAppearance; +@property (nonatomic, readwrite, assign) UIKeyboardType keyboardType; +@property (nonatomic, readwrite, assign) UIReturnKeyType returnKeyType; +@property (nonatomic, readwrite, assign) BOOL enablesReturnKeyAutomatically; +@property (nonatomic, readwrite, assign, getter=isSecureTextEntry) BOOL secureTextEntry; + +@end + +@implementation _ASTextInputTraitsPendingState + +- (instancetype)init +{ + if (!(self = [super init])) + return nil; + + // set default values, as defined in Apple's comments in UITextInputTraits.h + _autocapitalizationType = UITextAutocapitalizationTypeSentences; + _autocorrectionType = UITextAutocorrectionTypeDefault; + _spellCheckingType = UITextSpellCheckingTypeDefault; + _keyboardAppearance = UIKeyboardAppearanceDefault; + _keyboardType = UIKeyboardTypeDefault; + _returnKeyType = UIReturnKeyDefault; + + return self; +} + +@end + /** @abstract As originally reported in rdar://14729288, when scrollEnabled = NO, UITextView does not calculate its contentSize. This makes it difficult @@ -85,6 +121,10 @@ ASTextKitComponents *_placeholderTextKitComponents; // Forwards NSLayoutManagerDelegate methods related to word kerning ASTextNodeWordKerner *_wordKerner; + + // UITextInputTraits + ASDN::RecursiveMutex _textInputTraitsLock; + _ASTextInputTraitsPendingState *_textInputTraits; // Misc. State. BOOL _displayingPlaceholder; // Defaults to YES. @@ -93,6 +133,8 @@ NSRange _previousSelectedRange; } +@property (nonatomic, strong, readonly) _ASTextInputTraitsPendingState *textInputTraits; + @end @implementation ASEditableTextNode @@ -117,13 +159,12 @@ _textKitComponents = textKitComponents; _textKitComponents.layoutManager.delegate = self; _wordKerner = [[ASTextNodeWordKerner alloc] init]; - _returnKeyType = UIReturnKeyDefault; _textContainerInset = UIEdgeInsetsZero; // Create the placeholder scaffolding. _placeholderTextKitComponents = placeholderTextKitComponents; _placeholderTextKitComponents.layoutManager.delegate = self; - + return self; } @@ -151,8 +192,6 @@ { [super didLoad]; - ASDN::MutexLocker l(_textKitLock); - void (^configureTextView)(UITextView *) = ^(UITextView *textView) { if (!_displayingPlaceholder || textView != _textKitComponents.textView) { // If showing the placeholder, don't propagate backgroundColor/opaque to the editable textView. It is positioned over the placeholder to accept taps to begin editing, and if it's opaque/colored then it'll obscure the placeholder. @@ -164,28 +203,48 @@ textView.opaque = NO; } textView.textContainerInset = self.textContainerInset; + + // Configure textView with UITextInputTraits + { + ASDN::MutexLocker l(_textInputTraitsLock); + if (_textInputTraits) { + textView.autocapitalizationType = _textInputTraits.autocapitalizationType; + textView.autocorrectionType = _textInputTraits.autocorrectionType; + textView.spellCheckingType = _textInputTraits.spellCheckingType; + textView.keyboardType = _textInputTraits.keyboardType; + textView.keyboardAppearance = _textInputTraits.keyboardAppearance; + textView.returnKeyType = _textInputTraits.returnKeyType; + textView.enablesReturnKeyAutomatically = _textInputTraits.enablesReturnKeyAutomatically; + textView.secureTextEntry = _textInputTraits.isSecureTextEntry; + } + } + + [self.view addSubview:textView]; }; + ASDN::MutexLocker l(_textKitLock); + // Create and configure the placeholder text view. _placeholderTextKitComponents.textView = [[UITextView alloc] initWithFrame:CGRectZero textContainer:_placeholderTextKitComponents.textContainer]; _placeholderTextKitComponents.textView.userInteractionEnabled = NO; _placeholderTextKitComponents.textView.accessibilityElementsHidden = YES; configureTextView(_placeholderTextKitComponents.textView); - [self.view addSubview:_placeholderTextKitComponents.textView]; // Create and configure our text view. - _textKitComponents.textView = self.textView; + _textKitComponents.textView = [[ASPanningOverriddenUITextView alloc] initWithFrame:CGRectZero textContainer:_textKitComponents.textContainer]; _textKitComponents.textView.scrollEnabled = _scrollEnabled; _textKitComponents.textView.delegate = self; #if TARGET_OS_IOS _textKitComponents.textView.editable = YES; #endif _textKitComponents.textView.typingAttributes = _typingAttributes; - _textKitComponents.textView.returnKeyType = _returnKeyType; _textKitComponents.textView.accessibilityHint = _placeholderTextKitComponents.textStorage.string; configureTextView(_textKitComponents.textView); - [self.view addSubview:_textKitComponents.textView]; + [self _updateDisplayingPlaceholder]; + + // once view is loaded, setters set directly on view + _textInputTraits = nil; } - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize @@ -261,9 +320,8 @@ - (UITextView *)textView { ASDisplayNodeAssertMainThread(); - if (!_textKitComponents.textView) { - _textKitComponents.textView = [[ASPanningOverriddenUITextView alloc] initWithFrame:CGRectZero textContainer:_textKitComponents.textContainer]; - } + [self view]; + ASDisplayNodeAssert(_textKitComponents.textView != nil, @"UITextView must be created in -[ASEditableTextNode didLoad]"); return _textKitComponents.textView; } @@ -425,13 +483,6 @@ return [_textKitComponents.textView textInputMode]; } -- (void)setReturnKeyType:(UIReturnKeyType)returnKeyType -{ - ASDN::MutexLocker l(_textKitLock); - _returnKeyType = returnKeyType; - [_textKitComponents.textView setReturnKeyType:_returnKeyType]; -} - - (BOOL)isFirstResponder { ASDN::MutexLocker l(_textKitLock); @@ -460,6 +511,176 @@ return [_textKitComponents.textView resignFirstResponder]; } +#pragma mark - UITextInputTraits + +- (_ASTextInputTraitsPendingState *)textInputTraits +{ + if (!_textInputTraits) { + _textInputTraits = [[_ASTextInputTraitsPendingState alloc] init]; + } + return _textInputTraits; +} + +- (void)setAutocapitalizationType:(UITextAutocapitalizationType)autocapitalizationType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setAutocapitalizationType:autocapitalizationType]; + } else { + [self.textInputTraits setAutocapitalizationType:autocapitalizationType]; + } +} + +- (UITextAutocapitalizationType)autocapitalizationType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView autocapitalizationType]; + } else { + return [self.textInputTraits autocapitalizationType]; + } +} + +- (void)setAutocorrectionType:(UITextAutocorrectionType)autocorrectionType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setAutocorrectionType:autocorrectionType]; + } else { + [self.textInputTraits setAutocorrectionType:autocorrectionType]; + } +} + +- (UITextAutocorrectionType)autocorrectionType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView autocorrectionType]; + } else { + return [self.textInputTraits autocorrectionType]; + } +} + +- (void)setSpellCheckingType:(UITextSpellCheckingType)spellCheckingType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setSpellCheckingType:spellCheckingType]; + } else { + [self.textInputTraits setSpellCheckingType:spellCheckingType]; + } +} + +- (UITextSpellCheckingType)spellCheckingType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView spellCheckingType]; + } else { + return [self.textInputTraits spellCheckingType]; + } +} + +- (void)setEnablesReturnKeyAutomatically:(BOOL)enablesReturnKeyAutomatically +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setEnablesReturnKeyAutomatically:enablesReturnKeyAutomatically]; + } else { + [self.textInputTraits setEnablesReturnKeyAutomatically:enablesReturnKeyAutomatically]; + } +} + +- (BOOL)enablesReturnKeyAutomatically +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView enablesReturnKeyAutomatically]; + } else { + return [self.textInputTraits enablesReturnKeyAutomatically]; + } +} + +- (void)setKeyboardAppearance:(UIKeyboardAppearance)setKeyboardAppearance +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setKeyboardAppearance:setKeyboardAppearance]; + } else { + [self.textInputTraits setKeyboardAppearance:setKeyboardAppearance]; + } +} + +- (UIKeyboardAppearance)keyboardAppearance +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView keyboardAppearance]; + } else { + return [self.textInputTraits keyboardAppearance]; + } +} + +- (void)setKeyboardType:(UIKeyboardType)keyboardType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setKeyboardType:keyboardType]; + } else { + [self.textInputTraits setKeyboardType:keyboardType]; + } +} + +- (UIKeyboardType)keyboardType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView keyboardType]; + } else { + return [self.textInputTraits keyboardType]; + } +} + +- (void)setReturnKeyType:(UIReturnKeyType)returnKeyType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setReturnKeyType:returnKeyType]; + } else { + [self.textInputTraits setReturnKeyType:returnKeyType]; + } +} + +- (UIReturnKeyType)returnKeyType +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView returnKeyType]; + } else { + return [self.textInputTraits returnKeyType]; + } +} + +- (void)setSecureTextEntry:(BOOL)secureTextEntry +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + [self.textView setSecureTextEntry:secureTextEntry]; + } else { + [self.textInputTraits setSecureTextEntry:secureTextEntry]; + } +} + +- (BOOL)isSecureTextEntry +{ + ASDN::MutexLocker l(_textInputTraitsLock); + if (self.isNodeLoaded) { + return [self.textView isSecureTextEntry]; + } else { + return [self.textInputTraits isSecureTextEntry]; + } +} + #pragma mark - UITextView Delegate - (void)textViewDidBeginEditing:(UITextView *)textView { diff --git a/AsyncDisplayKitTests/ASEditableTextNodeTests.m b/AsyncDisplayKitTests/ASEditableTextNodeTests.m index 43d415ac51..83960f7331 100644 --- a/AsyncDisplayKitTests/ASEditableTextNodeTests.m +++ b/AsyncDisplayKitTests/ASEditableTextNodeTests.m @@ -47,7 +47,6 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) _attributedText = mas; _editableTextNode.attributedText = _attributedText; - } #pragma mark - ASEditableTextNode @@ -55,10 +54,89 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) - (void)testAllocASEditableTextNode { ASEditableTextNode *node = [[ASEditableTextNode alloc] init]; - XCTAssertTrue([[node class] isSubclassOfClass:[ASEditableTextNode class]], @"ASTextNode alloc should return an instance of ASTextNode, instead returned %@", [node class]); + XCTAssertTrue([[node class] isSubclassOfClass:[ASEditableTextNode class]], @"ASEditableTextNode alloc should return an instance of ASEditableTextNode, instead returned %@", [node class]); } -#pragma mark - ASEditableTextNode +#pragma mark - ASEditableTextNode Tests + +- (void)testUITextInputTraitDefaults +{ + ASEditableTextNode *editableTextNode = [[ASEditableTextNode alloc] init]; + + XCTAssertTrue(editableTextNode.autocapitalizationType == UITextAutocapitalizationTypeSentences, @"_ASTextInputTraitsPendingState's autocapitalizationType default should be UITextAutocapitalizationTypeSentences."); + XCTAssertTrue(editableTextNode.autocorrectionType == UITextAutocorrectionTypeDefault, @"_ASTextInputTraitsPendingState's autocorrectionType default should be UITextAutocorrectionTypeDefault."); + XCTAssertTrue(editableTextNode.spellCheckingType == UITextSpellCheckingTypeDefault, @"_ASTextInputTraitsPendingState's spellCheckingType default should be UITextSpellCheckingTypeDefault."); + XCTAssertTrue(editableTextNode.keyboardType == UIKeyboardTypeDefault, @"_ASTextInputTraitsPendingState's keyboardType default should be UIKeyboardTypeDefault."); + XCTAssertTrue(editableTextNode.keyboardAppearance == UIKeyboardAppearanceDefault, @"_ASTextInputTraitsPendingState's keyboardAppearance default should be UIKeyboardAppearanceDefault."); + XCTAssertTrue(editableTextNode.returnKeyType == UIReturnKeyDefault, @"_ASTextInputTraitsPendingState's returnKeyType default should be UIReturnKeyDefault."); + XCTAssertTrue(editableTextNode.enablesReturnKeyAutomatically == NO, @"_ASTextInputTraitsPendingState's enablesReturnKeyAutomatically default should be NO."); + XCTAssertTrue(editableTextNode.isSecureTextEntry == NO, @"_ASTextInputTraitsPendingState's isSecureTextEntry default should be NO."); + + XCTAssertTrue(editableTextNode.textView.autocapitalizationType == UITextAutocapitalizationTypeSentences, @"textView's autocapitalizationType default should be UITextAutocapitalizationTypeSentences."); + XCTAssertTrue(editableTextNode.textView.autocorrectionType == UITextAutocorrectionTypeDefault, @"textView's autocorrectionType default should be UITextAutocorrectionTypeDefault."); + XCTAssertTrue(editableTextNode.textView.spellCheckingType == UITextSpellCheckingTypeDefault, @"textView's spellCheckingType default should be UITextSpellCheckingTypeDefault."); + XCTAssertTrue(editableTextNode.textView.keyboardType == UIKeyboardTypeDefault, @"textView's keyboardType default should be UIKeyboardTypeDefault."); + XCTAssertTrue(editableTextNode.textView.keyboardAppearance == UIKeyboardAppearanceDefault, @"textView's keyboardAppearance default should be UIKeyboardAppearanceDefault."); + XCTAssertTrue(editableTextNode.textView.returnKeyType == UIReturnKeyDefault, @"textView's returnKeyType default should be UIReturnKeyDefault."); + XCTAssertTrue(editableTextNode.textView.enablesReturnKeyAutomatically == NO, @"textView's enablesReturnKeyAutomatically default should be NO."); + XCTAssertTrue(editableTextNode.textView.isSecureTextEntry == NO, @"textView's isSecureTextEntry default should be NO."); +} + +- (void)testUITextInputTraitsSetTraitsBeforeViewLoaded +{ + // UITextView ignores any values set on the first 3 properties below if secureTextEntry is enabled. + // Because of this UIKit behavior, we'll test secure entry seperately + ASEditableTextNode *editableTextNode = [[ASEditableTextNode alloc] init]; + + editableTextNode.autocapitalizationType = UITextAutocapitalizationTypeWords; + editableTextNode.autocorrectionType = UITextAutocorrectionTypeYes; + editableTextNode.spellCheckingType = UITextSpellCheckingTypeYes; + editableTextNode.keyboardType = UIKeyboardTypeTwitter; + editableTextNode.keyboardAppearance = UIKeyboardAppearanceDark; + editableTextNode.returnKeyType = UIReturnKeyGo; + editableTextNode.enablesReturnKeyAutomatically = YES; + + XCTAssertTrue(editableTextNode.textView.autocapitalizationType == UITextAutocapitalizationTypeWords, @"textView's autocapitalizationType should be UITextAutocapitalizationTypeAllCharacters."); + XCTAssertTrue(editableTextNode.textView.autocorrectionType == UITextAutocorrectionTypeYes, @"textView's autocorrectionType should be UITextAutocorrectionTypeYes."); + XCTAssertTrue(editableTextNode.textView.spellCheckingType == UITextSpellCheckingTypeYes, @"textView's spellCheckingType should be UITextSpellCheckingTypeYes."); + XCTAssertTrue(editableTextNode.textView.keyboardType == UIKeyboardTypeTwitter, @"textView's keyboardType should be UIKeyboardTypeTwitter."); + XCTAssertTrue(editableTextNode.textView.keyboardAppearance == UIKeyboardAppearanceDark, @"textView's keyboardAppearance should be UIKeyboardAppearanceDark."); + XCTAssertTrue(editableTextNode.textView.returnKeyType == UIReturnKeyGo, @"textView's returnKeyType should be UIReturnKeyGo."); + XCTAssertTrue(editableTextNode.textView.enablesReturnKeyAutomatically == YES, @"textView's enablesReturnKeyAutomatically should be YES."); + + ASEditableTextNode *secureEditableTextNode = [[ASEditableTextNode alloc] init]; + secureEditableTextNode.secureTextEntry = YES; + + XCTAssertTrue(secureEditableTextNode.textView.secureTextEntry == YES, @"textView's isSecureTextEntry should be YES."); +} + +- (void)testUITextInputTraitsChangeTraitAfterViewLoaded +{ + // UITextView ignores any values set on the first 3 properties below if secureTextEntry is enabled. + // Because of this UIKit behavior, we'll test secure entry seperately + ASEditableTextNode *editableTextNode = [[ASEditableTextNode alloc] init]; + + editableTextNode.textView.autocapitalizationType = UITextAutocapitalizationTypeWords; + editableTextNode.textView.autocorrectionType = UITextAutocorrectionTypeYes; + editableTextNode.textView.spellCheckingType = UITextSpellCheckingTypeYes; + editableTextNode.textView.keyboardType = UIKeyboardTypeTwitter; + editableTextNode.textView.keyboardAppearance = UIKeyboardAppearanceDark; + editableTextNode.textView.returnKeyType = UIReturnKeyGo; + editableTextNode.textView.enablesReturnKeyAutomatically = YES; + + XCTAssertTrue(editableTextNode.textView.autocapitalizationType == UITextAutocapitalizationTypeWords, @"textView's autocapitalizationType should be UITextAutocapitalizationTypeAllCharacters."); + XCTAssertTrue(editableTextNode.textView.autocorrectionType == UITextAutocorrectionTypeYes, @"textView's autocorrectionType should be UITextAutocorrectionTypeYes."); + XCTAssertTrue(editableTextNode.textView.spellCheckingType == UITextSpellCheckingTypeYes, @"textView's spellCheckingType should be UITextSpellCheckingTypeYes."); + XCTAssertTrue(editableTextNode.textView.keyboardType == UIKeyboardTypeTwitter, @"textView's keyboardType should be UIKeyboardTypeTwitter."); + XCTAssertTrue(editableTextNode.textView.keyboardAppearance == UIKeyboardAppearanceDark, @"textView's keyboardAppearance should be UIKeyboardAppearanceDark."); + XCTAssertTrue(editableTextNode.textView.returnKeyType == UIReturnKeyGo, @"textView's returnKeyType should be UIReturnKeyGo."); + XCTAssertTrue(editableTextNode.textView.enablesReturnKeyAutomatically == YES, @"textView's enablesReturnKeyAutomatically should be YES."); + + ASEditableTextNode *secureEditableTextNode = [[ASEditableTextNode alloc] init]; + secureEditableTextNode.textView.secureTextEntry = YES; + + XCTAssertTrue(secureEditableTextNode.textView.secureTextEntry == YES, @"textView's isSecureTextEntry should be YES."); +} - (void)testSetPreferredFrameSize { @@ -66,8 +144,8 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) _editableTextNode.preferredFrameSize = preferredFrameSize; CGSize calculatedSize = [_editableTextNode measure:CGSizeZero]; - XCTAssertTrue(calculatedSize.width != preferredFrameSize.width, @"Calculated width (%f) should be equal than preferred width (%f)", calculatedSize.width, preferredFrameSize.width); - XCTAssertTrue(calculatedSize.width != preferredFrameSize.width, @"Calculated height (%f) should be equal than preferred height (%f)", calculatedSize.width, preferredFrameSize.width); + XCTAssertTrue(calculatedSize.width != preferredFrameSize.width, @"Calculated width (%f) should be equal to preferred width (%f)", calculatedSize.width, preferredFrameSize.width); + XCTAssertTrue(calculatedSize.width != preferredFrameSize.width, @"Calculated height (%f) should be equal to preferred height (%f)", calculatedSize.width, preferredFrameSize.width); _editableTextNode.preferredFrameSize = CGSizeZero; } From 2e4b1ea05309df85353234bca82077477f6fd7f9 Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Sat, 25 Jun 2016 00:22:28 -0700 Subject: [PATCH 022/247] [ASCellNode] Fix selection / highlight implementation --- AsyncDisplayKit/ASCellNode+Internal.h | 15 +++-- AsyncDisplayKit/ASCellNode.h | 13 ++-- AsyncDisplayKit/ASCellNode.mm | 32 ++++++++- AsyncDisplayKit/ASCollectionView.mm | 60 ++++++++++++++--- AsyncDisplayKit/ASTableView.mm | 63 ++++++++++++++---- AsyncDisplayKitTests/ASCollectionViewTests.m | 70 +++++++++++++++++++- 6 files changed, 216 insertions(+), 37 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode+Internal.h b/AsyncDisplayKit/ASCellNode+Internal.h index c497fc07d5..b185d4ed01 100644 --- a/AsyncDisplayKit/ASCellNode+Internal.h +++ b/AsyncDisplayKit/ASCellNode+Internal.h @@ -12,7 +12,7 @@ #import "ASCellNode.h" -@protocol ASCellNodeLayoutDelegate +@protocol ASCellNodeInteractionDelegate /** * Notifies the delegate that the specified cell node has done a relayout. @@ -27,14 +27,19 @@ */ - (void)nodeDidRelayout:(ASCellNode *)node sizeChanged:(BOOL)sizeChanged; +/* + * Methods to be called whenever the selection or highlight state changes + * on ASCellNode. UIKit internally stores these values to update reusable cells. + */ + +- (void)nodeSelectedStateDidChange:(ASCellNode *)node; +- (void)nodeHighlightedStateDidChange:(ASCellNode *)node; + @end @interface ASCellNode () -/* - * A delegate to be notified (on main thread) after a relayout. - */ -@property (nonatomic, weak) id layoutDelegate; +@property (nonatomic, weak) id interactionDelegate; /* * Back-pointer to the containing scrollView instance, set only for visible cells. Used for Cell Visibility Event callbacks. diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index e70d67efb5..ea659ae330 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -81,14 +81,16 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { @property (nonatomic) UITableViewCellSelectionStyle selectionStyle; /** - * A Boolean value that indicates whether the node is selected. + * A Boolean value that is synchronized with the underlying collection or tableView cell property. + * Setting this value is equivalent to calling selectItem / deselectItem on the collection or table. */ -@property (nonatomic, assign) BOOL selected; +@property (nonatomic, assign, getter=isSelected) BOOL selected; /** - * A Boolean value that indicates whether the node is highlighted. + * A Boolean value that is synchronized with the underlying collection or tableView cell property. + * Setting this value is equivalent to calling highlightItem / unHighlightItem on the collection or table. */ -@property (nonatomic, assign) BOOL highlighted; +@property (nonatomic, assign, getter=isHighlighted) BOOL highlighted; /* * ASCellNode must forward touch events in order for UITableView and UICollectionView tap handling to work. Overriding @@ -148,6 +150,9 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { */ @property (nonatomic, assign) UIEdgeInsets textInsets; +- (BOOL)selected ASDISPLAYNODE_DEPRECATED; +- (BOOL)highlighted ASDISPLAYNODE_DEPRECATED; + @end NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index 1bc660c41b..851521a857 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -36,7 +36,7 @@ @end @implementation ASCellNode -@synthesize layoutDelegate = _layoutDelegate; +@synthesize interactionDelegate = _interactionDelegate; - (instancetype)init { @@ -170,14 +170,40 @@ - (void)didRelayoutFromOldSize:(CGSize)oldSize toNewSize:(CGSize)newSize { - if (_layoutDelegate != nil) { + if (_interactionDelegate != nil) { ASPerformBlockOnMainThread(^{ BOOL sizeChanged = !CGSizeEqualToSize(oldSize, newSize); - [_layoutDelegate nodeDidRelayout:self sizeChanged:sizeChanged]; + [_interactionDelegate nodeDidRelayout:self sizeChanged:sizeChanged]; }); } } +- (void)setSelected:(BOOL)selected +{ + if (_selected != selected) { + _selected = selected; + [_interactionDelegate nodeSelectedStateDidChange:self]; + } +} + +- (void)setHighlighted:(BOOL)highlighted +{ + if (_highlighted != highlighted) { + _highlighted = highlighted; + [_interactionDelegate nodeHighlightedStateDidChange:self]; + } +} + +- (BOOL)selected +{ + return self.isSelected; +} + +- (BOOL)highlighted +{ + return self.isSelected; +} + #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-missing-super-calls" diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 68031f464a..e90d6e398b 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -42,20 +42,39 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)setNode:(ASCellNode *)node { _node = node; - node.selected = self.selected; - node.highlighted = self.highlighted; + if (node.selected != self.selected) { + node.selected = self.selected; + } + if (node.highlighted != self.highlighted) { + node.highlighted = self.highlighted; + } } - (void)setSelected:(BOOL)selected { - [super setSelected:selected]; - _node.selected = selected; + if (selected != self.selected) { + [super setSelected:selected]; + } + if (selected != _node.selected) { + _node.selected = selected; + } } - (void)setHighlighted:(BOOL)highlighted { - [super setHighlighted:highlighted]; - _node.highlighted = highlighted; + if (highlighted != self.highlighted) { + [super setHighlighted:highlighted]; + } + if (highlighted != _node.highlighted) { + _node.highlighted = highlighted; + } +} + +- (void)prepareForReuse +{ + // Need to clear node pointer before UIKit calls setSelected:NO / setHighlighted:NO on its cells + self.node = nil; + [super prepareForReuse]; } - (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes @@ -98,7 +117,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; #pragma mark - #pragma mark ASCollectionView. -@interface ASCollectionView () { +@interface ASCollectionView () { ASCollectionViewProxy *_proxyDataSource; ASCollectionViewProxy *_proxyDelegate; @@ -864,8 +883,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; return ^{ __typeof__(self) strongSelf = weakSelf; [node enterHierarchyState:ASHierarchyStateRangeManaged]; - if (node.layoutDelegate == nil) { - node.layoutDelegate = strongSelf; + if (node.interactionDelegate == nil) { + node.interactionDelegate = strongSelf; } return node; }; @@ -879,8 +898,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; ASCellNode *node = block(); [node enterHierarchyState:ASHierarchyStateRangeManaged]; - if (node.layoutDelegate == nil) { - node.layoutDelegate = strongSelf; + if (node.interactionDelegate == nil) { + node.interactionDelegate = strongSelf; } return node; }; @@ -1127,6 +1146,25 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } #pragma mark - ASCellNodeDelegate +- (void)nodeSelectedStateDidChange:(ASCellNode *)node +{ + NSIndexPath *indexPath = [self indexPathForNode:node]; + if (indexPath) { + if (node.isSelected) { + [self selectItemAtIndexPath:indexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone]; + } else { + [self deselectItemAtIndexPath:indexPath animated:NO]; + } + } +} + +- (void)nodeHighlightedStateDidChange:(ASCellNode *)node +{ + NSIndexPath *indexPath = [self indexPathForNode:node]; + if (indexPath) { + [self cellForItemAtIndexPath:indexPath].highlighted = node.isHighlighted; + } +} - (void)nodeDidRelayout:(ASCellNode *)node sizeChanged:(BOOL)sizeChanged { diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index c978bb9e5e..8c62f23aa4 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -66,20 +66,39 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)setNode:(ASCellNode *)node { _node = node; - node.selected = self.selected; - node.highlighted = self.highlighted; + if (node.selected != self.selected) { + node.selected = self.selected; + } + if (node.highlighted != self.highlighted) { + node.highlighted = self.highlighted; + } } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { - [super setSelected:selected animated:animated]; - _node.selected = selected; + if (selected != self.selected) { + [super setSelected:selected animated:animated]; + } + if (selected != _node.selected) { + _node.selected = selected; + } } - (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated { - [super setHighlighted:highlighted animated:animated]; - _node.highlighted = highlighted; + if (highlighted != self.highlighted) { + [super setHighlighted:highlighted animated:animated]; + } + if (highlighted != _node.highlighted) { + _node.highlighted = highlighted; + } +} + +- (void)prepareForReuse +{ + // Need to clear node pointer before UIKit calls setSelected:NO / setHighlighted:NO on its cells + self.node = nil; + [super prepareForReuse]; } @end @@ -91,7 +110,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (instancetype)_initWithTableView:(ASTableView *)tableView; @end -@interface ASTableView () +@interface ASTableView () { ASTableViewProxy *_proxyDataSource; ASTableViewProxy *_proxyDelegate; @@ -1046,8 +1065,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; return ^{ __typeof__(self) strongSelf = weakSelf; [node enterHierarchyState:ASHierarchyStateRangeManaged]; - if (node.layoutDelegate == nil) { - node.layoutDelegate = strongSelf; + if (node.interactionDelegate == nil) { + node.interactionDelegate = strongSelf; } return node; }; @@ -1059,8 +1078,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; __typeof__(self) strongSelf = weakSelf; ASCellNode *node = block(); [node enterHierarchyState:ASHierarchyStateRangeManaged]; - if (node.layoutDelegate == nil) { - node.layoutDelegate = strongSelf; + if (node.interactionDelegate == nil) { + node.interactionDelegate = strongSelf; } return node; }; @@ -1126,7 +1145,27 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; } } -#pragma mark - ASCellNodeLayoutDelegate +#pragma mark - ASCellNodeDelegate + +- (void)nodeSelectedStateDidChange:(ASCellNode *)node +{ + NSIndexPath *indexPath = [self indexPathForNode:node]; + if (indexPath) { + if (node.isSelected) { + [self selectRowAtIndexPath:indexPath animated:NO scrollPosition:UITableViewScrollPositionNone]; + } else { + [self deselectRowAtIndexPath:indexPath animated:NO]; + } + } +} + +- (void)nodeHighlightedStateDidChange:(ASCellNode *)node +{ + NSIndexPath *indexPath = [self indexPathForNode:node]; + if (indexPath) { + [self cellForRowAtIndexPath:indexPath].highlighted = node.isHighlighted; + } +} - (void)nodeDidRelayout:(ASCellNode *)node sizeChanged:(BOOL)sizeChanged { diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 4c7f84aec3..6b0d1b651b 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -13,6 +13,22 @@ #import "ASCollectionDataController.h" #import "ASCollectionViewFlowLayoutInspector.h" +@interface ASTextCellNodeWithSetSelectedCounter : ASTextCellNode + +@property (nonatomic, assign) NSUInteger setSelectedCounter; + +@end + +@implementation ASTextCellNodeWithSetSelectedCounter + +- (void)setSelected:(BOOL)selected +{ + [super setSelected:selected]; + _setSelectedCounter++; +} + +@end + @interface ASCollectionViewTestDelegate : NSObject @property (nonatomic, assign) NSInteger numberOfSections; @@ -32,7 +48,7 @@ } - (ASCellNode *)collectionView:(ASCollectionView *)collectionView nodeForItemAtIndexPath:(NSIndexPath *)indexPath { - ASTextCellNode *textCellNode = [ASTextCellNode new]; + ASTextCellNodeWithSetSelectedCounter *textCellNode = [ASTextCellNodeWithSetSelectedCounter new]; textCellNode.text = indexPath.description; return textCellNode; @@ -41,7 +57,7 @@ - (ASCellNodeBlock)collectionView:(ASCollectionView *)collectionView nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath { return ^{ - ASTextCellNode *textCellNode = [ASTextCellNode new]; + ASTextCellNodeWithSetSelectedCounter *textCellNode = [ASTextCellNodeWithSetSelectedCounter new]; textCellNode.text = indexPath.description; return textCellNode; }; @@ -134,4 +150,54 @@ [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]; } +- (void)testSelection +{ + ASCollectionViewTestController *testController = [[ASCollectionViewTestController alloc] initWithNibName:nil bundle:nil]; + UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + [window setRootViewController:testController]; + [window makeKeyAndVisible]; + + [testController.collectionView reloadDataImmediately]; + [testController.collectionView layoutIfNeeded]; + + NSIndexPath *indexPath = [NSIndexPath indexPathForItem:0 inSection:0]; + ASCellNode *node = [testController.collectionView nodeForItemAtIndexPath:indexPath]; + + // selecting node should select cell + node.selected = YES; + XCTAssertTrue([[testController.collectionView indexPathsForSelectedItems] containsObject:indexPath], @"Selecting node should update cell selection."); + + // deselecting node should deselect cell + node.selected = NO; + XCTAssertTrue([[testController.collectionView indexPathsForSelectedItems] isEqualToArray:@[]], @"Deselecting node should update cell selection."); + + // selecting cell via collectionView should select node + [testController.collectionView selectItemAtIndexPath:indexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone]; + XCTAssertTrue(node.isSelected == YES, @"Selecting cell should update node selection."); + + // deselecting cell via collectionView should deselect node + [testController.collectionView deselectItemAtIndexPath:indexPath animated:NO]; + XCTAssertTrue(node.isSelected == NO, @"Deselecting cell should update node selection."); + + // selecting cell should select node + UICollectionViewCell *cell = [testController.collectionView cellForItemAtIndexPath:indexPath]; + cell.selected = YES; + XCTAssertTrue(node.isSelected == YES, @"Selecting cell should update node selection."); + + // reload cell (-prepareForReuse is called) & check that selected state is preserved + [testController.collectionView setContentOffset:CGPointMake(0,testController.collectionView.bounds.size.height)]; + [testController.collectionView layoutIfNeeded]; + [testController.collectionView setContentOffset:CGPointMake(0,0)]; + [testController.collectionView layoutIfNeeded]; + XCTAssertTrue(node.isSelected == YES, @"Reloaded cell should preserve state."); + + // deselecting cell should deselect node + cell = [testController.collectionView cellForItemAtIndexPath:indexPath]; + cell.selected = NO; + XCTAssertTrue(node.isSelected == NO, @"Deselecting cell should update node selection."); + + // check setSelected not called extra times + XCTAssertTrue([(ASTextCellNodeWithSetSelectedCounter *)node setSelectedCounter] == 6, @"setSelected: should not be called on node multiple times."); +} + @end From 7ddef959461572f8e105be0b2df6f5e3c1d44028 Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Sat, 25 Jun 2016 01:05:23 -0700 Subject: [PATCH 023/247] fix compile errors --- AsyncDisplayKit/ASCellNode.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index ea659ae330..1d642b9b66 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -124,6 +124,12 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { @end +@interface ASCellNode (Deprecated) + +- (BOOL)selected ASDISPLAYNODE_DEPRECATED; +- (BOOL)highlighted ASDISPLAYNODE_DEPRECATED; + +@end /** * Simple label-style cell node. Read its source for an example of custom s. @@ -150,9 +156,6 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { */ @property (nonatomic, assign) UIEdgeInsets textInsets; -- (BOOL)selected ASDISPLAYNODE_DEPRECATED; -- (BOOL)highlighted ASDISPLAYNODE_DEPRECATED; - @end NS_ASSUME_NONNULL_END From f71e207e0afc7708a1da01d71191deb4466e5133 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 26 Jun 2016 17:08:35 -0700 Subject: [PATCH 024/247] Remove old website files from master branch (#1817) - new website files are in gh-pages branch (and have been for awhile) --- docs/CNAME | 2 - docs/LICENSE.md | 420 ------------------------ docs/README.md | 9 - docs/_config.yml | 13 - docs/_includes/footer.html | 18 - docs/_includes/head.html | 24 -- docs/_includes/header.html | 25 -- docs/_layouts/default.html | 20 -- docs/_layouts/docs.html | 27 -- docs/_layouts/page.html | 16 - docs/_layouts/post.html | 15 - docs/_sass/_base.scss | 205 ------------ docs/_sass/_layout.scss | 265 --------------- docs/_sass/_syntax-highlighting.scss | 76 ----- docs/assets/guide/1-shuffle-crop.png | Bin 1016 -> 0 bytes docs/assets/guide/1-shuffle.png | Bin 19288 -> 0 bytes docs/assets/logo-square.png | Bin 66422 -> 0 bytes docs/assets/logo.png | Bin 105684 -> 0 bytes docs/assets/node-view-layer.png | Bin 12961 -> 0 bytes docs/build.sh | 33 -- docs/css/main.scss | 49 --- docs/guide/1-introduction.md | 150 --------- docs/guide/2-custom-nodes.md | 211 ------------ docs/guide/3-asynchronous-display.md | 102 ------ docs/guide/4-making-the-most-of-asdk.md | 139 -------- docs/guide/5-under-the-hood.md | 89 ----- docs/index.md | 86 ----- 27 files changed, 1994 deletions(-) delete mode 100644 docs/CNAME delete mode 100644 docs/LICENSE.md delete mode 100644 docs/README.md delete mode 100644 docs/_config.yml delete mode 100644 docs/_includes/footer.html delete mode 100644 docs/_includes/head.html delete mode 100644 docs/_includes/header.html delete mode 100644 docs/_layouts/default.html delete mode 100644 docs/_layouts/docs.html delete mode 100644 docs/_layouts/page.html delete mode 100644 docs/_layouts/post.html delete mode 100644 docs/_sass/_base.scss delete mode 100644 docs/_sass/_layout.scss delete mode 100644 docs/_sass/_syntax-highlighting.scss delete mode 100644 docs/assets/guide/1-shuffle-crop.png delete mode 100644 docs/assets/guide/1-shuffle.png delete mode 100755 docs/assets/logo-square.png delete mode 100755 docs/assets/logo.png delete mode 100755 docs/assets/node-view-layer.png delete mode 100755 docs/build.sh delete mode 100755 docs/css/main.scss delete mode 100644 docs/guide/1-introduction.md delete mode 100644 docs/guide/2-custom-nodes.md delete mode 100644 docs/guide/3-asynchronous-display.md delete mode 100644 docs/guide/4-making-the-most-of-asdk.md delete mode 100644 docs/guide/5-under-the-hood.md delete mode 100644 docs/index.md diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index a295f461e5..0000000000 --- a/docs/CNAME +++ /dev/null @@ -1,2 +0,0 @@ -asyncdisplaykit.org - diff --git a/docs/LICENSE.md b/docs/LICENSE.md deleted file mode 100644 index 4bb498ec63..0000000000 --- a/docs/LICENSE.md +++ /dev/null @@ -1,420 +0,0 @@ ---- -layout: page -title: License -permalink: /license/ ---- - -AsyncDisplayKit is free software under the BSD -license. - -Code examples and sample -projects are licensed as follows: - - This file provided by Facebook is for non-commercial testing and evaluation - purposes only. Facebook reserves all rights not expressly granted. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -All other AsyncDisplayKit documentation is licensed CC-BY-4.0. - - Attribution 4.0 International - - ======================================================================= - - Creative Commons Corporation ("Creative Commons") is not a law firm and - does not provide legal services or legal advice. Distribution of - Creative Commons public licenses does not create a lawyer-client or - other relationship. Creative Commons makes its licenses and related - information available on an "as-is" basis. Creative Commons gives no - warranties regarding its licenses, any material licensed under their - terms and conditions, or any related information. Creative Commons - disclaims all liability for damages resulting from their use to the - fullest extent possible. - - Using Creative Commons Public Licenses - - Creative Commons public licenses provide a standard set of terms and - conditions that creators and other rights holders may use to share - original works of authorship and other material subject to copyright - and certain other rights specified in the public license below. The - following considerations are for informational purposes only, are not - exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - - ======================================================================= - - Creative Commons Attribution 4.0 International Public License - - By exercising the Licensed Rights (defined below), You accept and agree - to be bound by the terms and conditions of this Creative Commons - Attribution 4.0 International Public License ("Public License"). To the - extent this Public License may be interpreted as a contract, You are - granted the Licensed Rights in consideration of Your acceptance of - these terms and conditions, and the Licensor grants You such rights in - consideration of benefits the Licensor receives from making the - Licensed Material available under these terms and conditions. - - - Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - - Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - - Section 3 -- License Conditions. - - Your exercise of the Licensed Rights is expressly made subject to the - following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - - Section 4 -- Sui Generis Database Rights. - - Where the Licensed Rights include Sui Generis Database Rights that - apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - - For the avoidance of doubt, this Section 4 supplements and does not - replace Your obligations under this Public License where the Licensed - Rights include other Copyright and Similar Rights. - - - Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - - Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - - Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - - Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - - ======================================================================= - - Creative Commons is not a party to its public licenses. - Notwithstanding, Creative Commons may elect to apply one of its public - licenses to material it publishes and in those instances will be - considered the "Licensor." Except for the limited purpose of indicating - that material is shared under a Creative Commons public license or as - otherwise permitted by the Creative Commons policies published at - creativecommons.org/policies, Creative Commons does not authorize the - use of the trademark "Creative Commons" or any other trademark or logo - of Creative Commons without its prior written consent including, - without limitation, in connection with any unauthorized modifications - to any of its public licenses or any other arrangements, - understandings, or agreements concerning use of licensed material. For - the avoidance of doubt, this paragraph does not form part of the public - licenses. - - Creative Commons may be contacted at creativecommons.org. diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 05980d3818..0000000000 --- a/docs/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Documentation - -## Building - -You need Jekyll and appledoc. See `build.sh`. - -## License - -See LICENSE.md. diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 0d5f309f67..0000000000 --- a/docs/_config.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Site settings -title: AsyncDisplayKit -description: Smooth asynchronous user interfaces for iOS apps. -baseurl: "" -url: "http://asyncdisplaykit.org" - -# Build settings -highlighter: pygments -markdown: redcarpet - -exclude: -- README.md -- build.sh diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html deleted file mode 100644 index 2714963def..0000000000 --- a/docs/_includes/footer.html +++ /dev/null @@ -1,18 +0,0 @@ -
- -
- - -
- -
diff --git a/docs/_includes/head.html b/docs/_includes/head.html deleted file mode 100644 index a9e7efbdea..0000000000 --- a/docs/_includes/head.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - {% if page.title %}{{ page.title }} — {% endif %}AsyncDisplayKit - - - - - - - diff --git a/docs/_includes/header.html b/docs/_includes/header.html deleted file mode 100644 index aebb67cdf1..0000000000 --- a/docs/_includes/header.html +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index bdf5a388da..0000000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - {% include head.html %} - - - - {% include header.html %} - -
-
- {{ content }} -
-
- - {% include footer.html %} - - - - diff --git a/docs/_layouts/docs.html b/docs/_layouts/docs.html deleted file mode 100644 index 65c07040aa..0000000000 --- a/docs/_layouts/docs.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: default -sectionid: docs ---- -
- -
-

- {{ page.title }} - [edit] -

-
- -
- {{ content }} -
- -
- {% if page.prev %} - ← prev - {% endif %} - {% if page.next %} - next → - {% endif %} -
- -
diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html deleted file mode 100644 index 8e7ccf7a15..0000000000 --- a/docs/_layouts/page.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default ---- -
- - {% if page.shouldDisplayTitle %} -
-

{{ page.title }}

-
- {% endif %} - -
- {{ content }} -
- -
diff --git a/docs/_layouts/post.html b/docs/_layouts/post.html deleted file mode 100644 index 675596fb1c..0000000000 --- a/docs/_layouts/post.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -layout: default ---- -
- -
-

{{ page.title }}

- -
- -
- {{ content }} -
- -
diff --git a/docs/_sass/_base.scss b/docs/_sass/_base.scss deleted file mode 100644 index 7d353be258..0000000000 --- a/docs/_sass/_base.scss +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Reset some basic elements - */ -body, h1, h2, h3, h4, h5, h6, -p, blockquote, pre, hr, -dl, dd, ol, ul, figure { - margin: 0; - padding: 0; -} - - - -/** - * Basic styling - */ -body { - font-family: $base-font-family; - font-size: $base-font-size; - line-height: $base-line-height; - font-weight: 300; - color: $text-color; - background-color: $background-color; - -webkit-text-size-adjust: 100%; -} - - - -/** - * Set `margin-bottom` to maintain vertical rhythm - */ -h1, h2, h3, h4, h5, h6, -p, blockquote, pre, -ul, ol, dl, figure, -%vertical-rhythm { - margin-bottom: $spacing-unit / 2; -} - - - -/** - * Images - */ -img { - max-width: 100%; - vertical-align: middle; -} - - - -/** - * Figures - */ -figure > img { - display: block; -} - -figcaption { - font-size: $small-font-size; -} - - - -/** - * Lists - */ -ul, ol { - margin-left: $spacing-unit; -} - -li { - > ul, - > ol { - margin-bottom: 0; - } -} - - - -/** - * Headings - */ -h1, h2, h3, h4, h5, h6 { - font-weight: 300; -} - - - -/** - * Links - */ -a { - color: $brand-color; - text-decoration: none; - - &:visited { - color: darken($brand-color, 15%); - } - - &:hover { - color: $text-color; - text-decoration: underline; - } -} - - - -/** - * Blockquotes - */ -blockquote { - color: $grey-color; - border-left: 4px solid $grey-color-light; - padding-left: $spacing-unit / 2; - font-size: 18px; - letter-spacing: -1px; - font-style: italic; - - > :last-child { - margin-bottom: 0; - } -} - - - -/** - * Code formatting - */ -pre, -code { - font-family: Monaco, monospace; - font-size: 14px; - border: 1px solid #afe4ff; - border-radius: 3px; - background-color: #fafdff; -} - -code { - padding: 1px 5px; -} - -pre { - padding: 8px 12px; - overflow-x: scroll; - - > code { - border: 0; - padding-right: 0; - padding-left: 0; - } -} - - - -/** - * Wrapper - */ -.wrapper { - max-width: -webkit-calc(800px - (#{$spacing-unit} * 2)); - max-width: calc(800px - (#{$spacing-unit} * 2)); - margin-right: auto; - margin-left: auto; - padding-right: $spacing-unit; - padding-left: $spacing-unit; - @extend %clearfix; - - @include media-query($on-laptop) { - max-width: -webkit-calc(800px - (#{$spacing-unit})); - max-width: calc(800px - (#{$spacing-unit})); - padding-right: $spacing-unit / 2; - padding-left: $spacing-unit / 2; - } -} - - - -/** - * Clearfix - */ -%clearfix { - - &:after { - content: ""; - display: table; - clear: both; - } -} - - - -/** - * Icons - */ -.icon { - - > svg { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - - path { - fill: $grey-color; - } - } -} diff --git a/docs/_sass/_layout.scss b/docs/_sass/_layout.scss deleted file mode 100644 index 2eb740fa67..0000000000 --- a/docs/_sass/_layout.scss +++ /dev/null @@ -1,265 +0,0 @@ -/** - * Site header - */ -.site-header { - border-top: 5px solid $grey-color-dark; - border-bottom: 1px solid $grey-color-light; - min-height: 56px; - background-color: #f8f8f8; - - // Positioning context for the mobile navigation icon - position: relative; -} - -.site-title { - font-size: 26px; - line-height: 56px; - letter-spacing: -1px; - margin-bottom: 0; - float: left; - - &, - &:visited { - color: $grey-color-dark; - } - &:hover { - text-decoration: none; - } -} - -.site-nav { - float: right; - line-height: 56px; - - .menu-icon { - display: none; - } - - .page-link { - color: $grey-color; - line-height: $base-line-height; - - // Gaps between nav items, but not on the first one - &:not(:first-child) { - margin-left: 20px; - } - - &:hover { - color: $text-color; - } - } - - .page-link-active { - color: $text-color; - } - - @include media-query($on-palm) { - position: absolute; - top: 9px; - right: 30px; - background-color: $background-color; - border: 1px solid $grey-color-light; - border-radius: 5px; - text-align: right; - - .menu-icon { - display: block; - float: right; - width: 36px; - height: 26px; - line-height: 0; - padding-top: 10px; - text-align: center; - - > svg { - width: 18px; - height: 15px; - - path { - fill: $grey-color-dark; - } - } - } - - .trigger { - clear: both; - display: none; - } - - &:hover .trigger { - display: block; - padding-bottom: 5px; - } - - .page-link { - display: block; - padding: 5px 10px; - } - } -} - - - -/** - * Site footer - */ -.site-footer { - border-top: 1px solid $grey-color-light; - padding: $spacing-unit 0; -} - -.footer-heading { - font-size: 18px; - margin-bottom: $spacing-unit / 2; -} - -.contact-list, -.social-media-list { - list-style: none; - margin-left: 0; -} - -.footer-col-wrapper { - font-size: 11px; - color: $grey-color; - margin-left: -$spacing-unit / 2; - @extend %clearfix; -} - -.footer-col { - float: left; - margin-bottom: $spacing-unit / 2; - padding-left: $spacing-unit / 2; -} - -.footer-col-left { - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); -} - -.footer-col-right { - text-align: right; - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); -} - -@include media-query($on-laptop) { - .footer-col-left { - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); - } - - .footer-col-right { - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - -@include media-query($on-palm) { - .footer-col { - float: none; - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - - - -/** - * Page content - */ -.page-content { - padding: $spacing-unit 0; - background-color: white; -} - -.page-heading { - font-size: 20px; -} - -.post-list { - margin-left: 0; - list-style: none; - - > li { - margin-bottom: $spacing-unit; - } -} - -.post-meta { - font-size: $small-font-size; - color: $grey-color; -} - -.post-link { - display: block; - font-size: 24px; -} - - - -/** - * Posts - */ -.post-header { - margin-bottom: $spacing-unit; -} - -.post-title { - font-size: 42px; - letter-spacing: -1px; - line-height: 1; - - @include media-query($on-laptop) { - font-size: 36px; - } - - .edit-page-link { - font-size: 18px; - } -} - -.post-content { - margin-bottom: $spacing-unit; - - h2 { - font-size: 32px; - - @include media-query($on-laptop) { - font-size: 28px; - } - } - - h3 { - font-size: 26px; - - @include media-query($on-laptop) { - font-size: 22px; - } - } - - h4 { - font-size: 20px; - - @include media-query($on-laptop) { - font-size: 18px; - } - } -} - - - -/** - * Docs - */ -.docs-prevnext { - @extend %clearfix; -} - -.docs-prev { - float: left; -} - -.docs-next { - float: right; -} diff --git a/docs/_sass/_syntax-highlighting.scss b/docs/_sass/_syntax-highlighting.scss deleted file mode 100644 index 3758fdb458..0000000000 --- a/docs/_sass/_syntax-highlighting.scss +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Syntax highlighting styles - */ - -/* not official Xcode colors, but looks better on the web */ -$xc-black: black; -$xc-green: #008d14; -$xc-red: #b72748; -$xc-blue: #103ffb; -$xc-turquoise: #3a95ba; - -.highlight { - background: #fff; - @extend %vertical-rhythm; - - .c { color: $xc-green; font-style: italic } // Comment - .err { color: #a61717; background-color: #e3d2d2 } // Error - .k { color: $xc-blue} // Keyword - .o { } // Operator - .cm { color: $xc-green; font-style: italic } // Comment.Multiline - .cp { color: $xc-red} // Comment.Preproc - .c1 { color: $xc-green; font-style: italic } // Comment.Single - .cs { color: $xc-green; font-weight: bold; font-style: italic } // Comment.Special - .gd { color: #000; background-color: #fdd } // Generic.Deleted - .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific - .ge { font-style: italic } // Generic.Emph - .gr { color: #a00 } // Generic.Error - .gh { color: #999 } // Generic.Heading - .gi { color: #000; background-color: #dfd } // Generic.Inserted - .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific - .go { color: #888 } // Generic.Output - .gp { color: #555 } // Generic.Prompt - .gs { font-weight: bold } // Generic.Strong - .gu { color: #aaa } // Generic.Subheading - .gt { color: #a00 } // Generic.Traceback - .kc { color: orange} // Keyword.Constant - .kd { color: orange} // Keyword.Declaration - .kp { color: $xc-green} // Keyword.Pseudo - .kr { color: $xc-green} // Keyword.Reserved - .kt { color: $xc-blue} // Keyword.Type - .m { color: orange } // Literal.Number - .s { color: $xc-red } // Literal.String - .na { color: orange } // Name.Attribute - .nb { color: $xc-blue } // Name.Builtin - .nc { color: $xc-turquoise } // Name.Class - .no { color: orange } // Name.Constant - .ni { color: orange } // Name.Entity - .ne { color: orange } // Name.Exception - .nf { } // Name.Function - .nn { color: orange } // Name.Namespace - .nt { color: orange } // Name.Tag - .nv { } // Name.Variable - .ow { } // Operator.Word - .w { color: #bbb } // Text.Whitespace - .mf {} // Literal.Number.Float - .mh { color: $xc-black } // Literal.Number.Hex - .mi { color: $xc-black } // Literal.Number.Integer - .mo { color: $xc-black } // Literal.Number.Oct - .il { color: $xc-black } // Literal.Number.Integer.Long - .sb { color: #d14 } // Literal.String.Backtick - .sc { color: #d14 } // Literal.String.Char - .sd { color: #d14 } // Literal.String.Doc - .s2 { color: #d14 } // Literal.String.Double - .se { color: #d14 } // Literal.String.Escape - .sh { color: #d14 } // Literal.String.Heredoc - .si { color: #d14 } // Literal.String.Interpol - .sx { color: #d14 } // Literal.String.Other - .sr { color: orange } // Literal.String.Regex - .s1 { color: $xc-red } // Literal.String.Single - .ss { color: $xc-red } // Literal.String.Symbol - .bp { color: $xc-turquoise } // Name.Builtin.Pseudo - .vc { color: $xc-turquoise } // Name.Variable.Class - .vg { color: $xc-black } // Name.Variable.Global - .vi { color: orange } // Name.Variable.Instance - .nl { color: $xc-turquoise } -} diff --git a/docs/assets/guide/1-shuffle-crop.png b/docs/assets/guide/1-shuffle-crop.png deleted file mode 100644 index d1e0a83b0c3c23ee7ae938f88dbc1bebd1f27246..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1016 zcmeAS@N?(olHy`uVBq!ia0y~yVB7>`>u|6ENrnvD*+5dT#5JNMI6tkVJh3R1p&&0k zxu~=_!=cpkGXn$jB2O2`kcwMxZ~J!mRm&Xs_};iY&1Un1je<(9C!d&UW^G$>v%+)X zo+C?KIyKyq)KW7hi5zu0>2@efY{{~WBTj)zulO`CP2ug%G@ALSa$d2xeewC3&(F=h zy>n-2{J!~CbFV+Q{5oe@{_{Eiuc&(-O5tjCQr!KE{qwFfRb{JYC+uC9R=Mcq@-utN zcG_)@n}0LTx>xpd@g$X4k4ygp76!avtYg%2`1-qM(aJfN%jVpSo13uH>g1FwI_fiX zJ1OZfs&pZJ}bs zX11v4WL$hKC0e^h&GWAcX&igRove_L54T-D0R z?*7rcvtHiH`thIM-j6RfuH@X7|9uw7*u-Nz72ov^UAo4mA9rAi=7%?uXXbLd_Z=y$ z{&t{OdUAcZGqX-4Q)%gjlFS_KsR;*}W*Ddc**IPA;4qzs&OJFbe=P29D_D5l*(fE*@9$rO;gu28wiO2Vj*D^`)K>ARSQZ?3tte@vxtv$}(fnz@e!1 zavq)oD}y)W%>_B&Qv8OhQlH4r&wAzg;vVkME-0f`@ZX99t7%_)q5S zS)dRoIl>YeG&!QCJx^e&QGp3T(=JTt-{Lyf_xt`VW4m~78z@J6y85}Sb4q9e0NQ!% A6951J diff --git a/docs/assets/guide/1-shuffle.png b/docs/assets/guide/1-shuffle.png deleted file mode 100644 index 9188eebf8ae9edd78fadd80b1a8f994e116c88e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19288 zcmdqJXH-*N)Git;iUKOqMN|Y{ng~b{1XKj1OG$vxr4vGEp@gO)pi)#iND=9T5L)OE z0jZ%wKnNWH=?H|9kmSa5@44e0-;ZZ4}rV+3>b@w4@E0C>1N*?Gaeogc$B z_W%Ix)0)qo82e9dPWz?Y1vb(C=x3~DR$cUcJssZntK_T6)ibwD3?8E|vc7xxweZ%p zAD1q~ojv#D+{L(F&ifYK&p+iJ*`0b~k<|CFck4$ikVwvHKp-K-4amTHC&!7y^?>En z)PBo?^`N!DHDkDnY=d01O(wSQqR!0M@0gtM}y#8-Q1{xrvPCenxHF{`(D`a{H!{kRgrrt=Xzr=syay~sUD*YFopw%zk@-L%g@ zs|JD$^mj&iY}!yiBUq!~^1M=4+;cQmA=2eK4IOPQN#uoAKK+&nK(aZumUtIppQVHDoZR92ff>2XkS)exY5XM=lU8>qjuB;((pej18o zteB7Z>2X@j{oJ@SQ9b1pC+Y(#Qv?YL$Co_jA>N0mX*`_bVoo^&F+hD8c0bM`q^G6Q zYx(?Ex4UmjKI0aQZ4=#RpJPCZ9vhl zE?FlfJZL@|0p(O6<$e@)0UlJ|f!ytFeUkL~!9PX%hNbHM0g`PcV4GOFunVHvX>2d? zA}D!a8ZERTw|gbsyB`^=bnuhksXsly)Wl?5Y+%pcEa?%t?BoPX!F@UCW_o0`^N=SX z*7Yz75nIf}u_#-v4AAvYFFeF|Ek-0mM=22Tz{#wGS@0xw*e=(wC{Gkr;(s&{O5JN( z$qd}8jFY_{h64MyU#!&1ez;~UJNyJRFlc3bAJ1w-oh4-X%>v$81jP#6t7fCgIcd z3Xz40v!T?T-HX_K`H#Gf_l`(!M14I}?=-%?iWydKirv{edkkHyzqhGR#=a!Xa`NLU z9>~id?d!@-`z)Q~u-M7X)s;LWwnmdrG@Ckutm(N$xA~oZ<#KScNxl0r|HnsOyN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<3`5HBu4PGi=%D5NDkCxYY$&GsCRjK#Tj> z&3t_X8GvSV;>`$&dLE;m02^~5Hc}n!aAy8BBhVUo4b~W4mH?>I>isgxTEWwd>GGo% zVk6!8HoN*6ZpAg+$s7b1fRPL~uZj0>*1oM#4Y1MbjE55*%{cq~NX$ee-~hCu5*u!) z4fpK(%?#D1vPYo-TUiN>)Q})y1z;?NTq9@B@LF))h=$hIP%MHM`U4aevaki@P+FCl~kq#-s3Ba}%dfo^>-!>Oy&3K&_%MZXd zR*5zH@x8IW;I_t&nBhSHXl>|tThp6eO diff --git a/docs/assets/logo-square.png b/docs/assets/logo-square.png deleted file mode 100755 index 82ad66c69ecdd8626cdd380e5c536dbcaeb0a0fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66422 zcmeFYS5%W*w?7<2K}E!ZfKuCrCLVy3>U2O>D zc;eB|NgD8t@u~EA@ar;KNgu7_VuSX!a7RLJS-V&wuiSUCKq0k}7S=v)UyyPT2(_CX zLLaTKp)O}p}@mSNN4o@yYkn-{|H&zS<6UC!=$7ntVN*G5>^sWOSqUc z_{&BLYAGcx0vEBiv9_`i`7fRSZ9QCBjQy z6<$3%XKNR4556M_{d?fMNOwCgq_wiUi_?{Vu2{zIf7#yB!qNg}EeTF-Az}%YfQd;$ zEyb*@pcWDqQkJ6PHZVzP%WMBxZ~g!G>VyGP!bf`YKlJ9mUjb!2`sZ&e03Uwa5z-kL zk2|oEPxZ>p5XfQ5{kyjik4KiqX_KsVF^W?~_`FkZ?(tuHdz{+grm<(d_}q_4k~oS$ zC{JR#n3-Gca8uOcqdE-2ugrM2FEg{y&9jsD_4!LruXdvk8{t(px9(c6)RS~Q7Xvcp zHW8am@}vM9{`-Kp<~&qT@c5BUe-+K5JNlig=5`AFdNRTY+y?ll@qZux?>7EV8UD`} zAh`uabS&A+4fzbfAQpZshRsvs?*s3^qM`<4LrHuV)c!34Pv-!{hqT7m`PL@+t`8gk5vfdq6&CEcZLR2KwD#gP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 zOM62q4#8fc#D&5xgCudm7VK|pXxHgi=Wpn}lw=cz(Ik`+ZOKMeoV;{vk_k=c5I|bs z?wM^6q#X(Bw}A4uKY(4Oj!r=f1tH`$=Q9vS{K~GKI#L=6Md|j0v`z&`WFMJkbnS%| zSY2yKuveZ~8q!hellp2BZt%%jcsIf4RMc(dcm}Wgg{-__>D5$YAP5WsSu$k*TmiQ3 z5;gn8AIFxJ(0Np>q4vhr-Wc(T)SP1HRPLF#bQ$-_NG6c>gPIEz;DQ^(iE}H(GmMaI z*t|wr%$3EHNqF2o{)F~Mp~xGZZ}&cO4bJAP0;L=Mtt1UVo+=CN97#jRNrq3>TtJaF z^V9L&c;OhKs3yl7LMqt|_^pVo4a>mnnINP65^R-=h)uWZuJ!X)^{sAucx}1EaH%Gv zB@-@o@M+dkflH?6%WS*OSAi3qpZ<9OZS_>k`tXW3=EmYd_h4DXsYlV03+rd!S6%Ui zS z?LgJIN4e~M=h8%NDu07cib2ZEso*Kl(gN%?2jbpFw7=w3I_UvG6!J~?@E3+@eRX5Q z?3W%3A6$glIHTbE#*>Olw@6CR_$AA33!lr`0Jhsys_bWV?^8!g`#nL z%5l@EH;(LKh{Q)7i~F4$^STHd0G9r-)Kk}YsqodEb&SEW)gwzQ`6G3uwCD(NCrUXR z!`!`PR1S8vI;g_{ diff --git a/docs/assets/logo.png b/docs/assets/logo.png deleted file mode 100755 index dce1ebc95066e56bf72c591027b7776b767a5786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 105684 zcmeFYXIzu#7e5?}qpc{V7GvcrlBB(g;iWK&rJ z2`lWWAc25@7>4ZUqAl3xZ$JMR&x_~P?|y+K+~-{9I@kAn&$w?N+|p4!^CRnz5D4Uq zx|)(c1VY~dfgDf%{v`NDd5Xma{KJA#HpLjA5Ex%OFF52k2h?r&C3QDDN4P%R&cWZa z4K53T(0L*aO);k0TGI9?H$l6Ddj$R5Jb*L=BCFu%VQ23G$6UG%cSO3&aV=NZb6r9@ z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nn|z7QCqVjv6I>i1GD)kG+x(N4`hSNO{9l1r kxElR496@R~frk(905D)XJl%De%K*4`+454A>79H32Qrj$WB>pF diff --git a/docs/build.sh b/docs/build.sh deleted file mode 100755 index c532bb0d6b..0000000000 --- a/docs/build.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -set -e - -HEADERS=`ls ../AsyncDisplayKit/*.h ../AsyncDisplayKit/Details/ASRangeController.h ../AsyncDisplayKit/Layout/*.h` - -rm -rf htdocs appledoc - -jekyll build --destination htdocs - -appledoc \ - --no-create-docset \ - --create-html \ - --exit-threshold 2 \ - --no-repeat-first-par \ - --no-merge-categories \ - --explicit-crossref \ - --warn-missing-output-path \ - --warn-missing-company-id \ - --warn-undocumented-object \ - --warn-undocumented-member \ - --warn-empty-description \ - --warn-unknown-directive \ - --warn-invalid-crossref \ - --warn-missing-arg \ - --project-name AsyncDisplayKit \ - --project-company Facebook \ - --company-id "com.facebook" \ - --output appledoc \ - $HEADERS - -mv appledoc/html htdocs/appledoc - -rmdir appledoc diff --git a/docs/css/main.scss b/docs/css/main.scss deleted file mode 100755 index 4417ff0713..0000000000 --- a/docs/css/main.scss +++ /dev/null @@ -1,49 +0,0 @@ ---- -# Only the main Sass file needs front matter (the dashes are enough) ---- -@charset "utf-8"; - - - -// Our variables -$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -$base-font-size: 16px; -$small-font-size: $base-font-size * 0.875; -$base-line-height: 1.5; - -$spacing-unit: 30px; - -$text-color: #111; -$background-color: #f8f8f8; -$brand-color: #21b6ff; - -$grey-color: #828282; -$grey-color-light: lighten($grey-color, 40%); -$grey-color-dark: darken($grey-color, 25%); - -$on-palm: 600px; -$on-laptop: 800px; - - - -// Using media queries with like this: -// @include media-query($palm) { -// .wrapper { -// padding-right: $spacing-unit / 2; -// padding-left: $spacing-unit / 2; -// } -// } -@mixin media-query($device) { - @media screen and (max-width: $device) { - @content; - } -} - - - -// Import partials from `sass_dir` (defaults to `_sass`) -@import - "base", - "layout", - "syntax-highlighting" -; diff --git a/docs/guide/1-introduction.md b/docs/guide/1-introduction.md deleted file mode 100644 index d923c0a215..0000000000 --- a/docs/guide/1-introduction.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -layout: docs -title: Getting started -permalink: /guide/ -next: guide/2/ ---- - -## Concepts - -AsyncDisplayKit's basic unit is the *node*. ASDisplayNode is an abstraction -over UIView, which in turn is an abstraction over CALayer. Unlike views, which -can only be used on the main thread, nodes are thread-safe: you can -instantiate and configure entire hierarchies of them in parallel on background -threads. - -To keep its user interface smooth and responsive, your app should render at 60 -frames per second — the gold standard on iOS. This means the main thread -has one-sixtieth of a second to push each frame. That's 16 milliseconds to -execute all layout and drawing code! And because of system overhead, your code -usually has less than ten milliseconds to run before it causes a frame drop. - -AsyncDisplayKit lets you move image decoding, text sizing and rendering, and -other expensive UI operations off the main thread. It has other tricks up its -sleeve too... but we'll get to that later. :] - -## Nodes as drop-in view replacements - -If you're used to working with views, you already know how to use nodes. The -node API is similar to UIView's, with some additional conveniences — for -example, you can access common CALayer properties directly. To add a node to -an existing view or layer hierarchy, use its `node.view` or `node.layer`. - -AsyncDisplayKit's core components include: - -* *ASDisplayNode*. Counterpart to UIView — subclass to make custom nodes. -* *ASControlNode*. Analogous to UIControl — subclass to make buttons. -* *ASImageNode*. Like UIImageView — decodes images asynchronously. -* *ASTextNode*. Like UITextView — built on TextKit with full-featured - rich text support. -* *ASTableView* and *ASCollectionView*. UITableView and UICollectionView - subclasses that support nodes. - -You can use these as drop-in replacements for their UIKit counterparts. While -ASDK works most effectively with fully node-based hierarchies, even replacing -individual views with nodes can improve performance. - -Let's look at an example. - -We'll start out by using nodes synchronously on the main thread — the -same way you already use views. This code is a familiar sight in custom view -controller `-loadView` implementations: - -```objective-c -_imageView = [[UIImageView alloc] init]; -_imageView.image = [UIImage imageNamed:@"hello"]; -_imageView.frame = CGRectMake(10.0f, 10.0f, 40.0f, 40.0f); -[self.view addSubview:_imageView]; -``` - -We can replace it with the following node-based code: - -```objective-c -_imageNode = [[ASImageNode alloc] init]; -_imageNode.backgroundColor = [UIColor lightGrayColor]; -_imageNode.image = [UIImage imageNamed:@"hello"]; -_imageNode.frame = CGRectMake(10.0f, 10.0f, 40.0f, 40.0f); -[self.view addSubview:_imageNode.view]; -``` - -This doesn't take advantage of ASDK's asynchronous sizing and layout -functionality, but it's already an improvement. The first block of code -synchronously decodes `hello.png` on the main thread; the second starts -decoding the image on a background thread, possibly on a different CPU core. - -(Note that we're setting a placeholder background colour on the node, "holding -its place" onscreen until the real content appears. This works well with -images but less so with text — people expect text to appear instantly, -with images loading in after a slight delay. We'll discuss techniques to -improve this later on.) - -## Button nodes - -ASImageNode and ASTextNode both inherit from ASControlNode, so you can use them -as buttons. Let's say we're making a music player and we want to add a -(non-skeuomorphic, iOS 7-style) shuffle button: - -[![shuffle]({{ site.baseurl }}/assets/guide/1-shuffle-crop.png)]({{ site.baseurl }}/assets/guide/1-shuffle.png) - -Our view controller will look something like this: - -```objective-c -- (void)viewDidLoad -{ - [super viewDidLoad]; - - // attribute a string - NSDictionary *attrs = @{ - NSFontAttributeName: [UIFont systemFontOfSize:12.0f], - NSForegroundColorAttributeName: [UIColor redColor], - }; - NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"shuffle" - attributes:attrs]; - - // create the node - _shuffleNode = [[ASTextNode alloc] init]; - _shuffleNode.attributedString = string; - - // configure the button - _shuffleNode.userInteractionEnabled = YES; // opt into touch handling - [_shuffleNode addTarget:self - action:@selector(buttonTapped:) - forControlEvents:ASControlNodeEventTouchUpInside]; - - // size all the things - CGRect b = self.view.bounds; // convenience - CGSize size = [_shuffleNode measure:CGSizeMake(b.size.width, FLT_MAX)]; - CGPoint origin = CGPointMake(roundf( (b.size.width - size.width) / 2.0f ), - roundf( (b.size.height - size.height) / 2.0f )); - _shuffleNode.frame = (CGRect){ origin, size }; - - // add to our view - [self.view addSubview:_shuffleNode.view]; -} - -- (void)buttonTapped:(id)sender -{ - NSLog(@"tapped!"); -} -``` - -This works as you would expect. Unfortunately, this button is only 14½ -points tall — nowhere near the standard 44×44 minimum tap target -size — and it's very difficult to tap. We could solve this by -subclassing the text node and overriding `-hitTest:withEvent:`. We could even -force the text view to have a minimum height during layout. But wouldn't it be -nice if there were a more elegant way? - -```objective-c - // size all the things - /* ... */ - - // make the tap target taller - CGFloat extendY = roundf( (44.0f - size.height) / 2.0f ); - _shuffleNode.hitTestSlop = UIEdgeInsetsMake(-extendY, 0.0f, -extendY, 0.0f); -``` - -Et voilà! *Hit-test slops* work on all nodes, and are a nice example of what -this new abstraction enables. - -Next up, making your own nodes! diff --git a/docs/guide/2-custom-nodes.md b/docs/guide/2-custom-nodes.md deleted file mode 100644 index 6d67ed3a05..0000000000 --- a/docs/guide/2-custom-nodes.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -layout: docs -title: Custom nodes -permalink: /guide/2/ -prev: guide/ -next: guide/3/ ---- - -## View hierarchies - -Sizing and layout of custom view hierarchies are typically done all at once on -the main thread. For example, a custom UIView that minimally encloses a text -view and an image view might look like this: - -```objective-c -- (CGSize)sizeThatFits:(CGSize)size -{ - // size the image - CGSize imageSize = [_imageView sizeThatFits:size]; - - // size the text view - CGSize maxTextSize = CGSizeMake(size.width - imageSize.width, size.height); - CGSize textSize = [_textView sizeThatFits:maxTextSize]; - - // make sure everything fits - CGFloat minHeight = MAX(imageSize.height, textSize.height); - return CGSizeMake(size.width, minHeight); -} - -- (void)layoutSubviews -{ - CGSize size = self.bounds.size; // convenience - - // size and layout the image - CGSize imageSize = [_imageView sizeThatFits:size]; - _imageView.frame = CGRectMake(size.width - imageSize.width, 0.0f, - imageSize.width, imageSize.height); - - // size and layout the text view - CGSize maxTextSize = CGSizeMake(size.width - imageSize.width, size.height); - CGSize textSize = [_textView sizeThatFits:maxTextSize]; - _textView.frame = (CGRect){ CGPointZero, textSize }; -} -``` - -This isn't ideal. We're sizing our subviews twice — once to figure out -how big our view needs to be and once when laying it out — and while our -layout arithmetic is cheap and quick, we're also blocking the main thread on -expensive text sizing. - -We could improve the situation by manually cacheing our subviews' sizes, but -that solution comes with its own set of problems. Just adding `_imageSize` and -`_textSize` ivars wouldn't be enough: for example, if the text were to change, -we'd need to recompute its size. The boilerplate would quickly become -untenable. - -Further, even with a cache, we'll still be blocking the main thread on sizing -*sometimes*. We could try to shift sizing to a background thread with -`dispatch_async()`, but even if our own code is thread-safe, UIView methods are -documented to [only work on the main -thread](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html): - -> Manipulations to your application’s user interface must occur on the main -> thread. Thus, you should always call the methods of the UIView class from -> code running in the main thread of your application. The only time this may -> not be strictly necessary is when creating the view object itself but all -> other manipulations should occur on the main thread. - -This is a pretty deep rabbit hole. We could attempt to work around the fact -that UILabels and UITextViews cannot safely be sized on background threads by -manually creating a TextKit stack and sizing the text ourselves... but that's a -laborious duplication of work. Further, if UITextView's layout behaviour -changes in an iOS update, our sizing code will break. (And did we mention that -TextKit isn't thread-safe either?) - -## Node hierarchies - -Enter AsyncDisplayKit. Our custom node looks like this: - -```objective-c -#import - -... - -// perform expensive sizing operations on a background thread -- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize -{ - // size the image - CGSize imageSize = [_imageNode measure:constrainedSize]; - - // size the text node - CGSize maxTextSize = CGSizeMake(constrainedSize.width - imageSize.width, - constrainedSize.height); - CGSize textSize = [_textNode measure:maxTextSize]; - - // make sure everything fits - CGFloat minHeight = MAX(imageSize.height, textSize.height); - return CGSizeMake(constrainedSize.width, minHeight); -} - -// do as little work as possible in main-thread layout -- (void)layout -{ - // layout the image using its cached size - CGSize imageSize = _imageNode.calculatedSize; - _imageNode.frame = CGRectMake(self.bounds.size.width - imageSize.width, 0.0f, - imageSize.width, imageSize.height); - - // layout the text view using its cached size - CGSize textSize = _textNode.calculatedSize; - _textNode.frame = (CGRect){ CGPointZero, textSize }; -} -``` - -ASImageNode and ASTextNode, like the rest of AsyncDisplayKit, are thread-safe, -so we can size them on background threads. The `-measure:` method is like -`-sizeThatFits:`, but with side effects: it caches both the argument -(`constrainedSizeForCalculatedSize`) and the result (`calculatedSize`) for -quick access later on — like in our now-snappy `-layout` implementation. - -As you can see, node hierarchies are sized and laid out in much the same way as -their view counterparts. Custom nodes do need to be written with a few things -in mind: - -* Nodes must recursively measure all of their subnodes in their - `-calculateSizeThatFits:` implementations. Note that the `-measure:` - machinery will only call `-calculateSizeThatFits:` if a new measurement pass - is needed (e.g., if the constrained size has changed). - -* Nodes should perform any other expensive pre-layout calculations in - `-calculateSizeThatFits:`, cacheing useful intermediate results in ivars as - appropriate. - -* Nodes should call `[self invalidateCalculatedSize]` when necessary. For - example, ASTextNode invalidates its calculated size when its - `attributedString` property is changed. - -For more examples of custom sizing and layout, along with a demo of -ASTextNode's features, check out `BlurbNode` and `KittenNode` in the -[Kittens](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens) -sample project. - -## Custom drawing - -To guarantee thread safety in its highly-concurrent drawing system, the node -drawing API diverges substantially from UIView's. Instead of implementing -`-drawRect:`, you must: - -1. Define an internal "draw parameters" class for your custom node. This - class should be able to store any state your node needs to draw itself - — it can be a plain old NSObject or even a dictionary. - -2. Return a configured instance of your draw parameters class in - `-drawParametersForAsyncLayer:`. This method will always be called on the - main thread. - -3. Implement either `+drawRect:withParameters:isCancelled:isRasterizing:` or - `+displayWithParameters:isCancelled:`. Note that these are *class* methods - that will not have access to your node's state — only the draw - parameters object. They can be called on any thread and must be - thread-safe. - -For example, this node will draw a rainbow: - -```objective-c -@interface RainbowNode : ASDisplayNode -@end - -@implementation RainbowNode - -+ (void)drawRect:(CGRect)bounds - withParameters:(id)parameters - isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock - isRasterizing:(BOOL)isRasterizing -{ - // clear the backing store, but only if we're not rasterising into another layer - if (!isRasterizing) { - [[UIColor whiteColor] set]; - UIRectFill(bounds); - } - - // UIColor sadly lacks +indigoColor and +violetColor methods - NSArray *colors = @[ [UIColor redColor], - [UIColor orangeColor], - [UIColor yellowColor], - [UIColor greenColor], - [UIColor blueColor], - [UIColor purpleColor] ]; - CGFloat stripeHeight = roundf(bounds.size.height / (float)colors.count); - - // draw the stripes - for (UIColor *color in colors) { - CGRect stripe = CGRectZero; - CGRectDivide(bounds, &stripe, &bounds, stripeHeight, CGRectMinYEdge); - [color set]; - UIRectFill(stripe); - } -} - -@end -``` - -This could easily be extended to support vertical rainbows too, by adding a -`vertical` property to the node, exporting it in -`-drawParametersForAsyncLayer:`, and referencing it in -`+drawRect:withParameters:isCancelled:isRasterizing:`. More-complex nodes can -be supported in much the same way. - -For more on custom nodes, check out the [subclassing -header](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASDisplayNode%2BSubclasses.h) -or read on! diff --git a/docs/guide/3-asynchronous-display.md b/docs/guide/3-asynchronous-display.md deleted file mode 100644 index acc9f37911..0000000000 --- a/docs/guide/3-asynchronous-display.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -layout: docs -title: Asynchronous display -permalink: /guide/3/ -prev: guide/2/ -next: guide/4/ ---- - -## Realistic placeholders - -Nodes need to complete both a *measurement pass* and a *display pass* before -they're fully rendered. It's possible to force either step to happen -synchronously: call `-measure:` in `-layoutSubviews` to perform sizing on the -main thread, or set a node's `displaysAsynchronously` flag to NO to disable -ASDK's async display machinery. (AsyncDisplayKit can still improve your app's -performance even when rendering fully synchronously — more on that -later!) - -The recommended way to use ASDK is to only add nodes to your view hierarchy -once they've been sized. This avoids unsightly layout changes as the -measurement pass completes, but if you enable asynchronous display, it will -always be possible for a node to appear onscreen before its content has fully -rendered. We'll discuss techniques to minimise this shortly, but you should -take it into account and include *realistic placeholders* in your app designs. - -Once its measurement pass has completed, a node can accurately place all of its -subnodes onscreen — they'll just be blank. The easiest way to make a -realistic placeholder is to set static background colours on your subnodes. -This effect looks better than generic placeholder images because it varies -based on the content being loaded, and it works particularly well for opaque -images. You can also create visually-appealing placeholder nodes, like the -shimmery lines representing text in Paper as its stories are loaded, and swap -them out with your content nodes once they've finished displaying. - -## Working range - -So far, we've only discussed asynchronous sizing: toss a "create a node -hierarchy and measure it" block onto a background thread, then trampoline to -the main thread to add it to the view hierarchy when that's done. Ideally, as -much content as possible should be fully-rendered and ready to go as soon as -the user scrolls to it. This requires triggering display passes in advance. - -If your app's content is in a scroll view or can be paged through, like -Instagram's main feed or Paper's story strip, the solution is a *working -range*. A working range controller tracks the *visible range*, the subset of -content that's currently visible onscreen, and enqueues asynchronous rendering -for the next few screenfuls of content. As the user scrolls, a screenful or -two of previous content is preserved; the rest is cleared to conserve memory. -If she starts scrolling in the other direction, the working range trashes its -render queue and starts pre-rendering in the new direction of scroll — -and because of the buffer of previous content, this entire process will -typically be invisible. - -AsyncDisplayKit includes a generic working range controller, -`ASRangeController`. Its working range size can be tuned depending on your -app: if your nodes are simple, even an iPhone 4 can maintain a substantial -working range, but heavyweight nodes like Facebook stories are expensive and -need to be pruned quickly. - -```objective-c -ASRangeController *rangeController = [[ASRangeController alloc] init]; -rangeController.tuningParameters = (ASRangeTuningParameters){ - .leadingBufferScreenfuls = 2.0f; // two screenfuls in the direction of scroll - .trailingBufferScreenfuls = 0.5f; // one-half screenful in the other direction -}; -``` - -If you use a working range, you should profile your app and consider tuning it -differently on a per-device basis. iPhone 4 has 512MB of RAM and a single-core -A4 chipset, while iPhone 6 has 1GB of RAM and the orders-of-magnitude-faster -multicore A8 — and if your app supports iOS 7, it will be used on both. - -## ASTableView - -ASRangeController manages working ranges, but doesn't actually display content. -If your content is currently rendered in a UITableView, you can convert it to -use `ASTableView` and custom nodes — just subclass `ASCellNode` instead -of ASDisplayNode. ASTableView is a UITableView subclass that integrates -node-based cells and a working range. - -ASTableView doesn't let cells onscreen until their underlying nodes have been -sized, and as such can fully benefit from realistic placeholders. Its API is -very similar to UITableView (see the -[Kittens](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens) -sample project for an example), with some key changes: - -* Rather than setting the table view's `.delegate` and `.dataSource`, you set - its `.asyncDelegate` and `.asyncDataSource`. See - [ASTableView.h](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASTableView.h) - for how its delegate and data source protocols differ from UITableView's. - -* Instead of implementing `-tableView:cellForRowAtIndexPath:`, your data - source must implement `-tableView:nodeForRowAtIndexPath:`. This method must - be thread-safe and should not implement reuse. Unlike the UITableView - version, it won't be called when the row is about to display. - -* `-tableView:heightForRowAtIndexPath:` has been removed — ASTableView - lets your cell nodes size themselves. This means you no longer have to - manually duplicate or factor out layout and sizing logic for - dynamically-sized UITableViewCells! - -Next up, how to get the most out of ASDK in your app. diff --git a/docs/guide/4-making-the-most-of-asdk.md b/docs/guide/4-making-the-most-of-asdk.md deleted file mode 100644 index f35ad900b4..0000000000 --- a/docs/guide/4-making-the-most-of-asdk.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -layout: docs -title: Making the most of AsyncDisplayKit -permalink: /guide/4/ -prev: guide/3/ -next: guide/5/ ---- - -## A note on optimisation - -AsyncDisplayKit is powerful and flexible, but it is not a panacea. If your app -has a complex image- or text-heavy user interface, ASDK can definitely help -improve its performance — but if you're blocking the main thread on -network requests, you should consider rearchitecting a few things first. :] - -So why is it worthwhile to change the way we do view layout and rendering, -given that UIKit has always been locked to the main thread and performant iOS -apps have been shipping since iPhone's launch? - -### Modern animations - -Until iOS 7, static animations (à la `+[UIView -animateWithDuration:animations:]`) were the standard. The post-skeuomorphism -redesign brought with it highly-interactive, physics-based animations, with -springs joining the ranks of constant animation functions like -`UIViewAnimationOptionCurveEaseInOut`. - -Classic animations aren't actually executed in your app. They're executed -out-of-process, in the high-priority Core Animation render server. Thanks to -pre-emptive multitasking, an app can block its main thread continuously without -causing the animation to drop a single frame. - -Critically, dynamic animations can't be offloaded the same way, and both -[pop](https://github.com/facebook/pop) and UIKit Dynamics execute physics -simulations on your app's main thread. This is because executing arbitrary -code in the render server would introduce unacceptable latency, even if it -could be done securely. - -Physics-based animations are often interactive, letting you start an animation -and interrupt it before it completes. Paper lets you fling objects across the -screen and catch them before they land, or grab a view that's being pulled by a -spring and tear it off. This requires processing touch events and updating -animation targets in realtime — even short delays for inter-process -communication would shatter the illusion. - -(Fun fact: Inertial scrolling is also a physics animation! UIScrollView has -always implemented its animations on the main thread, which is why stuttery -scrolling is the hallmark of a slow app.) - -### The main-thread bottleneck - -Physics animations aren't the only thing that need to happen on the main -thread. The main thread's [run -loop](https://developer.apple.com/library/ios/documentation/cocoa/conceptual/multithreading/runloopmanagement/runloopmanagement.html) -is responsible for handling touch events and initiating drawing operations -— and with UIKit in the mix, it also has to render text, decode images, -and do any other custom drawing (e.g., using Core Graphics). - -If an iteration of the main thread's run loop takes too long, it will drop an -animation frame and may fail to handle touch events in time. Each iteration of -the run loop must complete within 16ms in order to drive 60fps animations, and -your own code typically has less than 10ms to execute. This means that the -best way to keep your app smooth and responsive is to do as little work on the -main thread as possible. - -What's more, the main thread only executes on one core! Single-threaded view -hierarchies can't take advantage of the multicore CPUs in all modern iOS -devices. This is important for more than just performance reasons — it's -also critical for battery life. Running the CPU on all cores for a short time -is preferable to running one core for an extended amount of time: if the -processor can *race to sleep* by finishing its work and idling faster, it can -spend more time in a low-power mode, improving battery life. - -## When to go asynchronous - -AsyncDisplayKit really shines when used fully asynchronously, shifting both -measurement and rendering passes off the main thread and onto multiple cores. -This requires a completely node-based hierarchy. Just as degrading from -UIViews to CALayers disables view-specific functionality like touch handling -from that point on, degrading from nodes to views disables async behaviour. - -You don't, however, need to convert your app's entire view hierarchy to nodes. -In fact, you shouldn't! Asynchronously bringing up your app's core UI, like -navigation elements or tab bars, would be a very confusing experience. Those -elements of your apps can still be nodes, but should be fully synchronous to -guarantee a fully-usable interface as quickly as possible. (This is why -UIWindow has no node equivalent.) - -There are two key situations where asynchronous hierarchies excel: - -1. *Parallelisation*. Measuring and rendering UITableViewCells (or your app's - equivalent, e.g., story cards in Paper) are embarrassingly parallel - problems. Table cells typically have a fixed width and variable height - determined by their contents — the argument to `-measure:` for one - cell doesn't depend on any other cells' calculations, so we can enqueue an - arbitrary number of cell measurement passes at once. - -2. *Preloading*. An app with five tabs should synchronously load the first - one so content is ready to go as quickly as possible. Once this is - complete and the CPU is idle, why not asynchronously prepare the other tabs - so the user doesn't have to wait? This is inconvenient with views, but - very easy with nodes. - -Paper's asynchronous rendering starts at the story strip. You should profile -your app and watch how people use it in the wild to decide what combination of -synchrony and asynchrony yields the best user experience. - -## Additional optimisations - -Complex hierarchies — even when rendered asynchronously — can -impose a cost because of the sheer number of views involved. Working around -this can be painful, but AsyncDisplayKit makes it easy! - -* *Layer-backing*. In some cases, you can substantially improve your app's - performance by using layers instead of views. Manually converting - view-based code to layers is laborious due to the difference in APIs. - Worse, if at some point you need to enable touch handling or other - view-specific functionality, you have to manually convert everything back - (and risk regressions!). - - With nodes, converting an entire subtree from views to layers is as simple - as... - - rootNode.layerBacked = YES; - - ...and if you need to go back, it's as simple as deleting one line. We - recommend enabling layer-backing as a matter of course in any custom node - that doesn't need touch handling. - -* *Precompositing*. Flattening an entire view hierarchy into a single layer - also improves performance, but comes with a hit to maintainability and - hierarchy-based reasoning. Nodes can do this for you too! - - rootNode.shouldRasterizeDescendants = YES; - - ...will cause the entire node hierarchy from that point on to be rendered - into one layer. - -Next up: AsyncDisplayKit, under the hood. diff --git a/docs/guide/5-under-the-hood.md b/docs/guide/5-under-the-hood.md deleted file mode 100644 index 01229ec3ff..0000000000 --- a/docs/guide/5-under-the-hood.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -layout: docs -title: Under the hood -permalink: /guide/5/ -prev: guide/4/ ---- - -## Node architecture - -*(Skip to the next section if you're not interested in AsyncDisplayKit implementation details.)* - -We've described nodes as an abstraction over views and layers, and shown how to -interact with the underlying UIViews and CALayers when necessary. Nodes don't -wrap or vend their UIKit counterparts, though — an ASImageNode's `.view` -is not a UIImageView! So how do nodes work? - -**NOTE:** Classes whose names begin with `_` are private. Don't use them -directly! - -Creating a node doesn't create its underlying view-layer pair. This is why you -can create nodes cheaply and on background threads. When you use a UIView or -CALayer property on a node, you're actually interacting with a proxy object, -[`_ASPendingState`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Private/_ASPendingState.h), -that's preconfigured to match UIView and CALayer defaults. - -The first access to a node's `.view` or `.layer` property causes both to be -initialised and configured with the node's current state. If it has subnodes, -they are recursively loaded as well. Once a node has been loaded, the proxy -object is destroyed and the node becomes main-thread-affined — its -properties will update the underlying view directly. (Layer-backed nodes do -the same, not loading views.) - -Nodes are powered by -[`_ASDisplayLayer`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/_ASDisplayLayer.h) -and -[`_ASDisplayView`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/_ASDisplayView.h). -These are lightweight to create and add to their respective hierarchies, and -provide integration points that allow nodes to act as full-fledged views or -layers. It's possible to create nodes that are backed by custom view or layer -classes, but doing so is strongly discouraged as it disables the majority of -ASDK's functionality. - -When Core Animation asks an `_ASDisplayLayer` to draw itself, the request is -forwarded to its node. Unless asynchronous display has been disabled, the -actual draw call won't happen immediately or on the main thread. Instead, a -display block will be added to a background queue. These blocks are executed -in parallel, but you can enable `ASDISPLAYNODE_DELAY_DISPLAY` in -[`ASDisplayNode(AsyncDisplay)`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Private/ASDisplayNode%2BAsyncDisplay.mm) -to serialise the render system for debugging. - -Common UIView subclass hooks are forwarded from `_ASDisplayView` to its -underlying node, including touch handling, hit-testing, and gesture recogniser -delegate calls. Because an `_ASDisplayView`'s layer is an `_ASDisplayLayer`, -view-backed nodes also participate in asynchronous display. - -## In practice - -What does this mean for your custom nodes? - -You can implement methods like `-touchesBegan:withEvent:` / -`touchesMoved:withEvent:` / `touchesEnded:withEvent:` / -`touchesCancelled:withEvent:` in your nodes exactly as you would in a UIView -subclass. If you find you need a subclass hook that hasn't already been -provided, please file an issue on GitHub — or add it yourself and submit a -pull request! - -If you need to interact or configure your node's underlying view or layer, -don't do so in `-init`. Instead, override `-didLoad` and check if you're -layer-backed: - -```objective-c -- (void)didLoad -{ - [super didLoad]; - - // add a gesture recogniser, if we have a view to add it to - if (!self.layerBacked) { - _gestureRecogniser = [[UITapGestureRecognizer alloc] initWithTarget:self - action:@selector(_tap:)]; - [self.view addGestureRecognizer:_gestureRecogniser]; - } -} -``` - -## *fin.* - -Thanks for reading! If you have any questions, please file a GitHub issue or -post in the [Facebook group](https://www.facebook.com/groups/551597518288687). -We'd love to hear from you. diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index ff8065921a..0000000000 --- a/docs/index.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -layout: page -title: Smooth asynchronous user interfaces for iOS apps ---- - -![logo]({{ site.baseurl }}/assets/logo.png) - -AsyncDisplayKit is an iOS framework that keeps even the most complex user -interfaces smooth and responsive. It was originally built to make Facebook's -[Paper](https://facebook.com/paper) possible, and goes hand-in-hand with -[pop](https://github.com/facebook/pop)'s physics-based animations — but -it's just as powerful with UIKit Dynamics and conventional app designs. - - -
-### Quick start - -ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: - -```ruby -pod 'AsyncDisplayKit' -``` - -(ASDK can also be used as a regular static library: Copy the project to your -codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace. Add -`libAsyncDisplayKit.a`, AssetsLibrary, and Photos to the "Link Binary With -Libraries" build phase. Include `-lc++ -ObjC` in your project linker flags.) - -Import the framework header, or create an [Objective-C bridging -header](https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/MixandMatch.html) -if you're using Swift: - -```objective-c -#import -``` - -AsyncDisplayKit Nodes are a thread-safe abstraction layer over UIViews and -CALayers: - -![logo]({{ site.baseurl }}/assets/node-view-layer.png) - -You can construct entire node hierarchies in parallel, or instantiate and size -a single node on a background thread — for example, you could do -something like this in a UIViewController: - -```objective-c -dispatch_async(_backgroundQueue, ^{ - ASTextNode *node = [[ASTextNode alloc] init]; - node.attributedString = [[NSAttributedString alloc] initWithString:@"hello!" - attributes:nil]; - [node measure:CGSizeMake(screenWidth, FLT_MAX)]; - node.frame = (CGRect){ CGPointZero, node.calculatedSize }; - - // self.view isn't a node, so we can only use it on the main thread - dispatch_async(dispatch_get_main_queue(), ^{ - [self.view addSubview:node.view]; - }); -}); -``` - -AsyncDisplayKit at a glance: - -* `ASImageNode` and `ASTextNode` are drop-in replacements for UIImageView and - UITextView. -* `ASMultiplexImageNode` can load and display progressively higher-quality - variants of an image over a slow cell network, letting you quickly show a - low-resolution photo while the full size downloads. -* `ASNetworkImageNode` is a simpler, single-image counterpart to the Multiplex - node. -* `ASTableView` and `ASCollectionView` are a node-aware UITableView and - UICollectionView, respectively, that can asynchronously preload cell nodes - — from loading network data to rendering — all without blocking - the main thread. - -You can also easily [create your own -nodes](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASDisplayNode%2BSubclasses.h) -to implement node hierarchies or custom drawing. - - -
-### Learn more - -* Read the [Getting Started guide]({{ site.baseurl }}/guide) -* Get the [sample projects](https://github.com/facebook/AsyncDisplayKit/tree/master/examples) -* Browse the [API reference]({{ site.baseurl }}/appledoc) -* Watch the [NSLondon talk](http://vimeo.com/103589245) or the [NSSpain talk](https://www.youtube.com/watch?v=RY_X7l1g79Q) From ae87717263c33b0e3e8c09a9f7f3693f1b6f31fe Mon Sep 17 00:00:00 2001 From: appleguy Date: Sun, 26 Jun 2016 17:12:59 -0700 Subject: [PATCH 025/247] Revert "Remove old website folder from master branch" (#1818) --- docs/CNAME | 2 + docs/LICENSE.md | 420 ++++++++++++++++++++++++ docs/README.md | 9 + docs/_config.yml | 13 + docs/_includes/footer.html | 18 + docs/_includes/head.html | 24 ++ docs/_includes/header.html | 25 ++ docs/_layouts/default.html | 20 ++ docs/_layouts/docs.html | 27 ++ docs/_layouts/page.html | 16 + docs/_layouts/post.html | 15 + docs/_sass/_base.scss | 205 ++++++++++++ docs/_sass/_layout.scss | 265 +++++++++++++++ docs/_sass/_syntax-highlighting.scss | 76 +++++ docs/assets/guide/1-shuffle-crop.png | Bin 0 -> 1016 bytes docs/assets/guide/1-shuffle.png | Bin 0 -> 19288 bytes docs/assets/logo-square.png | Bin 0 -> 66422 bytes docs/assets/logo.png | Bin 0 -> 105684 bytes docs/assets/node-view-layer.png | Bin 0 -> 12961 bytes docs/build.sh | 33 ++ docs/css/main.scss | 49 +++ docs/guide/1-introduction.md | 150 +++++++++ docs/guide/2-custom-nodes.md | 211 ++++++++++++ docs/guide/3-asynchronous-display.md | 102 ++++++ docs/guide/4-making-the-most-of-asdk.md | 139 ++++++++ docs/guide/5-under-the-hood.md | 89 +++++ docs/index.md | 86 +++++ 27 files changed, 1994 insertions(+) create mode 100644 docs/CNAME create mode 100644 docs/LICENSE.md create mode 100644 docs/README.md create mode 100644 docs/_config.yml create mode 100644 docs/_includes/footer.html create mode 100644 docs/_includes/head.html create mode 100644 docs/_includes/header.html create mode 100644 docs/_layouts/default.html create mode 100644 docs/_layouts/docs.html create mode 100644 docs/_layouts/page.html create mode 100644 docs/_layouts/post.html create mode 100644 docs/_sass/_base.scss create mode 100644 docs/_sass/_layout.scss create mode 100644 docs/_sass/_syntax-highlighting.scss create mode 100644 docs/assets/guide/1-shuffle-crop.png create mode 100644 docs/assets/guide/1-shuffle.png create mode 100755 docs/assets/logo-square.png create mode 100755 docs/assets/logo.png create mode 100755 docs/assets/node-view-layer.png create mode 100755 docs/build.sh create mode 100755 docs/css/main.scss create mode 100644 docs/guide/1-introduction.md create mode 100644 docs/guide/2-custom-nodes.md create mode 100644 docs/guide/3-asynchronous-display.md create mode 100644 docs/guide/4-making-the-most-of-asdk.md create mode 100644 docs/guide/5-under-the-hood.md create mode 100644 docs/index.md diff --git a/docs/CNAME b/docs/CNAME new file mode 100644 index 0000000000..a295f461e5 --- /dev/null +++ b/docs/CNAME @@ -0,0 +1,2 @@ +asyncdisplaykit.org + diff --git a/docs/LICENSE.md b/docs/LICENSE.md new file mode 100644 index 0000000000..4bb498ec63 --- /dev/null +++ b/docs/LICENSE.md @@ -0,0 +1,420 @@ +--- +layout: page +title: License +permalink: /license/ +--- + +AsyncDisplayKit is free software under the
BSD +license. + +Code examples and sample +projects are licensed as follows: + + This file provided by Facebook is for non-commercial testing and evaluation + purposes only. Facebook reserves all rights not expressly granted. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +All other AsyncDisplayKit documentation is licensed CC-BY-4.0. + + Attribution 4.0 International + + ======================================================================= + + Creative Commons Corporation ("Creative Commons") is not a law firm and + does not provide legal services or legal advice. Distribution of + Creative Commons public licenses does not create a lawyer-client or + other relationship. Creative Commons makes its licenses and related + information available on an "as-is" basis. Creative Commons gives no + warranties regarding its licenses, any material licensed under their + terms and conditions, or any related information. Creative Commons + disclaims all liability for damages resulting from their use to the + fullest extent possible. + + Using Creative Commons Public Licenses + + Creative Commons public licenses provide a standard set of terms and + conditions that creators and other rights holders may use to share + original works of authorship and other material subject to copyright + and certain other rights specified in the public license below. The + following considerations are for informational purposes only, are not + exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More_considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + + ======================================================================= + + Creative Commons Attribution 4.0 International Public License + + By exercising the Licensed Rights (defined below), You accept and agree + to be bound by the terms and conditions of this Creative Commons + Attribution 4.0 International Public License ("Public License"). To the + extent this Public License may be interpreted as a contract, You are + granted the Licensed Rights in consideration of Your acceptance of + these terms and conditions, and the Licensor grants You such rights in + consideration of benefits the Licensor receives from making the + Licensed Material available under these terms and conditions. + + + Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + + Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + + Section 3 -- License Conditions. + + Your exercise of the Licensed Rights is expressly made subject to the + following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + + Section 4 -- Sui Generis Database Rights. + + Where the Licensed Rights include Sui Generis Database Rights that + apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + + For the avoidance of doubt, this Section 4 supplements and does not + replace Your obligations under this Public License where the Licensed + Rights include other Copyright and Similar Rights. + + + Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + + Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + + Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + + Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + + ======================================================================= + + Creative Commons is not a party to its public licenses. + Notwithstanding, Creative Commons may elect to apply one of its public + licenses to material it publishes and in those instances will be + considered the "Licensor." Except for the limited purpose of indicating + that material is shared under a Creative Commons public license or as + otherwise permitted by the Creative Commons policies published at + creativecommons.org/policies, Creative Commons does not authorize the + use of the trademark "Creative Commons" or any other trademark or logo + of Creative Commons without its prior written consent including, + without limitation, in connection with any unauthorized modifications + to any of its public licenses or any other arrangements, + understandings, or agreements concerning use of licensed material. For + the avoidance of doubt, this paragraph does not form part of the public + licenses. + + Creative Commons may be contacted at creativecommons.org. diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..05980d3818 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,9 @@ +# Documentation + +## Building + +You need Jekyll and appledoc. See `build.sh`. + +## License + +See LICENSE.md. diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000000..0d5f309f67 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,13 @@ +# Site settings +title: AsyncDisplayKit +description: Smooth asynchronous user interfaces for iOS apps. +baseurl: "" +url: "http://asyncdisplaykit.org" + +# Build settings +highlighter: pygments +markdown: redcarpet + +exclude: +- README.md +- build.sh diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html new file mode 100644 index 0000000000..2714963def --- /dev/null +++ b/docs/_includes/footer.html @@ -0,0 +1,18 @@ +

+ +
+ + +
+ +
diff --git a/docs/_includes/head.html b/docs/_includes/head.html new file mode 100644 index 0000000000..a9e7efbdea --- /dev/null +++ b/docs/_includes/head.html @@ -0,0 +1,24 @@ + + + + + + + + + + + + {% if page.title %}{{ page.title }} — {% endif %}AsyncDisplayKit + + + + + + + diff --git a/docs/_includes/header.html b/docs/_includes/header.html new file mode 100644 index 0000000000..aebb67cdf1 --- /dev/null +++ b/docs/_includes/header.html @@ -0,0 +1,25 @@ + diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html new file mode 100644 index 0000000000..bdf5a388da --- /dev/null +++ b/docs/_layouts/default.html @@ -0,0 +1,20 @@ + + + + {% include head.html %} + + + + {% include header.html %} + +
+
+ {{ content }} +
+
+ + {% include footer.html %} + + + + diff --git a/docs/_layouts/docs.html b/docs/_layouts/docs.html new file mode 100644 index 0000000000..65c07040aa --- /dev/null +++ b/docs/_layouts/docs.html @@ -0,0 +1,27 @@ +--- +layout: default +sectionid: docs +--- +
+ +
+

+ {{ page.title }} + [edit] +

+
+ +
+ {{ content }} +
+ +
+ {% if page.prev %} + ← prev + {% endif %} + {% if page.next %} + next → + {% endif %} +
+ +
diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html new file mode 100644 index 0000000000..8e7ccf7a15 --- /dev/null +++ b/docs/_layouts/page.html @@ -0,0 +1,16 @@ +--- +layout: default +--- +
+ + {% if page.shouldDisplayTitle %} +
+

{{ page.title }}

+
+ {% endif %} + +
+ {{ content }} +
+ +
diff --git a/docs/_layouts/post.html b/docs/_layouts/post.html new file mode 100644 index 0000000000..675596fb1c --- /dev/null +++ b/docs/_layouts/post.html @@ -0,0 +1,15 @@ +--- +layout: default +--- +
+ +
+

{{ page.title }}

+ +
+ +
+ {{ content }} +
+ +
diff --git a/docs/_sass/_base.scss b/docs/_sass/_base.scss new file mode 100644 index 0000000000..7d353be258 --- /dev/null +++ b/docs/_sass/_base.scss @@ -0,0 +1,205 @@ +/** + * Reset some basic elements + */ +body, h1, h2, h3, h4, h5, h6, +p, blockquote, pre, hr, +dl, dd, ol, ul, figure { + margin: 0; + padding: 0; +} + + + +/** + * Basic styling + */ +body { + font-family: $base-font-family; + font-size: $base-font-size; + line-height: $base-line-height; + font-weight: 300; + color: $text-color; + background-color: $background-color; + -webkit-text-size-adjust: 100%; +} + + + +/** + * Set `margin-bottom` to maintain vertical rhythm + */ +h1, h2, h3, h4, h5, h6, +p, blockquote, pre, +ul, ol, dl, figure, +%vertical-rhythm { + margin-bottom: $spacing-unit / 2; +} + + + +/** + * Images + */ +img { + max-width: 100%; + vertical-align: middle; +} + + + +/** + * Figures + */ +figure > img { + display: block; +} + +figcaption { + font-size: $small-font-size; +} + + + +/** + * Lists + */ +ul, ol { + margin-left: $spacing-unit; +} + +li { + > ul, + > ol { + margin-bottom: 0; + } +} + + + +/** + * Headings + */ +h1, h2, h3, h4, h5, h6 { + font-weight: 300; +} + + + +/** + * Links + */ +a { + color: $brand-color; + text-decoration: none; + + &:visited { + color: darken($brand-color, 15%); + } + + &:hover { + color: $text-color; + text-decoration: underline; + } +} + + + +/** + * Blockquotes + */ +blockquote { + color: $grey-color; + border-left: 4px solid $grey-color-light; + padding-left: $spacing-unit / 2; + font-size: 18px; + letter-spacing: -1px; + font-style: italic; + + > :last-child { + margin-bottom: 0; + } +} + + + +/** + * Code formatting + */ +pre, +code { + font-family: Monaco, monospace; + font-size: 14px; + border: 1px solid #afe4ff; + border-radius: 3px; + background-color: #fafdff; +} + +code { + padding: 1px 5px; +} + +pre { + padding: 8px 12px; + overflow-x: scroll; + + > code { + border: 0; + padding-right: 0; + padding-left: 0; + } +} + + + +/** + * Wrapper + */ +.wrapper { + max-width: -webkit-calc(800px - (#{$spacing-unit} * 2)); + max-width: calc(800px - (#{$spacing-unit} * 2)); + margin-right: auto; + margin-left: auto; + padding-right: $spacing-unit; + padding-left: $spacing-unit; + @extend %clearfix; + + @include media-query($on-laptop) { + max-width: -webkit-calc(800px - (#{$spacing-unit})); + max-width: calc(800px - (#{$spacing-unit})); + padding-right: $spacing-unit / 2; + padding-left: $spacing-unit / 2; + } +} + + + +/** + * Clearfix + */ +%clearfix { + + &:after { + content: ""; + display: table; + clear: both; + } +} + + + +/** + * Icons + */ +.icon { + + > svg { + display: inline-block; + width: 16px; + height: 16px; + vertical-align: middle; + + path { + fill: $grey-color; + } + } +} diff --git a/docs/_sass/_layout.scss b/docs/_sass/_layout.scss new file mode 100644 index 0000000000..2eb740fa67 --- /dev/null +++ b/docs/_sass/_layout.scss @@ -0,0 +1,265 @@ +/** + * Site header + */ +.site-header { + border-top: 5px solid $grey-color-dark; + border-bottom: 1px solid $grey-color-light; + min-height: 56px; + background-color: #f8f8f8; + + // Positioning context for the mobile navigation icon + position: relative; +} + +.site-title { + font-size: 26px; + line-height: 56px; + letter-spacing: -1px; + margin-bottom: 0; + float: left; + + &, + &:visited { + color: $grey-color-dark; + } + &:hover { + text-decoration: none; + } +} + +.site-nav { + float: right; + line-height: 56px; + + .menu-icon { + display: none; + } + + .page-link { + color: $grey-color; + line-height: $base-line-height; + + // Gaps between nav items, but not on the first one + &:not(:first-child) { + margin-left: 20px; + } + + &:hover { + color: $text-color; + } + } + + .page-link-active { + color: $text-color; + } + + @include media-query($on-palm) { + position: absolute; + top: 9px; + right: 30px; + background-color: $background-color; + border: 1px solid $grey-color-light; + border-radius: 5px; + text-align: right; + + .menu-icon { + display: block; + float: right; + width: 36px; + height: 26px; + line-height: 0; + padding-top: 10px; + text-align: center; + + > svg { + width: 18px; + height: 15px; + + path { + fill: $grey-color-dark; + } + } + } + + .trigger { + clear: both; + display: none; + } + + &:hover .trigger { + display: block; + padding-bottom: 5px; + } + + .page-link { + display: block; + padding: 5px 10px; + } + } +} + + + +/** + * Site footer + */ +.site-footer { + border-top: 1px solid $grey-color-light; + padding: $spacing-unit 0; +} + +.footer-heading { + font-size: 18px; + margin-bottom: $spacing-unit / 2; +} + +.contact-list, +.social-media-list { + list-style: none; + margin-left: 0; +} + +.footer-col-wrapper { + font-size: 11px; + color: $grey-color; + margin-left: -$spacing-unit / 2; + @extend %clearfix; +} + +.footer-col { + float: left; + margin-bottom: $spacing-unit / 2; + padding-left: $spacing-unit / 2; +} + +.footer-col-left { + width: -webkit-calc(50% - (#{$spacing-unit} / 2)); + width: calc(50% - (#{$spacing-unit} / 2)); +} + +.footer-col-right { + text-align: right; + width: -webkit-calc(50% - (#{$spacing-unit} / 2)); + width: calc(50% - (#{$spacing-unit} / 2)); +} + +@include media-query($on-laptop) { + .footer-col-left { + width: -webkit-calc(50% - (#{$spacing-unit} / 2)); + width: calc(50% - (#{$spacing-unit} / 2)); + } + + .footer-col-right { + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + +@include media-query($on-palm) { + .footer-col { + float: none; + width: -webkit-calc(100% - (#{$spacing-unit} / 2)); + width: calc(100% - (#{$spacing-unit} / 2)); + } +} + + + +/** + * Page content + */ +.page-content { + padding: $spacing-unit 0; + background-color: white; +} + +.page-heading { + font-size: 20px; +} + +.post-list { + margin-left: 0; + list-style: none; + + > li { + margin-bottom: $spacing-unit; + } +} + +.post-meta { + font-size: $small-font-size; + color: $grey-color; +} + +.post-link { + display: block; + font-size: 24px; +} + + + +/** + * Posts + */ +.post-header { + margin-bottom: $spacing-unit; +} + +.post-title { + font-size: 42px; + letter-spacing: -1px; + line-height: 1; + + @include media-query($on-laptop) { + font-size: 36px; + } + + .edit-page-link { + font-size: 18px; + } +} + +.post-content { + margin-bottom: $spacing-unit; + + h2 { + font-size: 32px; + + @include media-query($on-laptop) { + font-size: 28px; + } + } + + h3 { + font-size: 26px; + + @include media-query($on-laptop) { + font-size: 22px; + } + } + + h4 { + font-size: 20px; + + @include media-query($on-laptop) { + font-size: 18px; + } + } +} + + + +/** + * Docs + */ +.docs-prevnext { + @extend %clearfix; +} + +.docs-prev { + float: left; +} + +.docs-next { + float: right; +} diff --git a/docs/_sass/_syntax-highlighting.scss b/docs/_sass/_syntax-highlighting.scss new file mode 100644 index 0000000000..3758fdb458 --- /dev/null +++ b/docs/_sass/_syntax-highlighting.scss @@ -0,0 +1,76 @@ +/** + * Syntax highlighting styles + */ + +/* not official Xcode colors, but looks better on the web */ +$xc-black: black; +$xc-green: #008d14; +$xc-red: #b72748; +$xc-blue: #103ffb; +$xc-turquoise: #3a95ba; + +.highlight { + background: #fff; + @extend %vertical-rhythm; + + .c { color: $xc-green; font-style: italic } // Comment + .err { color: #a61717; background-color: #e3d2d2 } // Error + .k { color: $xc-blue} // Keyword + .o { } // Operator + .cm { color: $xc-green; font-style: italic } // Comment.Multiline + .cp { color: $xc-red} // Comment.Preproc + .c1 { color: $xc-green; font-style: italic } // Comment.Single + .cs { color: $xc-green; font-weight: bold; font-style: italic } // Comment.Special + .gd { color: #000; background-color: #fdd } // Generic.Deleted + .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific + .ge { font-style: italic } // Generic.Emph + .gr { color: #a00 } // Generic.Error + .gh { color: #999 } // Generic.Heading + .gi { color: #000; background-color: #dfd } // Generic.Inserted + .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific + .go { color: #888 } // Generic.Output + .gp { color: #555 } // Generic.Prompt + .gs { font-weight: bold } // Generic.Strong + .gu { color: #aaa } // Generic.Subheading + .gt { color: #a00 } // Generic.Traceback + .kc { color: orange} // Keyword.Constant + .kd { color: orange} // Keyword.Declaration + .kp { color: $xc-green} // Keyword.Pseudo + .kr { color: $xc-green} // Keyword.Reserved + .kt { color: $xc-blue} // Keyword.Type + .m { color: orange } // Literal.Number + .s { color: $xc-red } // Literal.String + .na { color: orange } // Name.Attribute + .nb { color: $xc-blue } // Name.Builtin + .nc { color: $xc-turquoise } // Name.Class + .no { color: orange } // Name.Constant + .ni { color: orange } // Name.Entity + .ne { color: orange } // Name.Exception + .nf { } // Name.Function + .nn { color: orange } // Name.Namespace + .nt { color: orange } // Name.Tag + .nv { } // Name.Variable + .ow { } // Operator.Word + .w { color: #bbb } // Text.Whitespace + .mf {} // Literal.Number.Float + .mh { color: $xc-black } // Literal.Number.Hex + .mi { color: $xc-black } // Literal.Number.Integer + .mo { color: $xc-black } // Literal.Number.Oct + .il { color: $xc-black } // Literal.Number.Integer.Long + .sb { color: #d14 } // Literal.String.Backtick + .sc { color: #d14 } // Literal.String.Char + .sd { color: #d14 } // Literal.String.Doc + .s2 { color: #d14 } // Literal.String.Double + .se { color: #d14 } // Literal.String.Escape + .sh { color: #d14 } // Literal.String.Heredoc + .si { color: #d14 } // Literal.String.Interpol + .sx { color: #d14 } // Literal.String.Other + .sr { color: orange } // Literal.String.Regex + .s1 { color: $xc-red } // Literal.String.Single + .ss { color: $xc-red } // Literal.String.Symbol + .bp { color: $xc-turquoise } // Name.Builtin.Pseudo + .vc { color: $xc-turquoise } // Name.Variable.Class + .vg { color: $xc-black } // Name.Variable.Global + .vi { color: orange } // Name.Variable.Instance + .nl { color: $xc-turquoise } +} diff --git a/docs/assets/guide/1-shuffle-crop.png b/docs/assets/guide/1-shuffle-crop.png new file mode 100644 index 0000000000000000000000000000000000000000..d1e0a83b0c3c23ee7ae938f88dbc1bebd1f27246 GIT binary patch literal 1016 zcmeAS@N?(olHy`uVBq!ia0y~yVB7>`>u|6ENrnvD*+5dT#5JNMI6tkVJh3R1p&&0k zxu~=_!=cpkGXn$jB2O2`kcwMxZ~J!mRm&Xs_};iY&1Un1je<(9C!d&UW^G$>v%+)X zo+C?KIyKyq)KW7hi5zu0>2@efY{{~WBTj)zulO`CP2ug%G@ALSa$d2xeewC3&(F=h zy>n-2{J!~CbFV+Q{5oe@{_{Eiuc&(-O5tjCQr!KE{qwFfRb{JYC+uC9R=Mcq@-utN zcG_)@n}0LTx>xpd@g$X4k4ygp76!avtYg%2`1-qM(aJfN%jVpSo13uH>g1FwI_fiX zJ1OZfs&pZJ}bs zX11v4WL$hKC0e^h&GWAcX&igRove_L54T-D0R z?*7rcvtHiH`thIM-j6RfuH@X7|9uw7*u-Nz72ov^UAo4mA9rAi=7%?uXXbLd_Z=y$ z{&t{OdUAcZGqX-4Q)%gjlFS_KsR;*}W*Ddc**IPA;4qzs&OJFbe=P29D_D5l*(fE*@9$rO;gu28wiO2Vj*D^`)K>ARSQZ?3tte@vxtv$}(fnz@e!1 zavq)oD}y)W%>_B&Qv8OhQlH4r&wAzg;vVkME-0f`@ZX99t7%_)q5S zS)dRoIl>YeG&!QCJx^e&QGp3T(=JTt-{Lyf_xt`VW4m~78z@J6y85}Sb4q9e0NQ!% A6951J literal 0 HcmV?d00001 diff --git a/docs/assets/guide/1-shuffle.png b/docs/assets/guide/1-shuffle.png new file mode 100644 index 0000000000000000000000000000000000000000..9188eebf8ae9edd78fadd80b1a8f994e116c88e4 GIT binary patch literal 19288 z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I>isgxTEWwd>GGo% zVk6!8HoN*6ZpAg+$s7b1fRPL~uZj0>*1oM#4Y1MbjE55*%{cq~NX$ee-~hCu5*u!) z4fpK(%?#D1vPYo-TUiN>)Q})y1z;?NTq9@B@LF))h=$hIP%MHM`U4aevaki@P+FCl~kq#-s3Ba}%dfo^>-!>Oy&3K&_%MZXd zR*5zH@x8IW;I_t&nBhSHXl>|tThp6eO literal 0 HcmV?d00001 diff --git a/docs/assets/logo-square.png b/docs/assets/logo-square.png new file mode 100755 index 0000000000000000000000000000000000000000..82ad66c69ecdd8626cdd380e5c536dbcaeb0a0fc GIT binary patch literal 66422 zcmeFYS5%W*w?7<2K}E!ZfKuCrCLVy3>U2O>D zc;eB|NgD8t@u~EA@ar;KNgu7_VuSX!a7RLJS-V&wuiSUCKq0k}7S=v)UyyPT2(_CX zLLaTKp)O}p}@mSNN4o@yYkn-{|H&zS<6UC!=$7ntVN*G5>^sWOSqUc z_{&BLYAGcx0vEBiv9_`i`7fRSZ9QCBjQy z6<$3%XKNR4556M_{d?fMNOwCgq_wiUi_?{Vu2{zIf7#yB!qNg}EeTF-Az}%YfQd;$ zEyb*@pcWDqQkJ6PHZVzP%WMBxZ~g!G>VyGP!bf`YKlJ9mUjb!2`sZ&e03Uwa5z-kL zk2|oEPxZ>p5XfQ5{kyjik4KiqX_KsVF^W?~_`FkZ?(tuHdz{+grm<(d_}q_4k~oS$ zC{JR#n3-Gca8uOcqdE-2ugrM2FEg{y&9jsD_4!LruXdvk8{t(px9(c6)RS~Q7Xvcp zHW8am@}vM9{`-Kp<~&qT@c5BUe-+K5JNlig=5`AFdNRTY+y?ll@qZux?>7EV8UD`} zAh`uabS&A+4fzbfAQpZshRsvs?*s3^qM`<4LrHuV)c!34Pv-!{hqT7m`PL@+t`8gk5vfdq6&CEcZLR2KwD#gP|DK2 zJ0j=NQjL3CZhd;!rsY-EAEOyiFA4Fs>cuykl~?y>~IC&^|z|87UFINVzxeqmX z4Exg2(fK}oHN4WX1DVf<5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4Oj!r=f1tH`$=Q9vS{K~GKI#L=6Md|j0v`z&`WFMJkbnS%| zSY2yKuveZ~8q!hellp2BZt%%jcsIf4RMc(dcm}Wgg{-__>D5$YAP5WsSu$k*TmiQ3 z5;gn8AIFxJ(0Np>q4vhr-Wc(T)SP1HRPLF#bQ$-_NG6c>gPIEz;DQ^(iE}H(GmMaI z*t|wr%$3EHNqF2o{)F~Mp~xGZZ}&cO4bJAP0;L=Mtt1UVo+=CN97#jRNrq3>TtJaF z^V9L&c;OhKs3yl7LMqt|_^pVo4a>mnnINP65^R-=h)uWZuJ!X)^{sAucx}1EaH%Gv zB@-@o@M+dkflH?6%WS*OSAi3qpZ<9OZS_>k`tXW3=EmYd_h4DXsYlV03+rd!S6%Ui zS z?LgJIN4e~M=h8%NDu07cib2ZEso*Kl(gN%?2jbpFw7=w3I_UvG6!J~?@E3+@eRX5Q z?3W%3A6$glIHTbE#*>Olw@6CR_$AA33!lr`0Jhsys_bWV?^8!g`#nL z%5l@EH;(LKh{Q)7i~F4$^STHd0G9r-)Kk}YsqodEb&SEW)gwzQ`6G3uwCD(NCrUXR z!`!`PR1S8vI;g_{ literal 0 HcmV?d00001 diff --git a/docs/assets/logo.png b/docs/assets/logo.png new file mode 100755 index 0000000000000000000000000000000000000000..dce1ebc95066e56bf72c591027b7776b767a5786 GIT binary patch literal 105684 zcmeFYXIzu#7e5?}qpc{V7GvcrlBB(g;iWK&rJ z2`lWWAc25@7>4ZUqAl3xZ$JMR&x_~P?|y+K+~-{9I@kAn&$w?N+|p4!^CRnz5D4Uq zx|)(c1VY~dfgDf%{v`NDd5Xma{KJA#HpLjA5Ex%OFF52k2h?r&C3QDDN4P%R&cWZa z4K53T(0L*aO);k0TGI9?H$l6Ddj$R5Jb*L=BCFu%VQ23G$6UG%cSO3&aV=NZb6r9@ z$Z?s7X$xz6D8ikPY5`twg8&^v`v4bvDF-eE`Af2X(m;V59AkIM&&|~xE$t`A^_O00 z@cY5nLR^>rx&`AR$Mv^SrrN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001 diff --git a/docs/build.sh b/docs/build.sh new file mode 100755 index 0000000000..c532bb0d6b --- /dev/null +++ b/docs/build.sh @@ -0,0 +1,33 @@ +#!/bin/sh +set -e + +HEADERS=`ls ../AsyncDisplayKit/*.h ../AsyncDisplayKit/Details/ASRangeController.h ../AsyncDisplayKit/Layout/*.h` + +rm -rf htdocs appledoc + +jekyll build --destination htdocs + +appledoc \ + --no-create-docset \ + --create-html \ + --exit-threshold 2 \ + --no-repeat-first-par \ + --no-merge-categories \ + --explicit-crossref \ + --warn-missing-output-path \ + --warn-missing-company-id \ + --warn-undocumented-object \ + --warn-undocumented-member \ + --warn-empty-description \ + --warn-unknown-directive \ + --warn-invalid-crossref \ + --warn-missing-arg \ + --project-name AsyncDisplayKit \ + --project-company Facebook \ + --company-id "com.facebook" \ + --output appledoc \ + $HEADERS + +mv appledoc/html htdocs/appledoc + +rmdir appledoc diff --git a/docs/css/main.scss b/docs/css/main.scss new file mode 100755 index 0000000000..4417ff0713 --- /dev/null +++ b/docs/css/main.scss @@ -0,0 +1,49 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- +@charset "utf-8"; + + + +// Our variables +$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +$base-font-size: 16px; +$small-font-size: $base-font-size * 0.875; +$base-line-height: 1.5; + +$spacing-unit: 30px; + +$text-color: #111; +$background-color: #f8f8f8; +$brand-color: #21b6ff; + +$grey-color: #828282; +$grey-color-light: lighten($grey-color, 40%); +$grey-color-dark: darken($grey-color, 25%); + +$on-palm: 600px; +$on-laptop: 800px; + + + +// Using media queries with like this: +// @include media-query($palm) { +// .wrapper { +// padding-right: $spacing-unit / 2; +// padding-left: $spacing-unit / 2; +// } +// } +@mixin media-query($device) { + @media screen and (max-width: $device) { + @content; + } +} + + + +// Import partials from `sass_dir` (defaults to `_sass`) +@import + "base", + "layout", + "syntax-highlighting" +; diff --git a/docs/guide/1-introduction.md b/docs/guide/1-introduction.md new file mode 100644 index 0000000000..d923c0a215 --- /dev/null +++ b/docs/guide/1-introduction.md @@ -0,0 +1,150 @@ +--- +layout: docs +title: Getting started +permalink: /guide/ +next: guide/2/ +--- + +## Concepts + +AsyncDisplayKit's basic unit is the *node*. ASDisplayNode is an abstraction +over UIView, which in turn is an abstraction over CALayer. Unlike views, which +can only be used on the main thread, nodes are thread-safe: you can +instantiate and configure entire hierarchies of them in parallel on background +threads. + +To keep its user interface smooth and responsive, your app should render at 60 +frames per second — the gold standard on iOS. This means the main thread +has one-sixtieth of a second to push each frame. That's 16 milliseconds to +execute all layout and drawing code! And because of system overhead, your code +usually has less than ten milliseconds to run before it causes a frame drop. + +AsyncDisplayKit lets you move image decoding, text sizing and rendering, and +other expensive UI operations off the main thread. It has other tricks up its +sleeve too... but we'll get to that later. :] + +## Nodes as drop-in view replacements + +If you're used to working with views, you already know how to use nodes. The +node API is similar to UIView's, with some additional conveniences — for +example, you can access common CALayer properties directly. To add a node to +an existing view or layer hierarchy, use its `node.view` or `node.layer`. + +AsyncDisplayKit's core components include: + +* *ASDisplayNode*. Counterpart to UIView — subclass to make custom nodes. +* *ASControlNode*. Analogous to UIControl — subclass to make buttons. +* *ASImageNode*. Like UIImageView — decodes images asynchronously. +* *ASTextNode*. Like UITextView — built on TextKit with full-featured + rich text support. +* *ASTableView* and *ASCollectionView*. UITableView and UICollectionView + subclasses that support nodes. + +You can use these as drop-in replacements for their UIKit counterparts. While +ASDK works most effectively with fully node-based hierarchies, even replacing +individual views with nodes can improve performance. + +Let's look at an example. + +We'll start out by using nodes synchronously on the main thread — the +same way you already use views. This code is a familiar sight in custom view +controller `-loadView` implementations: + +```objective-c +_imageView = [[UIImageView alloc] init]; +_imageView.image = [UIImage imageNamed:@"hello"]; +_imageView.frame = CGRectMake(10.0f, 10.0f, 40.0f, 40.0f); +[self.view addSubview:_imageView]; +``` + +We can replace it with the following node-based code: + +```objective-c +_imageNode = [[ASImageNode alloc] init]; +_imageNode.backgroundColor = [UIColor lightGrayColor]; +_imageNode.image = [UIImage imageNamed:@"hello"]; +_imageNode.frame = CGRectMake(10.0f, 10.0f, 40.0f, 40.0f); +[self.view addSubview:_imageNode.view]; +``` + +This doesn't take advantage of ASDK's asynchronous sizing and layout +functionality, but it's already an improvement. The first block of code +synchronously decodes `hello.png` on the main thread; the second starts +decoding the image on a background thread, possibly on a different CPU core. + +(Note that we're setting a placeholder background colour on the node, "holding +its place" onscreen until the real content appears. This works well with +images but less so with text — people expect text to appear instantly, +with images loading in after a slight delay. We'll discuss techniques to +improve this later on.) + +## Button nodes + +ASImageNode and ASTextNode both inherit from ASControlNode, so you can use them +as buttons. Let's say we're making a music player and we want to add a +(non-skeuomorphic, iOS 7-style) shuffle button: + +[![shuffle]({{ site.baseurl }}/assets/guide/1-shuffle-crop.png)]({{ site.baseurl }}/assets/guide/1-shuffle.png) + +Our view controller will look something like this: + +```objective-c +- (void)viewDidLoad +{ + [super viewDidLoad]; + + // attribute a string + NSDictionary *attrs = @{ + NSFontAttributeName: [UIFont systemFontOfSize:12.0f], + NSForegroundColorAttributeName: [UIColor redColor], + }; + NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"shuffle" + attributes:attrs]; + + // create the node + _shuffleNode = [[ASTextNode alloc] init]; + _shuffleNode.attributedString = string; + + // configure the button + _shuffleNode.userInteractionEnabled = YES; // opt into touch handling + [_shuffleNode addTarget:self + action:@selector(buttonTapped:) + forControlEvents:ASControlNodeEventTouchUpInside]; + + // size all the things + CGRect b = self.view.bounds; // convenience + CGSize size = [_shuffleNode measure:CGSizeMake(b.size.width, FLT_MAX)]; + CGPoint origin = CGPointMake(roundf( (b.size.width - size.width) / 2.0f ), + roundf( (b.size.height - size.height) / 2.0f )); + _shuffleNode.frame = (CGRect){ origin, size }; + + // add to our view + [self.view addSubview:_shuffleNode.view]; +} + +- (void)buttonTapped:(id)sender +{ + NSLog(@"tapped!"); +} +``` + +This works as you would expect. Unfortunately, this button is only 14½ +points tall — nowhere near the standard 44×44 minimum tap target +size — and it's very difficult to tap. We could solve this by +subclassing the text node and overriding `-hitTest:withEvent:`. We could even +force the text view to have a minimum height during layout. But wouldn't it be +nice if there were a more elegant way? + +```objective-c + // size all the things + /* ... */ + + // make the tap target taller + CGFloat extendY = roundf( (44.0f - size.height) / 2.0f ); + _shuffleNode.hitTestSlop = UIEdgeInsetsMake(-extendY, 0.0f, -extendY, 0.0f); +``` + +Et voilà! *Hit-test slops* work on all nodes, and are a nice example of what +this new abstraction enables. + +Next up, making your own nodes! diff --git a/docs/guide/2-custom-nodes.md b/docs/guide/2-custom-nodes.md new file mode 100644 index 0000000000..6d67ed3a05 --- /dev/null +++ b/docs/guide/2-custom-nodes.md @@ -0,0 +1,211 @@ +--- +layout: docs +title: Custom nodes +permalink: /guide/2/ +prev: guide/ +next: guide/3/ +--- + +## View hierarchies + +Sizing and layout of custom view hierarchies are typically done all at once on +the main thread. For example, a custom UIView that minimally encloses a text +view and an image view might look like this: + +```objective-c +- (CGSize)sizeThatFits:(CGSize)size +{ + // size the image + CGSize imageSize = [_imageView sizeThatFits:size]; + + // size the text view + CGSize maxTextSize = CGSizeMake(size.width - imageSize.width, size.height); + CGSize textSize = [_textView sizeThatFits:maxTextSize]; + + // make sure everything fits + CGFloat minHeight = MAX(imageSize.height, textSize.height); + return CGSizeMake(size.width, minHeight); +} + +- (void)layoutSubviews +{ + CGSize size = self.bounds.size; // convenience + + // size and layout the image + CGSize imageSize = [_imageView sizeThatFits:size]; + _imageView.frame = CGRectMake(size.width - imageSize.width, 0.0f, + imageSize.width, imageSize.height); + + // size and layout the text view + CGSize maxTextSize = CGSizeMake(size.width - imageSize.width, size.height); + CGSize textSize = [_textView sizeThatFits:maxTextSize]; + _textView.frame = (CGRect){ CGPointZero, textSize }; +} +``` + +This isn't ideal. We're sizing our subviews twice — once to figure out +how big our view needs to be and once when laying it out — and while our +layout arithmetic is cheap and quick, we're also blocking the main thread on +expensive text sizing. + +We could improve the situation by manually cacheing our subviews' sizes, but +that solution comes with its own set of problems. Just adding `_imageSize` and +`_textSize` ivars wouldn't be enough: for example, if the text were to change, +we'd need to recompute its size. The boilerplate would quickly become +untenable. + +Further, even with a cache, we'll still be blocking the main thread on sizing +*sometimes*. We could try to shift sizing to a background thread with +`dispatch_async()`, but even if our own code is thread-safe, UIView methods are +documented to [only work on the main +thread](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html): + +> Manipulations to your application’s user interface must occur on the main +> thread. Thus, you should always call the methods of the UIView class from +> code running in the main thread of your application. The only time this may +> not be strictly necessary is when creating the view object itself but all +> other manipulations should occur on the main thread. + +This is a pretty deep rabbit hole. We could attempt to work around the fact +that UILabels and UITextViews cannot safely be sized on background threads by +manually creating a TextKit stack and sizing the text ourselves... but that's a +laborious duplication of work. Further, if UITextView's layout behaviour +changes in an iOS update, our sizing code will break. (And did we mention that +TextKit isn't thread-safe either?) + +## Node hierarchies + +Enter AsyncDisplayKit. Our custom node looks like this: + +```objective-c +#import + +... + +// perform expensive sizing operations on a background thread +- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize +{ + // size the image + CGSize imageSize = [_imageNode measure:constrainedSize]; + + // size the text node + CGSize maxTextSize = CGSizeMake(constrainedSize.width - imageSize.width, + constrainedSize.height); + CGSize textSize = [_textNode measure:maxTextSize]; + + // make sure everything fits + CGFloat minHeight = MAX(imageSize.height, textSize.height); + return CGSizeMake(constrainedSize.width, minHeight); +} + +// do as little work as possible in main-thread layout +- (void)layout +{ + // layout the image using its cached size + CGSize imageSize = _imageNode.calculatedSize; + _imageNode.frame = CGRectMake(self.bounds.size.width - imageSize.width, 0.0f, + imageSize.width, imageSize.height); + + // layout the text view using its cached size + CGSize textSize = _textNode.calculatedSize; + _textNode.frame = (CGRect){ CGPointZero, textSize }; +} +``` + +ASImageNode and ASTextNode, like the rest of AsyncDisplayKit, are thread-safe, +so we can size them on background threads. The `-measure:` method is like +`-sizeThatFits:`, but with side effects: it caches both the argument +(`constrainedSizeForCalculatedSize`) and the result (`calculatedSize`) for +quick access later on — like in our now-snappy `-layout` implementation. + +As you can see, node hierarchies are sized and laid out in much the same way as +their view counterparts. Custom nodes do need to be written with a few things +in mind: + +* Nodes must recursively measure all of their subnodes in their + `-calculateSizeThatFits:` implementations. Note that the `-measure:` + machinery will only call `-calculateSizeThatFits:` if a new measurement pass + is needed (e.g., if the constrained size has changed). + +* Nodes should perform any other expensive pre-layout calculations in + `-calculateSizeThatFits:`, cacheing useful intermediate results in ivars as + appropriate. + +* Nodes should call `[self invalidateCalculatedSize]` when necessary. For + example, ASTextNode invalidates its calculated size when its + `attributedString` property is changed. + +For more examples of custom sizing and layout, along with a demo of +ASTextNode's features, check out `BlurbNode` and `KittenNode` in the +[Kittens](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens) +sample project. + +## Custom drawing + +To guarantee thread safety in its highly-concurrent drawing system, the node +drawing API diverges substantially from UIView's. Instead of implementing +`-drawRect:`, you must: + +1. Define an internal "draw parameters" class for your custom node. This + class should be able to store any state your node needs to draw itself + — it can be a plain old NSObject or even a dictionary. + +2. Return a configured instance of your draw parameters class in + `-drawParametersForAsyncLayer:`. This method will always be called on the + main thread. + +3. Implement either `+drawRect:withParameters:isCancelled:isRasterizing:` or + `+displayWithParameters:isCancelled:`. Note that these are *class* methods + that will not have access to your node's state — only the draw + parameters object. They can be called on any thread and must be + thread-safe. + +For example, this node will draw a rainbow: + +```objective-c +@interface RainbowNode : ASDisplayNode +@end + +@implementation RainbowNode + ++ (void)drawRect:(CGRect)bounds + withParameters:(id)parameters + isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock + isRasterizing:(BOOL)isRasterizing +{ + // clear the backing store, but only if we're not rasterising into another layer + if (!isRasterizing) { + [[UIColor whiteColor] set]; + UIRectFill(bounds); + } + + // UIColor sadly lacks +indigoColor and +violetColor methods + NSArray *colors = @[ [UIColor redColor], + [UIColor orangeColor], + [UIColor yellowColor], + [UIColor greenColor], + [UIColor blueColor], + [UIColor purpleColor] ]; + CGFloat stripeHeight = roundf(bounds.size.height / (float)colors.count); + + // draw the stripes + for (UIColor *color in colors) { + CGRect stripe = CGRectZero; + CGRectDivide(bounds, &stripe, &bounds, stripeHeight, CGRectMinYEdge); + [color set]; + UIRectFill(stripe); + } +} + +@end +``` + +This could easily be extended to support vertical rainbows too, by adding a +`vertical` property to the node, exporting it in +`-drawParametersForAsyncLayer:`, and referencing it in +`+drawRect:withParameters:isCancelled:isRasterizing:`. More-complex nodes can +be supported in much the same way. + +For more on custom nodes, check out the [subclassing +header](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASDisplayNode%2BSubclasses.h) +or read on! diff --git a/docs/guide/3-asynchronous-display.md b/docs/guide/3-asynchronous-display.md new file mode 100644 index 0000000000..acc9f37911 --- /dev/null +++ b/docs/guide/3-asynchronous-display.md @@ -0,0 +1,102 @@ +--- +layout: docs +title: Asynchronous display +permalink: /guide/3/ +prev: guide/2/ +next: guide/4/ +--- + +## Realistic placeholders + +Nodes need to complete both a *measurement pass* and a *display pass* before +they're fully rendered. It's possible to force either step to happen +synchronously: call `-measure:` in `-layoutSubviews` to perform sizing on the +main thread, or set a node's `displaysAsynchronously` flag to NO to disable +ASDK's async display machinery. (AsyncDisplayKit can still improve your app's +performance even when rendering fully synchronously — more on that +later!) + +The recommended way to use ASDK is to only add nodes to your view hierarchy +once they've been sized. This avoids unsightly layout changes as the +measurement pass completes, but if you enable asynchronous display, it will +always be possible for a node to appear onscreen before its content has fully +rendered. We'll discuss techniques to minimise this shortly, but you should +take it into account and include *realistic placeholders* in your app designs. + +Once its measurement pass has completed, a node can accurately place all of its +subnodes onscreen — they'll just be blank. The easiest way to make a +realistic placeholder is to set static background colours on your subnodes. +This effect looks better than generic placeholder images because it varies +based on the content being loaded, and it works particularly well for opaque +images. You can also create visually-appealing placeholder nodes, like the +shimmery lines representing text in Paper as its stories are loaded, and swap +them out with your content nodes once they've finished displaying. + +## Working range + +So far, we've only discussed asynchronous sizing: toss a "create a node +hierarchy and measure it" block onto a background thread, then trampoline to +the main thread to add it to the view hierarchy when that's done. Ideally, as +much content as possible should be fully-rendered and ready to go as soon as +the user scrolls to it. This requires triggering display passes in advance. + +If your app's content is in a scroll view or can be paged through, like +Instagram's main feed or Paper's story strip, the solution is a *working +range*. A working range controller tracks the *visible range*, the subset of +content that's currently visible onscreen, and enqueues asynchronous rendering +for the next few screenfuls of content. As the user scrolls, a screenful or +two of previous content is preserved; the rest is cleared to conserve memory. +If she starts scrolling in the other direction, the working range trashes its +render queue and starts pre-rendering in the new direction of scroll — +and because of the buffer of previous content, this entire process will +typically be invisible. + +AsyncDisplayKit includes a generic working range controller, +`ASRangeController`. Its working range size can be tuned depending on your +app: if your nodes are simple, even an iPhone 4 can maintain a substantial +working range, but heavyweight nodes like Facebook stories are expensive and +need to be pruned quickly. + +```objective-c +ASRangeController *rangeController = [[ASRangeController alloc] init]; +rangeController.tuningParameters = (ASRangeTuningParameters){ + .leadingBufferScreenfuls = 2.0f; // two screenfuls in the direction of scroll + .trailingBufferScreenfuls = 0.5f; // one-half screenful in the other direction +}; +``` + +If you use a working range, you should profile your app and consider tuning it +differently on a per-device basis. iPhone 4 has 512MB of RAM and a single-core +A4 chipset, while iPhone 6 has 1GB of RAM and the orders-of-magnitude-faster +multicore A8 — and if your app supports iOS 7, it will be used on both. + +## ASTableView + +ASRangeController manages working ranges, but doesn't actually display content. +If your content is currently rendered in a UITableView, you can convert it to +use `ASTableView` and custom nodes — just subclass `ASCellNode` instead +of ASDisplayNode. ASTableView is a UITableView subclass that integrates +node-based cells and a working range. + +ASTableView doesn't let cells onscreen until their underlying nodes have been +sized, and as such can fully benefit from realistic placeholders. Its API is +very similar to UITableView (see the +[Kittens](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens) +sample project for an example), with some key changes: + +* Rather than setting the table view's `.delegate` and `.dataSource`, you set + its `.asyncDelegate` and `.asyncDataSource`. See + [ASTableView.h](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASTableView.h) + for how its delegate and data source protocols differ from UITableView's. + +* Instead of implementing `-tableView:cellForRowAtIndexPath:`, your data + source must implement `-tableView:nodeForRowAtIndexPath:`. This method must + be thread-safe and should not implement reuse. Unlike the UITableView + version, it won't be called when the row is about to display. + +* `-tableView:heightForRowAtIndexPath:` has been removed — ASTableView + lets your cell nodes size themselves. This means you no longer have to + manually duplicate or factor out layout and sizing logic for + dynamically-sized UITableViewCells! + +Next up, how to get the most out of ASDK in your app. diff --git a/docs/guide/4-making-the-most-of-asdk.md b/docs/guide/4-making-the-most-of-asdk.md new file mode 100644 index 0000000000..f35ad900b4 --- /dev/null +++ b/docs/guide/4-making-the-most-of-asdk.md @@ -0,0 +1,139 @@ +--- +layout: docs +title: Making the most of AsyncDisplayKit +permalink: /guide/4/ +prev: guide/3/ +next: guide/5/ +--- + +## A note on optimisation + +AsyncDisplayKit is powerful and flexible, but it is not a panacea. If your app +has a complex image- or text-heavy user interface, ASDK can definitely help +improve its performance — but if you're blocking the main thread on +network requests, you should consider rearchitecting a few things first. :] + +So why is it worthwhile to change the way we do view layout and rendering, +given that UIKit has always been locked to the main thread and performant iOS +apps have been shipping since iPhone's launch? + +### Modern animations + +Until iOS 7, static animations (à la `+[UIView +animateWithDuration:animations:]`) were the standard. The post-skeuomorphism +redesign brought with it highly-interactive, physics-based animations, with +springs joining the ranks of constant animation functions like +`UIViewAnimationOptionCurveEaseInOut`. + +Classic animations aren't actually executed in your app. They're executed +out-of-process, in the high-priority Core Animation render server. Thanks to +pre-emptive multitasking, an app can block its main thread continuously without +causing the animation to drop a single frame. + +Critically, dynamic animations can't be offloaded the same way, and both +[pop](https://github.com/facebook/pop) and UIKit Dynamics execute physics +simulations on your app's main thread. This is because executing arbitrary +code in the render server would introduce unacceptable latency, even if it +could be done securely. + +Physics-based animations are often interactive, letting you start an animation +and interrupt it before it completes. Paper lets you fling objects across the +screen and catch them before they land, or grab a view that's being pulled by a +spring and tear it off. This requires processing touch events and updating +animation targets in realtime — even short delays for inter-process +communication would shatter the illusion. + +(Fun fact: Inertial scrolling is also a physics animation! UIScrollView has +always implemented its animations on the main thread, which is why stuttery +scrolling is the hallmark of a slow app.) + +### The main-thread bottleneck + +Physics animations aren't the only thing that need to happen on the main +thread. The main thread's [run +loop](https://developer.apple.com/library/ios/documentation/cocoa/conceptual/multithreading/runloopmanagement/runloopmanagement.html) +is responsible for handling touch events and initiating drawing operations +— and with UIKit in the mix, it also has to render text, decode images, +and do any other custom drawing (e.g., using Core Graphics). + +If an iteration of the main thread's run loop takes too long, it will drop an +animation frame and may fail to handle touch events in time. Each iteration of +the run loop must complete within 16ms in order to drive 60fps animations, and +your own code typically has less than 10ms to execute. This means that the +best way to keep your app smooth and responsive is to do as little work on the +main thread as possible. + +What's more, the main thread only executes on one core! Single-threaded view +hierarchies can't take advantage of the multicore CPUs in all modern iOS +devices. This is important for more than just performance reasons — it's +also critical for battery life. Running the CPU on all cores for a short time +is preferable to running one core for an extended amount of time: if the +processor can *race to sleep* by finishing its work and idling faster, it can +spend more time in a low-power mode, improving battery life. + +## When to go asynchronous + +AsyncDisplayKit really shines when used fully asynchronously, shifting both +measurement and rendering passes off the main thread and onto multiple cores. +This requires a completely node-based hierarchy. Just as degrading from +UIViews to CALayers disables view-specific functionality like touch handling +from that point on, degrading from nodes to views disables async behaviour. + +You don't, however, need to convert your app's entire view hierarchy to nodes. +In fact, you shouldn't! Asynchronously bringing up your app's core UI, like +navigation elements or tab bars, would be a very confusing experience. Those +elements of your apps can still be nodes, but should be fully synchronous to +guarantee a fully-usable interface as quickly as possible. (This is why +UIWindow has no node equivalent.) + +There are two key situations where asynchronous hierarchies excel: + +1. *Parallelisation*. Measuring and rendering UITableViewCells (or your app's + equivalent, e.g., story cards in Paper) are embarrassingly parallel + problems. Table cells typically have a fixed width and variable height + determined by their contents — the argument to `-measure:` for one + cell doesn't depend on any other cells' calculations, so we can enqueue an + arbitrary number of cell measurement passes at once. + +2. *Preloading*. An app with five tabs should synchronously load the first + one so content is ready to go as quickly as possible. Once this is + complete and the CPU is idle, why not asynchronously prepare the other tabs + so the user doesn't have to wait? This is inconvenient with views, but + very easy with nodes. + +Paper's asynchronous rendering starts at the story strip. You should profile +your app and watch how people use it in the wild to decide what combination of +synchrony and asynchrony yields the best user experience. + +## Additional optimisations + +Complex hierarchies — even when rendered asynchronously — can +impose a cost because of the sheer number of views involved. Working around +this can be painful, but AsyncDisplayKit makes it easy! + +* *Layer-backing*. In some cases, you can substantially improve your app's + performance by using layers instead of views. Manually converting + view-based code to layers is laborious due to the difference in APIs. + Worse, if at some point you need to enable touch handling or other + view-specific functionality, you have to manually convert everything back + (and risk regressions!). + + With nodes, converting an entire subtree from views to layers is as simple + as... + + rootNode.layerBacked = YES; + + ...and if you need to go back, it's as simple as deleting one line. We + recommend enabling layer-backing as a matter of course in any custom node + that doesn't need touch handling. + +* *Precompositing*. Flattening an entire view hierarchy into a single layer + also improves performance, but comes with a hit to maintainability and + hierarchy-based reasoning. Nodes can do this for you too! + + rootNode.shouldRasterizeDescendants = YES; + + ...will cause the entire node hierarchy from that point on to be rendered + into one layer. + +Next up: AsyncDisplayKit, under the hood. diff --git a/docs/guide/5-under-the-hood.md b/docs/guide/5-under-the-hood.md new file mode 100644 index 0000000000..01229ec3ff --- /dev/null +++ b/docs/guide/5-under-the-hood.md @@ -0,0 +1,89 @@ +--- +layout: docs +title: Under the hood +permalink: /guide/5/ +prev: guide/4/ +--- + +## Node architecture + +*(Skip to the next section if you're not interested in AsyncDisplayKit implementation details.)* + +We've described nodes as an abstraction over views and layers, and shown how to +interact with the underlying UIViews and CALayers when necessary. Nodes don't +wrap or vend their UIKit counterparts, though — an ASImageNode's `.view` +is not a UIImageView! So how do nodes work? + +**NOTE:** Classes whose names begin with `_` are private. Don't use them +directly! + +Creating a node doesn't create its underlying view-layer pair. This is why you +can create nodes cheaply and on background threads. When you use a UIView or +CALayer property on a node, you're actually interacting with a proxy object, +[`_ASPendingState`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Private/_ASPendingState.h), +that's preconfigured to match UIView and CALayer defaults. + +The first access to a node's `.view` or `.layer` property causes both to be +initialised and configured with the node's current state. If it has subnodes, +they are recursively loaded as well. Once a node has been loaded, the proxy +object is destroyed and the node becomes main-thread-affined — its +properties will update the underlying view directly. (Layer-backed nodes do +the same, not loading views.) + +Nodes are powered by +[`_ASDisplayLayer`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/_ASDisplayLayer.h) +and +[`_ASDisplayView`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/_ASDisplayView.h). +These are lightweight to create and add to their respective hierarchies, and +provide integration points that allow nodes to act as full-fledged views or +layers. It's possible to create nodes that are backed by custom view or layer +classes, but doing so is strongly discouraged as it disables the majority of +ASDK's functionality. + +When Core Animation asks an `_ASDisplayLayer` to draw itself, the request is +forwarded to its node. Unless asynchronous display has been disabled, the +actual draw call won't happen immediately or on the main thread. Instead, a +display block will be added to a background queue. These blocks are executed +in parallel, but you can enable `ASDISPLAYNODE_DELAY_DISPLAY` in +[`ASDisplayNode(AsyncDisplay)`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Private/ASDisplayNode%2BAsyncDisplay.mm) +to serialise the render system for debugging. + +Common UIView subclass hooks are forwarded from `_ASDisplayView` to its +underlying node, including touch handling, hit-testing, and gesture recogniser +delegate calls. Because an `_ASDisplayView`'s layer is an `_ASDisplayLayer`, +view-backed nodes also participate in asynchronous display. + +## In practice + +What does this mean for your custom nodes? + +You can implement methods like `-touchesBegan:withEvent:` / +`touchesMoved:withEvent:` / `touchesEnded:withEvent:` / +`touchesCancelled:withEvent:` in your nodes exactly as you would in a UIView +subclass. If you find you need a subclass hook that hasn't already been +provided, please file an issue on GitHub — or add it yourself and submit a +pull request! + +If you need to interact or configure your node's underlying view or layer, +don't do so in `-init`. Instead, override `-didLoad` and check if you're +layer-backed: + +```objective-c +- (void)didLoad +{ + [super didLoad]; + + // add a gesture recogniser, if we have a view to add it to + if (!self.layerBacked) { + _gestureRecogniser = [[UITapGestureRecognizer alloc] initWithTarget:self + action:@selector(_tap:)]; + [self.view addGestureRecognizer:_gestureRecogniser]; + } +} +``` + +## *fin.* + +Thanks for reading! If you have any questions, please file a GitHub issue or +post in the [Facebook group](https://www.facebook.com/groups/551597518288687). +We'd love to hear from you. diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000000..ff8065921a --- /dev/null +++ b/docs/index.md @@ -0,0 +1,86 @@ +--- +layout: page +title: Smooth asynchronous user interfaces for iOS apps +--- + +![logo]({{ site.baseurl }}/assets/logo.png) + +AsyncDisplayKit is an iOS framework that keeps even the most complex user +interfaces smooth and responsive. It was originally built to make Facebook's +[Paper](https://facebook.com/paper) possible, and goes hand-in-hand with +[pop](https://github.com/facebook/pop)'s physics-based animations — but +it's just as powerful with UIKit Dynamics and conventional app designs. + + +
+### Quick start + +ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: + +```ruby +pod 'AsyncDisplayKit' +``` + +(ASDK can also be used as a regular static library: Copy the project to your +codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace. Add +`libAsyncDisplayKit.a`, AssetsLibrary, and Photos to the "Link Binary With +Libraries" build phase. Include `-lc++ -ObjC` in your project linker flags.) + +Import the framework header, or create an [Objective-C bridging +header](https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/MixandMatch.html) +if you're using Swift: + +```objective-c +#import +``` + +AsyncDisplayKit Nodes are a thread-safe abstraction layer over UIViews and +CALayers: + +![logo]({{ site.baseurl }}/assets/node-view-layer.png) + +You can construct entire node hierarchies in parallel, or instantiate and size +a single node on a background thread — for example, you could do +something like this in a UIViewController: + +```objective-c +dispatch_async(_backgroundQueue, ^{ + ASTextNode *node = [[ASTextNode alloc] init]; + node.attributedString = [[NSAttributedString alloc] initWithString:@"hello!" + attributes:nil]; + [node measure:CGSizeMake(screenWidth, FLT_MAX)]; + node.frame = (CGRect){ CGPointZero, node.calculatedSize }; + + // self.view isn't a node, so we can only use it on the main thread + dispatch_async(dispatch_get_main_queue(), ^{ + [self.view addSubview:node.view]; + }); +}); +``` + +AsyncDisplayKit at a glance: + +* `ASImageNode` and `ASTextNode` are drop-in replacements for UIImageView and + UITextView. +* `ASMultiplexImageNode` can load and display progressively higher-quality + variants of an image over a slow cell network, letting you quickly show a + low-resolution photo while the full size downloads. +* `ASNetworkImageNode` is a simpler, single-image counterpart to the Multiplex + node. +* `ASTableView` and `ASCollectionView` are a node-aware UITableView and + UICollectionView, respectively, that can asynchronously preload cell nodes + — from loading network data to rendering — all without blocking + the main thread. + +You can also easily [create your own +nodes](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASDisplayNode%2BSubclasses.h) +to implement node hierarchies or custom drawing. + + +
+### Learn more + +* Read the [Getting Started guide]({{ site.baseurl }}/guide) +* Get the [sample projects](https://github.com/facebook/AsyncDisplayKit/tree/master/examples) +* Browse the [API reference]({{ site.baseurl }}/appledoc) +* Watch the [NSLondon talk](http://vimeo.com/103589245) or the [NSSpain talk](https://www.youtube.com/watch?v=RY_X7l1g79Q) From 56a534349604621383eab9b62b8d84d86bf89514 Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Mon, 27 Jun 2016 11:29:28 +1000 Subject: [PATCH 026/247] Collect subnodes passing the test, not the node with the subnodes passing the test. --- AsyncDisplayKit/ASDisplayNodeExtras.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASDisplayNodeExtras.mm b/AsyncDisplayKit/ASDisplayNodeExtras.mm index 46eb46daaf..d9601ba9d6 100644 --- a/AsyncDisplayKit/ASDisplayNodeExtras.mm +++ b/AsyncDisplayKit/ASDisplayNodeExtras.mm @@ -144,7 +144,7 @@ static void _ASDisplayNodeFindAllSubnodes(NSMutableArray *array, ASDisplayNode * for (ASDisplayNode *subnode in node.subnodes) { if (block(subnode)) { - [array addObject:node]; + [array addObject:subnode]; } _ASDisplayNodeFindAllSubnodes(array, subnode, block); From cc74fb0cdcdc46daa98ae734d85a92c083b3cf09 Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Mon, 27 Jun 2016 12:53:33 +1000 Subject: [PATCH 027/247] Prove the change gets the correct nodes with a pair of tests. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 4 + .../ASDisplayNodeExtrasTests.m | 76 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 AsyncDisplayKitTests/ASDisplayNodeExtrasTests.m diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 62c3baffc7..99ed51bbd8 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -596,6 +596,7 @@ E5711A2C1C840C81009619D4 /* ASIndexedNodeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = E5711A2A1C840C81009619D4 /* ASIndexedNodeContext.h */; }; E5711A2E1C840C96009619D4 /* ASIndexedNodeContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.mm */; }; E5711A301C840C96009619D4 /* ASIndexedNodeContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.mm */; }; + F711994E1D20C21100568860 /* ASDisplayNodeExtrasTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F711994D1D20C21100568860 /* ASDisplayNodeExtrasTests.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -965,6 +966,7 @@ E5711A2A1C840C81009619D4 /* ASIndexedNodeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIndexedNodeContext.h; sourceTree = ""; }; E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASIndexedNodeContext.mm; sourceTree = ""; }; EFA731F0396842FF8AB635EE /* libPods-AsyncDisplayKitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AsyncDisplayKitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + F711994D1D20C21100568860 /* ASDisplayNodeExtrasTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASDisplayNodeExtrasTests.m; sourceTree = ""; }; FB07EABBCF28656C6297BC2D /* Pods-AsyncDisplayKitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AsyncDisplayKitTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -1210,6 +1212,7 @@ 058D0A36195D057000B7D73C /* ASTextNodeTests.m */, 058D0A37195D057000B7D73C /* ASTextNodeWordKernerTests.mm */, AEEC47E31C21D3D200EC1693 /* ASVideoNodeTests.m */, + F711994D1D20C21100568860 /* ASDisplayNodeExtrasTests.m */, 058D09C6195D04C000B7D73C /* Supporting Files */, 052EE06A1A15A0D8002C6279 /* TestResources */, 2538B6F21BC5D2A2003CA0B4 /* ASCollectionViewFlowLayoutInspectorTests.m */, @@ -2169,6 +2172,7 @@ 9F06E5CD1B4CAF4200F015D8 /* ASCollectionViewTests.m in Sources */, 2911485C1A77147A005D0878 /* ASControlNodeTests.m in Sources */, CC3B208E1C3F7D0A00798563 /* ASWeakSetTests.m in Sources */, + F711994E1D20C21100568860 /* ASDisplayNodeExtrasTests.m in Sources */, ACF6ED5D1B178DC700DA7C62 /* ASDimensionTests.mm in Sources */, 058D0A38195D057000B7D73C /* ASDisplayLayerTests.m in Sources */, 2538B6F31BC5D2A2003CA0B4 /* ASCollectionViewFlowLayoutInspectorTests.m in Sources */, diff --git a/AsyncDisplayKitTests/ASDisplayNodeExtrasTests.m b/AsyncDisplayKitTests/ASDisplayNodeExtrasTests.m new file mode 100644 index 0000000000..6f1731d211 --- /dev/null +++ b/AsyncDisplayKitTests/ASDisplayNodeExtrasTests.m @@ -0,0 +1,76 @@ +// +// ASDisplayNodeExtrasTests.m +// AsyncDisplayKit +// +// Created by Kiel Gillard on 27/06/2016. +// Copyright © 2016 Facebook. All rights reserved. +// + +#import +#import +#import + +@interface ASDisplayNodeExtrasTests : XCTestCase + +@end + +@interface TestDisplayNode : ASDisplayNode +@end + +@implementation TestDisplayNode +@end + +@implementation ASDisplayNodeExtrasTests + +- (void)testShallowFindSubnodesOfSubclass { + ASDisplayNode *supernode = [[ASDisplayNode alloc] initWithLayerBlock:^CALayer * _Nonnull{ + return [CALayer layer]; + }]; + NSUInteger count = 10; + NSMutableArray *expected = [[NSMutableArray alloc] initWithCapacity:count]; + for (NSUInteger nodeIndex = 0; nodeIndex < count; nodeIndex++) { + TestDisplayNode *node = [[TestDisplayNode alloc] initWithLayerBlock:^CALayer * _Nonnull{ + return [CALayer layer]; + }]; + [supernode addSubnode:node]; + [expected addObject:node]; + } + NSArray *found = ASDisplayNodeFindAllSubnodesOfClass(supernode, [TestDisplayNode class]); + XCTAssertEqualObjects(found, expected, @"Expecting %lu %@ nodes, found %lu", (unsigned long)count, [TestDisplayNode class], (unsigned long)found.count); +} + +- (void)testDeepFindSubnodesOfSubclass { + ASDisplayNode *supernode = [[ASDisplayNode alloc] initWithLayerBlock:^CALayer * _Nonnull{ + return [CALayer layer]; + }]; + + const NSUInteger count = 2; + const NSUInteger levels = 2; + const NSUInteger capacity = [[self class] capacityForCount:count levels:levels]; + NSMutableArray *expected = [[NSMutableArray alloc] initWithCapacity:capacity]; + + [[self class] addSubnodesToNode:supernode number:count remainingLevels:levels accumulated:expected]; + + NSArray *found = ASDisplayNodeFindAllSubnodesOfClass(supernode, [TestDisplayNode class]); + XCTAssertEqualObjects(found, expected, @"Expecting %lu %@ nodes, found %lu", (unsigned long)count, [TestDisplayNode class], (unsigned long)found.count); +} + ++ (void)addSubnodesToNode:(ASDisplayNode *)supernode number:(NSUInteger)number remainingLevels:(NSUInteger)level accumulated:(inout NSMutableArray *)expected { + if (level == 0) return; + for (NSUInteger nodeIndex = 0; nodeIndex < number; nodeIndex++) { + TestDisplayNode *node = [[TestDisplayNode alloc] initWithLayerBlock:^CALayer * _Nonnull{ + return [CALayer layer]; + }]; + [supernode addSubnode:node]; + [expected addObject:node]; + [self addSubnodesToNode:node number:number remainingLevels:(level - 1) accumulated:expected]; + } +} + +// Graph theory is failing me atm. ++ (NSUInteger)capacityForCount:(NSUInteger)count levels:(NSUInteger)level { + if (level == 0) return 0; + return pow(count, level) + [self capacityForCount:count levels:(level - 1)]; +} + +@end From db04f4b851a069794a77ab45115db669b87b1683 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 26 Jun 2016 23:09:53 -0700 Subject: [PATCH 028/247] [ASTableView] Add constrainedSizeForRowAtIndexPath: to control row heights from delegate (#1769) * [ASTableView] constrainedSizeForRowAtIndexPath * Quick fix to header file * Switch to Delegate from DataSource. * Update testing variables to reflect switch to delegate --- AsyncDisplayKit/ASTableView.h | 12 ++++++++ AsyncDisplayKit/ASTableView.mm | 17 ++++++++-- AsyncDisplayKitTests/ASTableViewTests.m | 41 ++++++++++++++++++++++++- 3 files changed, 67 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASTableView.h b/AsyncDisplayKit/ASTableView.h index 7d36cc3d4d..06ce862606 100644 --- a/AsyncDisplayKit/ASTableView.h +++ b/AsyncDisplayKit/ASTableView.h @@ -433,6 +433,18 @@ NS_ASSUME_NONNULL_BEGIN */ - (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView; +/** + * Provides the constrained size range for measuring the row at the index path. + * Note: the widths in the returned size range are ignored! + * + * @param tableView The sender. + * + * @param indexPath The index path of the node. + * + * @returns A constrained size range for layout the node at this index path. + */ +- (ASSizeRange)tableView:(ASTableView *)tableView constrainedSizeForRowAtIndexPath:(NSIndexPath *)indexPath; + /** * Informs the delegate that the table view did remove the node which was previously * at the given index path from the view hierarchy. diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index c978bb9e5e..f3f3177a9e 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -28,6 +28,7 @@ #import +static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; //#define LOG(...) NSLog(__VA_ARGS__) @@ -125,6 +126,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; unsigned int asyncDelegateScrollViewWillEndDraggingWithVelocityTargetContentOffset:1; unsigned int asyncDelegateTableViewWillBeginBatchFetchWithContext:1; unsigned int asyncDelegateShouldBatchFetchForTableView:1; + unsigned int asyncDelegateTableViewConstrainedSizeForRowAtIndexPath:1; } _asyncDelegateFlags; struct { @@ -316,6 +318,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; _asyncDelegateFlags.asyncDelegateShouldBatchFetchForTableView = [_asyncDelegate respondsToSelector:@selector(shouldBatchFetchForTableView:)]; _asyncDelegateFlags.asyncDelegateScrollViewWillBeginDragging = [_asyncDelegate respondsToSelector:@selector(scrollViewWillBeginDragging:)]; _asyncDelegateFlags.asyncDelegateScrollViewDidEndDragging = [_asyncDelegate respondsToSelector:@selector(scrollViewDidEndDragging:willDecelerate:)]; + _asyncDelegateFlags.asyncDelegateTableViewConstrainedSizeForRowAtIndexPath = [_asyncDelegate respondsToSelector:@selector(tableView:constrainedSizeForRowAtIndexPath:)]; + } super.delegate = (id)_proxyDelegate; @@ -1069,8 +1073,17 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (ASSizeRange)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - return ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, 0), - CGSizeMake(_nodesConstrainedWidth, FLT_MAX)); + ASSizeRange constrainedSize = kInvalidSizeRange; + if (_asyncDelegateFlags.asyncDelegateTableViewConstrainedSizeForRowAtIndexPath) { + ASSizeRange delegateConstrainedSize = [_asyncDelegate tableView:self constrainedSizeForRowAtIndexPath:indexPath]; + // ignore widths in the returned size range (for TableView) + constrainedSize = ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, delegateConstrainedSize.min.height), + CGSizeMake(_nodesConstrainedWidth, delegateConstrainedSize.max.height)); + } else { + constrainedSize = ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, 0), + CGSizeMake(_nodesConstrainedWidth, FLT_MAX)); + } + return constrainedSize; } - (NSUInteger)dataController:(ASDataController *)dataController rowsInSection:(NSUInteger)section diff --git a/AsyncDisplayKitTests/ASTableViewTests.m b/AsyncDisplayKitTests/ASTableViewTests.m index 7cb13fb8ca..98914d1bd4 100644 --- a/AsyncDisplayKitTests/ASTableViewTests.m +++ b/AsyncDisplayKitTests/ASTableViewTests.m @@ -128,7 +128,6 @@ return textCellNode; } - - (ASCellNodeBlock)tableView:(ASTableView *)tableView nodeBlockForRowAtIndexPath:(NSIndexPath *)indexPath { return ^{ @@ -140,12 +139,52 @@ @end +@interface ASTableViewFilledDelegate : NSObject +@end + +@implementation ASTableViewFilledDelegate + +- (ASSizeRange)tableView:(ASTableView *)tableView constrainedSizeForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return ASSizeRangeMakeExactSize(CGSizeMake(10, 42)); +} + +@end + @interface ASTableViewTests : XCTestCase @property (atomic, retain) ASTableView *testTableView; @end @implementation ASTableViewTests +- (void)testConstrainedSizeForRowAtIndexPath +{ + // Initial width of the table view is non-zero and all nodes are measured with this size. + // Any subsequence size change must trigger a relayout. + // Width and height are swapped so that a later size change will simulate a rotation + ASTestTableView *tableView = [[ASTestTableView alloc] __initWithFrame:CGRectMake(0, 0, 100, 400) + style:UITableViewStylePlain]; + + ASTableViewFilledDelegate *delegate = [ASTableViewFilledDelegate new]; + ASTableViewFilledDataSource *dataSource = [ASTableViewFilledDataSource new]; + + tableView.asyncDelegate = delegate; + tableView.asyncDataSource = dataSource; + + [tableView reloadDataImmediately]; + [tableView setNeedsLayout]; + [tableView layoutIfNeeded]; + + for (int section = 0; section < NumberOfSections; section++) { + for (int row = 0; row < NumberOfRowsPerSection; row++) { + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section]; + CGRect rect = [tableView rectForRowAtIndexPath:indexPath]; + XCTAssertEqual(rect.size.width, 100); // specified width should be ignored for table + XCTAssertEqual(rect.size.height, 42); + } + } +} + // TODO: Convert this to ARC. - (void)DISABLED_testTableViewDoesNotRetainItselfAndDelegate { From d55621c285480131045de2a87fc3fe39fd3d4412 Mon Sep 17 00:00:00 2001 From: Gareth Reese Date: Mon, 27 Jun 2016 14:07:00 +0100 Subject: [PATCH 029/247] [ASCollectionView] Tuning parameters not set --- AsyncDisplayKit/ASCollectionView.mm | 8 ++-- AsyncDisplayKitTests/ASCollectionViewTests.m | 41 ++++++++++++++++++++ 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 68031f464a..521cfde856 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -411,22 +411,22 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType { - [_collectionNode setTuningParameters:tuningParameters forRangeType:rangeType]; + [_rangeController setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType { - return [_collectionNode tuningParametersForRangeType:rangeType]; + return [_rangeController tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; } - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - [_collectionNode setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; + [_rangeController setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - return [_collectionNode tuningParametersForRangeMode:rangeMode rangeType:rangeType]; + return [_rangeController tuningParametersForRangeMode:rangeMode rangeType:rangeType]; } - (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 4c7f84aec3..2ed3584149 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -134,4 +134,45 @@ [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]; } +- (void)testTuningParametersWithExplicitRangeMode +{ + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + + ASRangeTuningParameters minimumRenderParams = { .leadingBufferScreenfuls = 0.1, .trailingBufferScreenfuls = 0.1 }; + ASRangeTuningParameters minimumPreloadParams = { .leadingBufferScreenfuls = 0.1, .trailingBufferScreenfuls = 0.1 }; + ASRangeTuningParameters fullRenderParams = { .leadingBufferScreenfuls = 0.5, .trailingBufferScreenfuls = 0.5 }; + ASRangeTuningParameters fullPreloadParams = { .leadingBufferScreenfuls = 1, .trailingBufferScreenfuls = 0.5 }; + + [collectionView setTuningParameters:minimumRenderParams forRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeDisplay]; + [collectionView setTuningParameters:minimumPreloadParams forRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeFetchData]; + [collectionView setTuningParameters:fullRenderParams forRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeDisplay]; + [collectionView setTuningParameters:fullPreloadParams forRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeFetchData]; + + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(minimumRenderParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeDisplay])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(minimumPreloadParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeFetchData])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(fullRenderParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeDisplay])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(fullPreloadParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeFetchData])); +} + +- (void)testTuningParameters +{ + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + + ASRangeTuningParameters renderParams = { .leadingBufferScreenfuls = 1.2, .trailingBufferScreenfuls = 3.2 }; + ASRangeTuningParameters preloadParams = { .leadingBufferScreenfuls = 4.3, .trailingBufferScreenfuls = 2.3 }; + + [collectionView setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeDisplay]; + [collectionView setTuningParameters:preloadParams forRangeType:ASLayoutRangeTypeFetchData]; + + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(renderParams, [collectionView tuningParametersForRangeType:ASLayoutRangeTypeDisplay])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(preloadParams, [collectionView tuningParametersForRangeType:ASLayoutRangeTypeFetchData])); +} + + @end From 4091d700032d13eb674d5d946af780b411718b40 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 27 Jun 2016 06:38:42 -0700 Subject: [PATCH 030/247] Add `conformsToProtocol:` to ASDelegateProxy --- AsyncDisplayKit/Details/ASDelegateProxy.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/AsyncDisplayKit/Details/ASDelegateProxy.m b/AsyncDisplayKit/Details/ASDelegateProxy.m index b1f3310736..13c0d211c9 100644 --- a/AsyncDisplayKit/Details/ASDelegateProxy.m +++ b/AsyncDisplayKit/Details/ASDelegateProxy.m @@ -118,6 +118,15 @@ return self; } +- (BOOL)conformsToProtocol:(Protocol *)aProtocol +{ + if (_target) { + return [_target conformsToProtocol:aProtocol]; + } else { + return [super conformsToProtocol:aProtocol]; + } +} + - (BOOL)respondsToSelector:(SEL)aSelector { if ([self interceptsSelector:aSelector]) { From d69dd880a5c03fea46cfd692c1067eeeac3c672e Mon Sep 17 00:00:00 2001 From: Colin McArdell and Robin Chou Date: Mon, 20 Jun 2016 18:24:07 -0400 Subject: [PATCH 031/247] Exposing `supplementaryNodeOfKind:atIndexPath:` in the `ASCollectionView` interface. --- AsyncDisplayKit/ASCollectionView.h | 2 ++ AsyncDisplayKit/ASCollectionView.mm | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index 9b7fe864b5..015f2cd3b3 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -282,6 +282,8 @@ NS_ASSUME_NONNULL_BEGIN */ - (ASCellNode *)nodeForItemAtIndexPath:(NSIndexPath *)indexPath; +- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; + /** * Similar to -indexPathForCell:. * diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 68031f464a..0ea30e853a 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -444,6 +444,11 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; return [_dataController nodeAtIndexPath:indexPath]; } +- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath +{ + return [_dataController supplementaryNodeOfKind:kind atIndexPath:indexPath]; +} + - (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode { return [_dataController indexPathForNode:cellNode]; From 488ded2fe88212eac9cb57ed9d3c9eb35e5f3822 Mon Sep 17 00:00:00 2001 From: Colin McArdell and Robin Chou Date: Mon, 20 Jun 2016 18:25:30 -0400 Subject: [PATCH 032/247] `ASCollectionDataController`s `supplementaryNodeOfKind:atIndexPath:` now returns `nil` instead of an assertion if the supplementary node of kind doesn't exist within `completedNodesOfKind` --- AsyncDisplayKit/Details/ASCollectionDataController.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index b54583c2a2..fea9981724 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -305,8 +305,7 @@ return nodesOfKindInSection[itemIndex]; } } - ASDisplayNodeAssert(NO, @"Supplementary node should exist. Kind = %@, indexPath = %@, collectionDataSource = %@", kind, indexPath, self.collectionDataSource); - return [[ASCellNode alloc] init]; + return nil; } #pragma mark - Private Helpers From 1c103333f792b75173146d18bdd674b1c1883c4c Mon Sep 17 00:00:00 2001 From: Colin McArdell and Robin Chou Date: Tue, 21 Jun 2016 10:27:59 -0400 Subject: [PATCH 033/247] `ASCollectionView` docs for `-supplementaryNodeOfKind:atIndexPath:` + nullability. Also, nullability for `-nodeForItemAtIndexPath:` --- AsyncDisplayKit/ASCollectionView.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index 015f2cd3b3..519705fc97 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -278,11 +278,19 @@ NS_ASSUME_NONNULL_BEGIN * * @param indexPath The index path of the requested node. * - * @returns a node for display at this indexpath. + * @returns a node for display at this indexpath or nil */ -- (ASCellNode *)nodeForItemAtIndexPath:(NSIndexPath *)indexPath; +- (nullable ASCellNode *)nodeForItemAtIndexPath:(NSIndexPath *)indexPath; -- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; + +/** + * Similar to -collectionView:viewForSupplementaryElementOfKind:atIndexPath:. + * + * @param indexPath The index path of the requested supplementary node. + * + * @returns a supplementary node for display at this indexpath or nil + */ +- (nullable ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; /** * Similar to -indexPathForCell:. From 9c130185685c65ebacad7156b147b8e98c62c41f Mon Sep 17 00:00:00 2001 From: Colin McArdell and Robin Chou Date: Wed, 22 Jun 2016 15:41:24 -0400 Subject: [PATCH 034/247] Updates exposed method signature and docs for what is now `-supplementaryNodeForElementKind:atIndexPath:` on `ASCollectionView`. Assert non-nil for usage of `ASCollectionDataController`s `-supplementaryNodeOfKind:atIndexPath:` within `ASCollectionView` --- AsyncDisplayKit/ASCollectionView.h | 7 ++++--- AsyncDisplayKit/ASCollectionView.mm | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index 519705fc97..dd9db56bc3 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -284,13 +284,14 @@ NS_ASSUME_NONNULL_BEGIN /** - * Similar to -collectionView:viewForSupplementaryElementOfKind:atIndexPath:. + * Similar to -supplementaryViewForElementKind:atIndexPath: * + * @param elementKind The kind of supplementary node to locate. * @param indexPath The index path of the requested supplementary node. * - * @returns a supplementary node for display at this indexpath or nil + * @returns The specified supplementary node or nil */ -- (nullable ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; +- (nullable ASCellNode *)supplementaryNodeForElementKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath; /** * Similar to -indexPathForCell:. diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 0ea30e853a..74c51e614a 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -444,9 +444,9 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; return [_dataController nodeAtIndexPath:indexPath]; } -- (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath +- (ASCellNode *)supplementaryNodeForElementKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath { - return [_dataController supplementaryNodeOfKind:kind atIndexPath:indexPath]; + return [_dataController supplementaryNodeOfKind:elementKind atIndexPath:indexPath]; } - (NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode @@ -577,6 +577,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; NSString *identifier = [self __reuseIdentifierForKind:kind]; UICollectionReusableView *view = [self dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:identifier forIndexPath:indexPath]; ASCellNode *node = [_dataController supplementaryNodeOfKind:kind atIndexPath:indexPath]; + ASDisplayNodeAssert(node != nil, @"Supplementary node should exist. Kind = %@, indexPath = %@, collectionDataSource = %@", kind, indexPath, self); [_rangeController configureContentView:view forCellNode:node]; return view; } From f7fa90aafdf7a14425c75b971671925caa89331c Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 27 Jun 2016 10:21:52 -0700 Subject: [PATCH 035/247] [Project] Publicize ASPINRemoteImageDownloader.h --- AsyncDisplayKit.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 62c3baffc7..9a58257452 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -256,9 +256,9 @@ 68355B3A1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; 68355B3B1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B3C1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; - 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; }; + 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B3E1CB57A60001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; - 68355B3F1CB57A64001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; }; + 68355B3F1CB57A64001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B401CB57A69001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; 68355B411CB57A6C001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68AF37DB1CBEF4D80077BF76 /* ASImageNode+AnimatedImagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */; }; From 20edc81f55f70357f8be7896ce72ce6442451e66 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 27 Jun 2016 11:19:32 -0700 Subject: [PATCH 036/247] Update build.sh file Adding MODE = "examples" will allow Kosta to speed up internal ASDK build. --- build.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/build.sh b/build.sh index 02a2ddb4ab..e6f1f0566f 100755 --- a/build.sh +++ b/build.sh @@ -36,6 +36,46 @@ if [ "$MODE" = "tests" ]; then exit 0 fi +if [ "$MODE" = "examples" ]; then + echo "Verifying that all AsyncDisplayKit examples compile." + + for example in examples/*/; do + echo "Building (examples) $example." + + if [ -f "${example}/Podfile" ]; then + echo "Using CocoaPods" + pod install --project-directory=$example + + set -o pipefail && xcodebuild \ + -workspace "${example}/Sample.xcworkspace" \ + -scheme Sample \ + -sdk "$SDK" \ + -destination "$PLATFORM" \ + -derivedDataPath ~/ \ + build | xcpretty $FORMATTER + elif [ -f "${example}/Cartfile" ]; then + echo "Using Carthage" + local_repo=`pwd` + current_branch=`git rev-parse --abbrev-ref HEAD` + cd $example + + echo "git \"file://${local_repo}\" \"${current_branch}\"" > "Cartfile" + carthage update --platform iOS + + set -o pipefail && xcodebuild \ + -project "Sample.xcodeproj" \ + -scheme Sample \ + -sdk "$SDK" \ + -destination "$PLATFORM" \ + build | xcpretty $FORMATTER + + cd ../.. + fi + done + trap - EXIT + exit 0 +fi + if [ "$MODE" = "examples-pt1" ]; then echo "Verifying that all AsyncDisplayKit examples compile." From e0fc55e25f566e1e594dd8b5f8548a0b651e7d83 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 27 Jun 2016 16:57:08 -0700 Subject: [PATCH 037/247] Jenkins build test Adding a space to test jenkins build hooks. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 10f28e5005..69808652ab 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to yo ```ruby pod 'AsyncDisplayKit' ``` - + (ASDK can also be used as a regular static library: Copy the project to your codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace. Add `libAsyncDisplayKit.a`, MapKit, AssetsLibrary, and Photos to the "Link Binary With From c10497ed99d7e813249389d388e053fc1d4ab5b1 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 27 Jun 2016 17:07:53 -0700 Subject: [PATCH 038/247] Jenkins build test 2 Added a space to trigger a Jenkins build. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 69808652ab..f0ffdee12f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-59C939.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/facebook/AsyncDisplayKit.svg)](https://travis-ci.org/facebook/AsyncDisplayKit) [![License](https://img.shields.io/cocoapods/l/AsyncDisplayKit.svg)](https://github.com/facebook/AsyncDisplayKit/blob/master/LICENSE) - + AsyncDisplayKit is an iOS framework that keeps even the most complex user interfaces smooth and responsive. It was originally built to make Facebook's From ceff3e89878f7dd7e0cc9660b128f995b63d88fe Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 27 Jun 2016 17:14:24 -0700 Subject: [PATCH 039/247] Jenkins build test 3 added another space --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f0ffdee12f..13335eb7ac 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ interfaces smooth and responsive. It was originally built to make Facebook's [pop](https://github.com/facebook/pop)'s physics-based animations — but it's just as powerful with UIKit Dynamics and conventional app designs. -### Quick start +### Quick start ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: From 0414cf7c9b86ddef6a345bb5cb4f67869e89ace7 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 27 Jun 2016 17:24:01 -0700 Subject: [PATCH 040/247] Jenkins build test 4 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 13335eb7ac..c7f6218626 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ interfaces smooth and responsive. It was originally built to make Facebook's [pop](https://github.com/facebook/pop)'s physics-based animations — but it's just as powerful with UIKit Dynamics and conventional app designs. -### Quick start +### Quick start ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: From db9826c4c62a718f93efe8169e8b0684bba949ca Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 27 Jun 2016 17:30:06 -0700 Subject: [PATCH 041/247] Add a space for Jenkins testing --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c7f6218626..812826197f 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ CALayers: You can construct entire node hierarchies in parallel, or instantiate and size a single node on a background thread — for example, you could do -something like this in a UIViewController: +something like this in a UIViewController: ```objective-c dispatch_async(_backgroundQueue, ^{ From 1d356242fd04bf77c00e29dd7b9d1ddb891facec Mon Sep 17 00:00:00 2001 From: Gareth Reese Date: Tue, 28 Jun 2016 15:41:26 +0100 Subject: [PATCH 042/247] [ASVideoNode] Ensure that observer methods don't observer all other ASVideoNode objects --- AsyncDisplayKit/ASVideoNode.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 379a70955b..13d469ea89 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -164,6 +164,10 @@ static NSString * const kStatus = @"status"; - (void)addPlayerItemObservers:(AVPlayerItem *)playerItem { + if (playerItem == nil) { + return; + } + [playerItem addObserver:self forKeyPath:kStatus options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:ASVideoNodeContext]; [playerItem addObserver:self forKeyPath:kPlaybackLikelyToKeepUpKey options:NSKeyValueObservingOptionNew context:ASVideoNodeContext]; [playerItem addObserver:self forKeyPath:kplaybackBufferEmpty options:NSKeyValueObservingOptionNew context:ASVideoNodeContext]; @@ -641,7 +645,9 @@ static NSString * const kStatus = @"status"; _currentPlayerItem = currentItem; - [self addPlayerItemObservers:currentItem]; + if (currentItem != nil) { + [self addPlayerItemObservers:currentItem]; + } } - (ASDisplayNode *)playerNode From 45ef91171d5c1505bd2c5a9d00f13732402a09ba Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 28 Jun 2016 20:18:30 -0700 Subject: [PATCH 043/247] [ASTextNode] Release Lock Sooner in -setAttributedText: (#1828) * [ASTextNode] Release lock sooner in -setAttributedText: * [ASTextNode] Expand the critical scope a bit --- AsyncDisplayKit/ASTextNode.mm | 48 +++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index a1e3d6c3e7..3151437f55 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -366,31 +366,35 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)setAttributedText:(NSAttributedString *)attributedText { - std::lock_guard l(_textLock); if (attributedText == nil) { attributedText = [[NSAttributedString alloc] initWithString:@"" attributes:nil]; } - - if (ASObjectIsEqual(attributedText, _attributedText)) { - return; - } - - _attributedText = ASCleanseAttributedStringOfCoreTextAttributes(attributedText); - - if (_attributedText.length > 0) { - CGFloat screenScale = ASScreenScale(); - self.ascender = round([[_attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; - self.descender = round([[_attributedText attribute:NSFontAttributeName atIndex:_attributedText.length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; - } - - // Sync the truncation string with attributes from the updated _attributedString - // Without this, the size calculation of the text with truncation applied will - // not take into account the attributes of attributedText in the last line - [self _updateComposedTruncationText]; - // We need an entirely new renderer - [self _invalidateRenderer]; + // Don't hold textLock for too long. + { + std::lock_guard l(_textLock); + if (ASObjectIsEqual(attributedText, _attributedText)) { + return; + } + + _attributedText = ASCleanseAttributedStringOfCoreTextAttributes(attributedText); + + // Sync the truncation string with attributes from the updated _attributedString + // Without this, the size calculation of the text with truncation applied will + // not take into account the attributes of attributedText in the last line + [self _updateComposedTruncationText]; + + // We need an entirely new renderer + [self _invalidateRenderer]; + } + + NSUInteger length = attributedText.length; + if (length > 0) { + CGFloat screenScale = ASScreenScale(); + self.ascender = round([[attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; + self.descender = round([[attributedText attribute:NSFontAttributeName atIndex:length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; + } // Tell the display node superclasses that the cached layout is incorrect now [self invalidateCalculatedLayout]; @@ -399,8 +403,8 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // Accessiblity - self.accessibilityLabel = _attributedText.string; - self.isAccessibilityElement = (_attributedText.length != 0); // We're an accessibility element by default if there is a string. + self.accessibilityLabel = attributedText.string; + self.isAccessibilityElement = (length != 0); // We're an accessibility element by default if there is a string. } #pragma mark - Text Layout From f0e96cc80880fab16bce6c6f4cd8a4405c2d2579 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 30 Jun 2016 07:18:30 -0700 Subject: [PATCH 044/247] Change @import to #import --- AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m index 0837ad0eaa..fa636ad8c8 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -6,7 +6,7 @@ // Copyright © 2016 Facebook. All rights reserved. // -@import UIKit; +#import #import "NSIndexSet+ASHelpers.h" From 5f7cdbd9ca6cfe8af9302a7abfb88de69c487634 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 20 Jun 2016 17:07:26 -0700 Subject: [PATCH 045/247] Handle placeholder layer creation in case the size of the node changed after the initial placeholder layer was created --- AsyncDisplayKit/ASDisplayNode.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index e38731e7f8..1329254041 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1100,7 +1100,14 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) // measureWithSizeRange: on subnodes to assert. return; } + + // Handle placeholder layer creation in case the size of the node changed after the initial placeholder layer + // was created + if ([self _shouldHavePlaceholderLayer]) { + [self _setupPlaceholderLayerIfNeeded]; + } _placeholderLayer.frame = bounds; + [self layout]; [self layoutDidFinish]; } From d1b4e07d0ff2236b1c51fc546075d890eb16c144 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 23 Jun 2016 14:07:34 -0700 Subject: [PATCH 046/247] Add support for 'preferredFrameSize' to ASButtonNode --- AsyncDisplayKit/ASButtonNode.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 5638e7c125..864827ae76 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -15,6 +15,7 @@ #import "ASBackgroundLayoutSpec.h" #import "ASInsetLayoutSpec.h" #import "ASDisplayNode+Beta.h" +#import "ASStaticLayoutSpec.h" @interface ASButtonNode () { @@ -491,6 +492,12 @@ spec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:contentEdgeInsets child:spec]; } + if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO) { + // Handle preferred frame size + stack.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(self.preferredFrameSize); + spec = [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[stack]]; + } + if (_backgroundImageNode.image) { spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec background:_backgroundImageNode]; From 53f22da1dc7aaf5462d8e8c616338309ad79d916 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 23 Jun 2016 14:11:11 -0700 Subject: [PATCH 047/247] Code style improvements --- AsyncDisplayKit/ASButtonNode.mm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 864827ae76..54c30ad47e 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -493,14 +493,12 @@ } if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO) { - // Handle preferred frame size stack.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(self.preferredFrameSize); spec = [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[stack]]; } if (_backgroundImageNode.image) { - spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec - background:_backgroundImageNode]; + spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec background:_backgroundImageNode]; } return spec; From 27b99cf0b6147aa03dceb4914e255c9d70a83d3e Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 30 Jun 2016 08:46:11 -0700 Subject: [PATCH 048/247] Make NSIndexSet helpers framework-visible --- AsyncDisplayKit.xcodeproj/project.pbxproj | 2 ++ 1 file changed, 2 insertions(+) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 9fa6625a99..3e23e8b999 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -552,6 +552,7 @@ CC7FD9DF1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */; }; CC7FD9E11BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */; }; CC7FD9E21BB603FF005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; D785F6621A74327E00291744 /* ASScrollNode.h in Headers */ = {isa = PBXBuildFile; fileRef = D785F6601A74327E00291744 /* ASScrollNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; D785F6631A74327E00291744 /* ASScrollNode.m in Sources */ = {isa = PBXBuildFile; fileRef = D785F6611A74327E00291744 /* ASScrollNode.m */; }; DB55C2611C6408D6004EDCF5 /* _ASTransitionContext.h in Headers */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; @@ -1799,6 +1800,7 @@ 254C6B741BF94DF4003EC431 /* ASTextNodeWordKerner.h in Headers */, DB55C2671C641AE4004EDCF5 /* ASContextTransitioning.h in Headers */, 68B0277B1C1A79D60041016B /* ASDisplayNode+Beta.h in Headers */, + CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */, B350622D1B010EFD0018CF92 /* ASScrollDirection.h in Headers */, 254C6B751BF94DF4003EC431 /* ASTextKitComponents.h in Headers */, B35062081B010EFD0018CF92 /* ASScrollNode.h in Headers */, From 8804342a9863984774f3089f8669789de69f9293 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 30 Jun 2016 19:44:40 -0700 Subject: [PATCH 049/247] Don't propagate trait collections to cells if the node is not loaded yet (#1833) This fixes an issue where the propagation of trait collections trigger are creation of the node if the node view was not loaded yet. --- AsyncDisplayKit/Details/ASEnvironment.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index e267de1e8a..dd95c2e107 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -157,6 +157,10 @@ ASDISPLAYNODE_EXTERN_C_END ASDN::MutexLocker l(lock);\ ASEnvironmentTraitCollection oldTraits = self.environmentState.environmentTraitCollection;\ [super setEnvironmentState:environmentState];\ +\ + /* Extra Trait Collection Handling */\ + /* If the node is not loaded yet don't do anything as otherwise the access of the view will trigger a load*/\ + if (!self.isNodeLoaded) { return; } \ ASEnvironmentTraitCollection currentTraits = environmentState.environmentTraitCollection;\ if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(currentTraits, oldTraits) == NO) {\ /* Must dispatch to main for self.view && [self.view.dataController completedNodes]*/ \ From 8c3025bb12fa09f692a7015627140cf66bdb0ef9 Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 30 Jun 2016 19:45:29 -0700 Subject: [PATCH 050/247] [ASDisplayNode] added asyncTraitCollectionDidChange method (#1831) Subclasses can override this method to react to a trait collection change --- AsyncDisplayKit.xcodeproj/project.pbxproj | 2 ++ AsyncDisplayKit/ASDisplayNode+Subclasses.h | 7 +++++++ AsyncDisplayKit/ASDisplayNode.mm | 15 ++++++++++++++- 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 3e23e8b999..871b580764 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -368,6 +368,7 @@ 9C8898BB1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */; }; 9C8898BC1C738BA800D6B02E /* ASTextKitFontSizeAdjuster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */; }; 9C8898BD1C738BB800D6B02E /* ASTextKitFontSizeAdjuster.h in Headers */ = {isa = PBXBuildFile; fileRef = A32FEDD31C501B6A004F642A /* ASTextKitFontSizeAdjuster.h */; }; + 9CC606651D24DF9E006581A0 /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; 9CDC18CC1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CDC18CD1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CFFC6BE1CCAC52B006A6476 /* ASEnvironment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */; }; @@ -2276,6 +2277,7 @@ CC3B208C1C3F7A5400798563 /* ASWeakSet.m in Sources */, B350621C1B010EFD0018CF92 /* ASFlowLayoutController.mm in Sources */, B350621E1B010EFD0018CF92 /* ASHighlightOverlayLayer.mm in Sources */, + 9CC606651D24DF9E006581A0 /* NSIndexSet+ASHelpers.m in Sources */, 92074A641CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */, B35062541B010EFD0018CF92 /* ASImageNode+CGExtras.m in Sources */, 68355B401CB57A69001D4E68 /* ASImageContainerProtocolCategories.m in Sources */, diff --git a/AsyncDisplayKit/ASDisplayNode+Subclasses.h b/AsyncDisplayKit/ASDisplayNode+Subclasses.h index 967b82270d..9711355757 100644 --- a/AsyncDisplayKit/ASDisplayNode+Subclasses.h +++ b/AsyncDisplayKit/ASDisplayNode+Subclasses.h @@ -465,6 +465,13 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSString *)descriptionForRecursiveDescription; +/** + * @abstract Called when the node's ASTraitCollection changes + * + * @discussion Subclasses can override this method to react to a trait collection change. + */ +- (void)asyncTraitCollectionDidChange; + @end #define ASDisplayNodeAssertThreadAffinity(viewNode) ASDisplayNodeAssert(!viewNode || ASDisplayNodeThreadIsMain() || !(viewNode).nodeLoaded, @"Incorrect display node thread affinity - this method should not be called off the main thread after the ASDisplayNode's view or layer have been created") diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index e38731e7f8..ffda3fa232 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2755,7 +2755,12 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (void)setEnvironmentState:(ASEnvironmentState)environmentState { + ASEnvironmentTraitCollection oldTraitCollection = _environmentState.environmentTraitCollection; _environmentState = environmentState; + + if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(oldTraitCollection, _environmentState.environmentTraitCollection) == NO) { + [self asyncTraitCollectionDidChange]; + } } - (ASDisplayNode *)parent @@ -2785,7 +2790,10 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (void)setEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection { - _environmentState.environmentTraitCollection = environmentTraitCollection; + if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(environmentTraitCollection, _environmentState.environmentTraitCollection) == NO) { + _environmentState.environmentTraitCollection = environmentTraitCollection; + [self asyncTraitCollectionDidChange]; + } } ASEnvironmentLayoutOptionsForwarding @@ -2797,6 +2805,11 @@ ASEnvironmentLayoutExtensibilityForwarding return [ASTraitCollection traitCollectionWithASEnvironmentTraitCollection:self.environmentTraitCollection]; } +- (void)asyncTraitCollectionDidChange +{ + +} + #if TARGET_OS_TV #pragma mark - UIFocusEnvironment Protocol (tvOS) From 09a344b669dec2fd5ea66ce9105cdca647afec28 Mon Sep 17 00:00:00 2001 From: Gareth Reese Date: Fri, 1 Jul 2016 15:15:10 +0100 Subject: [PATCH 051/247] [ASVideoPlayerNode] Expose the placeholder image for the video player node --- AsyncDisplayKit/ASVideoPlayerNode.h | 1 + AsyncDisplayKit/ASVideoPlayerNode.mm | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/AsyncDisplayKit/ASVideoPlayerNode.h b/AsyncDisplayKit/ASVideoPlayerNode.h index de07dada8e..c8f65fcb80 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.h +++ b/AsyncDisplayKit/ASVideoPlayerNode.h @@ -49,6 +49,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign, readwrite) BOOL muted; @property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState; @property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall; +@property (nullable, atomic, strong, readwrite) NSURL *placeholderImageURL; //! Defaults to 100 @property (nonatomic, assign) int32_t periodicTimeObserverTimescale; diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index cd880bcd4d..fd76f79d30 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -76,6 +76,9 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; @end @implementation ASVideoPlayerNode + +@dynamic placeholderImageURL; + - (instancetype)init { if (!(self = [super init])) { @@ -771,6 +774,16 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; return _videoNode.shouldAggressivelyRecoverFromStall; } +- (void) setPlaceholderImageURL:(NSURL *)placeholderImageURL +{ + _videoNode.URL = placeholderImageURL; +} + +- (NSURL*) placeholderImageURL +{ + return _videoNode.URL; +} + - (void)setShouldAggressivelyRecoverFromStall:(BOOL)shouldAggressivelyRecoverFromStall { if (_shouldAggressivelyRecoverFromStall == shouldAggressivelyRecoverFromStall) { From b1ceab7a61ec277a20b5d8df302e0b522890b227 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Fri, 1 Jul 2016 09:39:36 -0700 Subject: [PATCH 052/247] Add nodeForPageAtIndex: to header and clean up doc --- AsyncDisplayKit/ASPagerNode.h | 47 +++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/AsyncDisplayKit/ASPagerNode.h b/AsyncDisplayKit/ASPagerNode.h index 2f9809da79..cbef217812 100644 --- a/AsyncDisplayKit/ASPagerNode.h +++ b/AsyncDisplayKit/ASPagerNode.h @@ -22,8 +22,6 @@ * This method replaces -collectionView:numberOfItemsInSection: * * @param pagerNode The sender. - * - * * @returns The total number of pages that can display in the pagerNode. */ - (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode; @@ -34,9 +32,7 @@ * This method replaces -collectionView:nodeForItemAtIndexPath: * * @param pagerNode The sender. - * - * @param index The index of the requested node. - * + * @param index The index of the requested node. * @returns a node for display at this index. This will be called on the main thread and should * not implement reuse (it will be called once per row). Unlike UICollectionView's version, * this method is not called when the row is about to display. @@ -48,9 +44,7 @@ * This method takes precedence over pagerNode:nodeAtIndex: if implemented. * * @param pagerNode The sender. - * - * @param index The index of the requested node. - * + * @param index The index of the requested node. * @returns a block that creates the node for display at this index. * Must be thread-safe (can be called on the main thread or a background * queue) and should not implement reuse (it will be called once per row). @@ -61,9 +55,7 @@ * Provides the constrained size range for measuring the node at the index path. * * @param pagerNode The sender. - * * @param indexPath The index path of the node. - * * @returns A constrained size range for layout the node at this index path. */ - (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath; @@ -76,27 +68,46 @@ @interface ASPagerNode : ASCollectionNode -/// Configures a default horizontal, paging flow layout with 0 inter-item spacing. +/** + * Configures a default horizontal, paging flow layout with 0 inter-item spacing. + */ - (instancetype)init; -/// Initializer with custom-configured flow layout properties. +/** + * Initializer with custom-configured flow layout properties. + */ - (instancetype)initWithCollectionViewLayout:(ASPagerFlowLayout *)flowLayout; -/// Data Source is required, and uses a different protocol from ASCollectionNode. +/** + * Data Source is required, and uses a different protocol from ASCollectionNode. + */ - (void)setDataSource:(id )dataSource; - (id )dataSource; -// Delegate is optional, and uses the same protocol as ASCollectionNode. -// This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay... +/** + * Delegate is optional, and uses the same protocol as ASCollectionNode. + * This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay... + */ @property (nonatomic, weak) id delegate; -/// The underlying ASCollectionView object. +/** + * The underlying ASCollectionView object. + */ @property (nonatomic, readonly) ASCollectionView *view; -/// Returns the current page index +/** + * Returns the current page index + */ @property (nonatomic, assign, readonly) NSInteger currentPageIndex; -/// Scroll the contents of the receiver to ensure that the page is visible +/** + * Scroll the contents of the receiver to ensure that the page is visible + */ - (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated; +/** + * Returns the node for the passed page index + */ +- (ASCellNode *)nodeForPageAtIndex:(NSInteger)index; + @end From 53bc126ae59bf3691bcb85be9e2978b93f7a7554 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Fri, 1 Jul 2016 09:42:39 -0700 Subject: [PATCH 053/247] Add implementation of nodeForPageAtIndex: --- AsyncDisplayKit/ASPagerNode.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AsyncDisplayKit/ASPagerNode.m b/AsyncDisplayKit/ASPagerNode.m index 2c6cd4b32e..c266ef18f3 100644 --- a/AsyncDisplayKit/ASPagerNode.m +++ b/AsyncDisplayKit/ASPagerNode.m @@ -98,6 +98,11 @@ [self.view scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:animated]; } +- (ASCellNode *)nodeForPageAtIndex:(NSInteger)index +{ + return [self.view nodeForItemAtIndexPath:[NSIndexPath indexPathForItem:index inSection:0]]; +} + #pragma mark - ASCollectionViewDataSource - (ASCellNodeBlock)collectionView:(ASCollectionView *)collectionView nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath From ebaa2c157e7c1b047d6434705132e5adee881f74 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 1 Jul 2016 11:47:05 -0700 Subject: [PATCH 054/247] Remove aggregate CGRect initializers in ASDataController --- AsyncDisplayKit/Details/ASDataController.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 163b812e10..f9a890e609 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -143,8 +143,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_layoutNode:(ASCellNode *)node withConstrainedSize:(ASSizeRange)constrainedSize { - CGSize size = [node measureWithSizeRange:constrainedSize].size; - node.frame = { .size = size }; + CGRect frame = CGRectZero; + frame.size = [node measureWithSizeRange:constrainedSize].size; + node.frame = frame; } /** @@ -849,8 +850,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; for (ASCellNode *node in section) { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex]; ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; - CGSize size = [node measureWithSizeRange:constrainedSize].size; - node.frame = { .size = size }; + CGRect frame = CGRectZero; + frame.size = [node measureWithSizeRange:constrainedSize].size; + node.frame = frame; rowIndex += 1; } sectionIndex += 1; From 9501299eed1d450ef5f9b62db4495fc871c052a0 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 24 Jun 2016 07:57:20 -0700 Subject: [PATCH 055/247] Use flags to cache instead of instance variables for caching respond to selector calls --- AsyncDisplayKit/ASNetworkImageNode.mm | 84 ++++++++++++++------------- 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/AsyncDisplayKit/ASNetworkImageNode.mm b/AsyncDisplayKit/ASNetworkImageNode.mm index fbfea44213..77559209c0 100755 --- a/AsyncDisplayKit/ASNetworkImageNode.mm +++ b/AsyncDisplayKit/ASNetworkImageNode.mm @@ -43,24 +43,28 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; BOOL _imageLoaded; CGFloat _currentImageQuality; CGFloat _renderedImageQuality; - - // TODO: Move this to flags - BOOL _delegateSupportsDidStartFetchingData; - BOOL _delegateSupportsDidFailWithError; - BOOL _delegateSupportsDidFinishDecoding; - BOOL _delegateSupportsDidLoadImage; - BOOL _shouldRenderProgressImages; - //set on init only - BOOL _downloaderSupportsNewProtocol; - BOOL _downloaderImplementsSetProgress; - BOOL _downloaderImplementsSetPriority; - BOOL _downloaderImplementsAnimatedImage; + struct { + unsigned int delegateDidStartFetchingData:1; + unsigned int delegateDidFailWithError:1; + unsigned int delegateDidFinishDecoding:1; + unsigned int delegateDidLoadImage:1; + } _delegateFlags; - BOOL _cacheSupportsNewProtocol; - BOOL _cacheSupportsClearing; - BOOL _cacheSupportsSynchronousFetch; + //set on init only + struct { + unsigned int downloaderSupportsNewProtocol:1; + unsigned int downloaderImplementsSetProgress:1; + unsigned int downloaderImplementsSetPriority:1; + unsigned int downloaderImplementsAnimatedImage:1; + } _downloaderFlags; + + struct { + unsigned int cacheSupportsNewProtocol:1; + unsigned int cacheSupportsClearing:1; + unsigned int cacheSupportsSynchronousFetch:1; + } _cacheFlags; } @end @@ -76,17 +80,17 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; ASDisplayNodeAssert([downloader respondsToSelector:@selector(downloadImageWithURL:callbackQueue:downloadProgress:completion:)] || [downloader respondsToSelector:@selector(downloadImageWithURL:callbackQueue:downloadProgressBlock:completion:)], @"downloader must respond to either downloadImageWithURL:callbackQueue:downloadProgress:completion: or downloadImageWithURL:callbackQueue:downloadProgressBlock:completion:."); - _downloaderSupportsNewProtocol = [downloader respondsToSelector:@selector(downloadImageWithURL:callbackQueue:downloadProgress:completion:)]; + _downloaderFlags.downloaderSupportsNewProtocol = [downloader respondsToSelector:@selector(downloadImageWithURL:callbackQueue:downloadProgress:completion:)]; ASDisplayNodeAssert(cache == nil || [cache respondsToSelector:@selector(cachedImageWithURL:callbackQueue:completion:)] || [cache respondsToSelector:@selector(fetchCachedImageWithURL:callbackQueue:completion:)], @"cacher must respond to either cachedImageWithURL:callbackQueue:completion: or fetchCachedImageWithURL:callbackQueue:completion:"); - _downloaderImplementsSetProgress = [downloader respondsToSelector:@selector(setProgressImageBlock:callbackQueue:withDownloadIdentifier:)]; - _downloaderImplementsSetPriority = [downloader respondsToSelector:@selector(setPriority:withDownloadIdentifier:)]; - _downloaderImplementsAnimatedImage = [downloader respondsToSelector:@selector(animatedImageWithData:)]; + _downloaderFlags.downloaderImplementsSetProgress = [downloader respondsToSelector:@selector(setProgressImageBlock:callbackQueue:withDownloadIdentifier:)]; + _downloaderFlags.downloaderImplementsSetPriority = [downloader respondsToSelector:@selector(setPriority:withDownloadIdentifier:)]; + _downloaderFlags.downloaderImplementsAnimatedImage = [downloader respondsToSelector:@selector(animatedImageWithData:)]; - _cacheSupportsNewProtocol = [cache respondsToSelector:@selector(cachedImageWithURL:callbackQueue:completion:)]; - _cacheSupportsClearing = [cache respondsToSelector:@selector(clearFetchedImageFromCacheWithURL:)]; - _cacheSupportsSynchronousFetch = [cache respondsToSelector:@selector(synchronouslyFetchedCachedImageWithURL:)]; + _cacheFlags.cacheSupportsNewProtocol = [cache respondsToSelector:@selector(cachedImageWithURL:callbackQueue:completion:)]; + _cacheFlags.cacheSupportsClearing = [cache respondsToSelector:@selector(clearFetchedImageFromCacheWithURL:)]; + _cacheFlags.cacheSupportsSynchronousFetch = [cache respondsToSelector:@selector(synchronouslyFetchedCachedImageWithURL:)]; _shouldCacheImage = YES; _shouldRenderProgressImages = YES; @@ -214,10 +218,10 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; ASDN::MutexLocker l(_lock); _delegate = delegate; - _delegateSupportsDidStartFetchingData = [delegate respondsToSelector:@selector(imageNodeDidStartFetchingData:)]; - _delegateSupportsDidFailWithError = [delegate respondsToSelector:@selector(imageNode:didFailWithError:)]; - _delegateSupportsDidFinishDecoding = [delegate respondsToSelector:@selector(imageNodeDidFinishDecoding:)]; - _delegateSupportsDidLoadImage = [delegate respondsToSelector:@selector(imageNode:didLoadImage:)]; + _delegateFlags.delegateDidStartFetchingData = [delegate respondsToSelector:@selector(imageNodeDidStartFetchingData:)]; + _delegateFlags.delegateDidFailWithError = [delegate respondsToSelector:@selector(imageNode:didFailWithError:)]; + _delegateFlags.delegateDidFinishDecoding = [delegate respondsToSelector:@selector(imageNodeDidFinishDecoding:)]; + _delegateFlags.delegateDidLoadImage = [delegate respondsToSelector:@selector(imageNode:didLoadImage:)]; } - (id)delegate @@ -258,7 +262,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; { [super displayWillStart]; - if (_cacheSupportsSynchronousFetch) { + if (_cacheFlags.cacheSupportsSynchronousFetch) { ASDN::MutexLocker l(_lock); if (_imageLoaded == NO && _URL && _downloadIdentifier == nil) { UIImage *result = [[_cache synchronouslyFetchedCachedImageWithURL:_URL] asdk_image]; @@ -275,7 +279,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; // TODO: Consider removing this; it predates ASInterfaceState, which now ensures that even non-range-managed nodes get a -fetchData call. [self fetchData]; - if (self.image == nil && _downloaderImplementsSetPriority) { + if (self.image == nil && _downloaderFlags.downloaderImplementsSetPriority) { ASDN::MutexLocker l(_lock); if (_downloadIdentifier != nil) { [_downloader setPriority:ASImageDownloaderPriorityImminent withDownloadIdentifier:_downloadIdentifier]; @@ -289,7 +293,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; { [super visibleStateDidChange:isVisible]; - if (_downloaderImplementsSetPriority) { + if (_downloaderFlags.downloaderImplementsSetPriority) { _lock.lock(); if (_downloadIdentifier != nil) { if (isVisible) { @@ -314,7 +318,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [self _cancelImageDownload]; [self _clearImage]; - if (_cacheSupportsClearing) { + if (_cacheFlags.cacheSupportsClearing) { [_cache clearFetchedImageFromCacheWithURL:_URL]; } } @@ -344,7 +348,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; ASInterfaceState interfaceState = self.interfaceState; ASDN::MutexLocker l(_lock); - if (!_downloaderImplementsSetProgress || _downloadIdentifier == nil) { + if (!_downloaderFlags.downloaderImplementsSetProgress || _downloadIdentifier == nil) { return; } @@ -411,7 +415,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; { ASPerformBlockOnBackgroundThread(^{ _lock.lock(); - if (_downloaderSupportsNewProtocol) { + if (_downloaderFlags.downloaderSupportsNewProtocol) { _downloadIdentifier = [_downloader downloadImageWithURL:_URL callbackQueue:dispatch_get_main_queue() downloadProgress:NULL @@ -447,7 +451,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; if (!_imageLoaded && _URL != nil && _downloadIdentifier == nil) { { ASDN::MutexLocker l(_lock); - if (_delegateSupportsDidStartFetchingData) { + if (_delegateFlags.delegateDidStartFetchingData) { [_delegate imageNodeDidStartFetchingData:self]; } } @@ -474,7 +478,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; // If the file may be an animated gif and then created an animated image. id animatedImage = nil; - if (_downloaderImplementsAnimatedImage) { + if (_downloaderFlags.downloaderImplementsAnimatedImage) { NSData *data = [NSData dataWithContentsOfURL:_URL]; animatedImage = [_downloader animatedImageWithData:data]; @@ -497,7 +501,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; dispatch_async(dispatch_get_main_queue(), ^{ self.currentImageQuality = 1.0; }); - if (_delegateSupportsDidLoadImage) { + if (_delegateFlags.delegateDidLoadImage) { [_delegate imageNode:self didLoadImage:self.image]; } }); @@ -519,7 +523,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; if (imageContainer != nil) { strongSelf->_imageLoaded = YES; - if ([imageContainer asdk_animatedImageData] && _downloaderImplementsAnimatedImage) { + if ([imageContainer asdk_animatedImageData] && _downloaderFlags.downloaderImplementsAnimatedImage) { strongSelf.animatedImage = [_downloader animatedImageWithData:[imageContainer asdk_animatedImageData]]; } else { strongSelf.image = [imageContainer asdk_image]; @@ -534,11 +538,11 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; strongSelf->_cacheUUID = nil; if (imageContainer != nil) { - if (strongSelf->_delegateSupportsDidLoadImage) { + if (strongSelf->_delegateFlags.delegateDidLoadImage) { [strongSelf->_delegate imageNode:strongSelf didLoadImage:strongSelf.image]; } } - else if (error && strongSelf->_delegateSupportsDidFailWithError) { + else if (error && strongSelf->_delegateFlags.delegateDidFailWithError) { [strongSelf->_delegate imageNode:strongSelf didFailWithError:error]; } }; @@ -560,7 +564,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; } }; - if (_cacheSupportsNewProtocol) { + if (_cacheFlags.cacheSupportsNewProtocol) { [_cache cachedImageWithURL:_URL callbackQueue:dispatch_get_main_queue() completion:cacheCompletion]; @@ -588,7 +592,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super displayDidFinish]; ASDN::MutexLocker l(_lock); - if (_delegateSupportsDidFinishDecoding && self.layer.contents != nil) { + if (_delegateFlags.delegateDidFinishDecoding && self.layer.contents != nil) { /* We store the image quality in _currentImageQuality whenever _image is set. On the following displayDidFinish, we'll know that _currentImageQuality is the quality of the image that has just finished rendering. In order for this to be accurate, we need to be sure we are on main thread when we set _currentImageQuality. Otherwise, it is possible for _currentImageQuality From d7fde61e168b6594ca5d74836597b0aac0e83e9b Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Fri, 1 Jul 2016 16:25:48 -0700 Subject: [PATCH 056/247] update from master/ --- AsyncDisplayKit.xcodeproj/project.pbxproj | 34 ++-- AsyncDisplayKit/ASButtonNode.mm | 9 +- AsyncDisplayKit/ASCollectionView.mm | 14 +- AsyncDisplayKit/ASDisplayNode+Subclasses.h | 7 + AsyncDisplayKit/ASDisplayNode.mm | 22 ++- AsyncDisplayKit/ASPagerNode.h | 47 +++-- AsyncDisplayKit/ASPagerNode.m | 5 + AsyncDisplayKit/ASTableView.h | 12 ++ AsyncDisplayKit/ASTableView.mm | 36 +++- AsyncDisplayKit/ASTableViewInternal.h | 3 + AsyncDisplayKit/ASTextNode.mm | 48 ++--- AsyncDisplayKit/ASVideoNode.mm | 8 +- AsyncDisplayKit/ASVideoPlayerNode.h | 1 + AsyncDisplayKit/ASVideoPlayerNode.mm | 13 ++ .../Details/ASChangeSetDataController.m | 26 +-- .../Details/ASCollectionDataController.mm | 48 ----- .../Details/ASDataController+Subclasses.h | 44 ----- AsyncDisplayKit/Details/ASDataController.mm | 90 +-------- AsyncDisplayKit/Details/ASDelegateProxy.m | 9 + AsyncDisplayKit/Details/ASEnvironment.h | 4 + .../Details/ASFlowLayoutController.mm | 4 +- .../Details/NSIndexSet+ASHelpers.h | 25 +++ .../Details/NSIndexSet+ASHelpers.m | 76 ++++++++ .../Private/_ASHierarchyChangeSet.h | 28 ++- .../Private/_ASHierarchyChangeSet.m | 175 ++++++++++-------- AsyncDisplayKitTests/ASCollectionViewTests.m | 40 ++++ AsyncDisplayKitTests/ASTableViewTests.m | 41 +++- AsyncDisplayKitTests/ASTableViewThrashTests.m | 27 +-- .../TestResources/ASThrashTestRecordedCase | 2 +- README.md | 8 +- build.sh | 40 ++++ 31 files changed, 589 insertions(+), 357 deletions(-) create mode 100644 AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h create mode 100644 AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 62c3baffc7..0c518f3cab 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -256,9 +256,9 @@ 68355B3A1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; 68355B3B1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B3C1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; - 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; }; + 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B3E1CB57A60001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; - 68355B3F1CB57A64001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; }; + 68355B3F1CB57A64001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B401CB57A69001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; 68355B411CB57A6C001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68AF37DB1CBEF4D80077BF76 /* ASImageNode+AnimatedImagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */; }; @@ -368,6 +368,7 @@ 9C8898BB1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */; }; 9C8898BC1C738BA800D6B02E /* ASTextKitFontSizeAdjuster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */; }; 9C8898BD1C738BB800D6B02E /* ASTextKitFontSizeAdjuster.h in Headers */ = {isa = PBXBuildFile; fileRef = A32FEDD31C501B6A004F642A /* ASTextKitFontSizeAdjuster.h */; }; + 9CC606651D24DF9E006581A0 /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; 9CDC18CC1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CDC18CD1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CFFC6BE1CCAC52B006A6476 /* ASEnvironment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */; }; @@ -546,10 +547,13 @@ CC3B208E1C3F7D0A00798563 /* ASWeakSetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.m */; }; CC3B20901C3F892D00798563 /* ASBridgedPropertiesTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */; }; CC4981B31D1A02BE004E13CC /* ASTableViewThrashTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981B21D1A02BE004E13CC /* ASTableViewThrashTests.m */; }; + CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; + CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; CC7FD9DE1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; CC7FD9DF1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */; }; CC7FD9E11BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */; }; CC7FD9E21BB603FF005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; D785F6621A74327E00291744 /* ASScrollNode.h in Headers */ = {isa = PBXBuildFile; fileRef = D785F6601A74327E00291744 /* ASScrollNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; D785F6631A74327E00291744 /* ASScrollNode.m in Sources */ = {isa = PBXBuildFile; fileRef = D785F6611A74327E00291744 /* ASScrollNode.m */; }; DB55C2611C6408D6004EDCF5 /* _ASTransitionContext.h in Headers */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; @@ -937,6 +941,8 @@ CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASWeakSetTests.m; sourceTree = ""; }; CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASBridgedPropertiesTests.mm; sourceTree = ""; }; CC4981B21D1A02BE004E13CC /* ASTableViewThrashTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASTableViewThrashTests.m; sourceTree = ""; }; + CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSIndexSet+ASHelpers.h"; sourceTree = ""; }; + CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSIndexSet+ASHelpers.m"; sourceTree = ""; }; CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASPhotosFrameworkImageRequest.h; sourceTree = ""; }; CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPhotosFrameworkImageRequest.m; sourceTree = ""; }; CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPhotosFrameworkImageRequestTests.m; sourceTree = ""; }; @@ -1229,6 +1235,8 @@ 058D09E1195D050800B7D73C /* Details */ = { isa = PBXGroup; children = ( + CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */, + CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */, 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */, 058D09E2195D050800B7D73C /* _ASDisplayLayer.h */, 058D09E3195D050800B7D73C /* _ASDisplayLayer.mm */, @@ -1634,6 +1642,7 @@ ACF6ED2D1B17843500DA7C62 /* ASRatioLayoutSpec.h in Headers */, AC47D9451B3BB41900AAEE9D /* ASRelativeSize.h in Headers */, 291B63FB1AA53A7A000A71B3 /* ASScrollDirection.h in Headers */, + CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */, D785F6621A74327E00291744 /* ASScrollNode.h in Headers */, 058D0A7F195D05F900B7D73C /* ASSentinel.h in Headers */, 9C8221951BA237B80037F19A /* ASStackBaselinePositionedLayout.h in Headers */, @@ -1792,6 +1801,7 @@ 254C6B741BF94DF4003EC431 /* ASTextNodeWordKerner.h in Headers */, DB55C2671C641AE4004EDCF5 /* ASContextTransitioning.h in Headers */, 68B0277B1C1A79D60041016B /* ASDisplayNode+Beta.h in Headers */, + CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */, B350622D1B010EFD0018CF92 /* ASScrollDirection.h in Headers */, 254C6B751BF94DF4003EC431 /* ASTextKitComponents.h in Headers */, B35062081B010EFD0018CF92 /* ASScrollNode.h in Headers */, @@ -1874,12 +1884,12 @@ isa = PBXNativeTarget; buildConfigurationList = 058D09D2195D04C000B7D73C /* Build configuration list for PBXNativeTarget "AsyncDisplayKitTests" */; buildPhases = ( - 2E61B6A0DB0F436A9DDBE86F /* 📦 Check Pods Manifest.lock */, + 2E61B6A0DB0F436A9DDBE86F /* [CP] Check Pods Manifest.lock */, 058D09B8195D04C000B7D73C /* Sources */, 058D09B9195D04C000B7D73C /* Frameworks */, 058D09BA195D04C000B7D73C /* Resources */, - 3B9D88CDF51B429C8409E4B6 /* 📦 Copy Pods Resources */, - B130AB1AC0A1E5162E211C19 /* 📦 Embed Pods Frameworks */, + 3B9D88CDF51B429C8409E4B6 /* [CP] Copy Pods Resources */, + B130AB1AC0A1E5162E211C19 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -1980,14 +1990,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2E61B6A0DB0F436A9DDBE86F /* 📦 Check Pods Manifest.lock */ = { + 2E61B6A0DB0F436A9DDBE86F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1995,14 +2005,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 3B9D88CDF51B429C8409E4B6 /* 📦 Copy Pods Resources */ = { + 3B9D88CDF51B429C8409E4B6 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -2010,14 +2020,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - B130AB1AC0A1E5162E211C19 /* 📦 Embed Pods Frameworks */ = { + B130AB1AC0A1E5162E211C19 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -2101,6 +2111,7 @@ ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.mm in Sources */, 68FC85DF1CE29AB700EDD713 /* ASNavigationController.m in Sources */, ACF6ED251B17843500DA7C62 /* ASLayout.mm in Sources */, + CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */, DB55C2631C6408D6004EDCF5 /* _ASTransitionContext.m in Sources */, 92074A631CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */, 251B8EFA1BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m in Sources */, @@ -2266,6 +2277,7 @@ CC3B208C1C3F7A5400798563 /* ASWeakSet.m in Sources */, B350621C1B010EFD0018CF92 /* ASFlowLayoutController.mm in Sources */, B350621E1B010EFD0018CF92 /* ASHighlightOverlayLayer.mm in Sources */, + 9CC606651D24DF9E006581A0 /* NSIndexSet+ASHelpers.m in Sources */, 92074A641CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */, B35062541B010EFD0018CF92 /* ASImageNode+CGExtras.m in Sources */, 68355B401CB57A69001D4E68 /* ASImageContainerProtocolCategories.m in Sources */, diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 5638e7c125..54c30ad47e 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -15,6 +15,7 @@ #import "ASBackgroundLayoutSpec.h" #import "ASInsetLayoutSpec.h" #import "ASDisplayNode+Beta.h" +#import "ASStaticLayoutSpec.h" @interface ASButtonNode () { @@ -491,9 +492,13 @@ spec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:contentEdgeInsets child:spec]; } + if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO) { + stack.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(self.preferredFrameSize); + spec = [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[stack]]; + } + if (_backgroundImageNode.image) { - spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec - background:_backgroundImageNode]; + spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec background:_backgroundImageNode]; } return spec; diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index e90d6e398b..e5546436ac 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -430,22 +430,22 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType { - [_collectionNode setTuningParameters:tuningParameters forRangeType:rangeType]; + [_rangeController setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType { - return [_collectionNode tuningParametersForRangeType:rangeType]; + return [_rangeController tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; } - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - [_collectionNode setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; + [_rangeController setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - return [_collectionNode tuningParametersForRangeMode:rangeMode rangeType:rangeType]; + return [_rangeController tuningParametersForRangeMode:rangeMode rangeType:rangeType]; } - (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath @@ -517,18 +517,21 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)insertSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController insertSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)deleteSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController deleteSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)reloadSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController reloadSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } @@ -541,18 +544,21 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)insertItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } diff --git a/AsyncDisplayKit/ASDisplayNode+Subclasses.h b/AsyncDisplayKit/ASDisplayNode+Subclasses.h index 967b82270d..9711355757 100644 --- a/AsyncDisplayKit/ASDisplayNode+Subclasses.h +++ b/AsyncDisplayKit/ASDisplayNode+Subclasses.h @@ -465,6 +465,13 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSString *)descriptionForRecursiveDescription; +/** + * @abstract Called when the node's ASTraitCollection changes + * + * @discussion Subclasses can override this method to react to a trait collection change. + */ +- (void)asyncTraitCollectionDidChange; + @end #define ASDisplayNodeAssertThreadAffinity(viewNode) ASDisplayNodeAssert(!viewNode || ASDisplayNodeThreadIsMain() || !(viewNode).nodeLoaded, @"Incorrect display node thread affinity - this method should not be called off the main thread after the ASDisplayNode's view or layer have been created") diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index e38731e7f8..cf38ddd804 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1100,7 +1100,14 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) // measureWithSizeRange: on subnodes to assert. return; } + + // Handle placeholder layer creation in case the size of the node changed after the initial placeholder layer + // was created + if ([self _shouldHavePlaceholderLayer]) { + [self _setupPlaceholderLayerIfNeeded]; + } _placeholderLayer.frame = bounds; + [self layout]; [self layoutDidFinish]; } @@ -2755,7 +2762,12 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (void)setEnvironmentState:(ASEnvironmentState)environmentState { + ASEnvironmentTraitCollection oldTraitCollection = _environmentState.environmentTraitCollection; _environmentState = environmentState; + + if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(oldTraitCollection, _environmentState.environmentTraitCollection) == NO) { + [self asyncTraitCollectionDidChange]; + } } - (ASDisplayNode *)parent @@ -2785,7 +2797,10 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (void)setEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection { - _environmentState.environmentTraitCollection = environmentTraitCollection; + if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(environmentTraitCollection, _environmentState.environmentTraitCollection) == NO) { + _environmentState.environmentTraitCollection = environmentTraitCollection; + [self asyncTraitCollectionDidChange]; + } } ASEnvironmentLayoutOptionsForwarding @@ -2797,6 +2812,11 @@ ASEnvironmentLayoutExtensibilityForwarding return [ASTraitCollection traitCollectionWithASEnvironmentTraitCollection:self.environmentTraitCollection]; } +- (void)asyncTraitCollectionDidChange +{ + +} + #if TARGET_OS_TV #pragma mark - UIFocusEnvironment Protocol (tvOS) diff --git a/AsyncDisplayKit/ASPagerNode.h b/AsyncDisplayKit/ASPagerNode.h index 2f9809da79..cbef217812 100644 --- a/AsyncDisplayKit/ASPagerNode.h +++ b/AsyncDisplayKit/ASPagerNode.h @@ -22,8 +22,6 @@ * This method replaces -collectionView:numberOfItemsInSection: * * @param pagerNode The sender. - * - * * @returns The total number of pages that can display in the pagerNode. */ - (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode; @@ -34,9 +32,7 @@ * This method replaces -collectionView:nodeForItemAtIndexPath: * * @param pagerNode The sender. - * - * @param index The index of the requested node. - * + * @param index The index of the requested node. * @returns a node for display at this index. This will be called on the main thread and should * not implement reuse (it will be called once per row). Unlike UICollectionView's version, * this method is not called when the row is about to display. @@ -48,9 +44,7 @@ * This method takes precedence over pagerNode:nodeAtIndex: if implemented. * * @param pagerNode The sender. - * - * @param index The index of the requested node. - * + * @param index The index of the requested node. * @returns a block that creates the node for display at this index. * Must be thread-safe (can be called on the main thread or a background * queue) and should not implement reuse (it will be called once per row). @@ -61,9 +55,7 @@ * Provides the constrained size range for measuring the node at the index path. * * @param pagerNode The sender. - * * @param indexPath The index path of the node. - * * @returns A constrained size range for layout the node at this index path. */ - (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath; @@ -76,27 +68,46 @@ @interface ASPagerNode : ASCollectionNode -/// Configures a default horizontal, paging flow layout with 0 inter-item spacing. +/** + * Configures a default horizontal, paging flow layout with 0 inter-item spacing. + */ - (instancetype)init; -/// Initializer with custom-configured flow layout properties. +/** + * Initializer with custom-configured flow layout properties. + */ - (instancetype)initWithCollectionViewLayout:(ASPagerFlowLayout *)flowLayout; -/// Data Source is required, and uses a different protocol from ASCollectionNode. +/** + * Data Source is required, and uses a different protocol from ASCollectionNode. + */ - (void)setDataSource:(id )dataSource; - (id )dataSource; -// Delegate is optional, and uses the same protocol as ASCollectionNode. -// This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay... +/** + * Delegate is optional, and uses the same protocol as ASCollectionNode. + * This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay... + */ @property (nonatomic, weak) id delegate; -/// The underlying ASCollectionView object. +/** + * The underlying ASCollectionView object. + */ @property (nonatomic, readonly) ASCollectionView *view; -/// Returns the current page index +/** + * Returns the current page index + */ @property (nonatomic, assign, readonly) NSInteger currentPageIndex; -/// Scroll the contents of the receiver to ensure that the page is visible +/** + * Scroll the contents of the receiver to ensure that the page is visible + */ - (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated; +/** + * Returns the node for the passed page index + */ +- (ASCellNode *)nodeForPageAtIndex:(NSInteger)index; + @end diff --git a/AsyncDisplayKit/ASPagerNode.m b/AsyncDisplayKit/ASPagerNode.m index 2c6cd4b32e..c266ef18f3 100644 --- a/AsyncDisplayKit/ASPagerNode.m +++ b/AsyncDisplayKit/ASPagerNode.m @@ -98,6 +98,11 @@ [self.view scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:animated]; } +- (ASCellNode *)nodeForPageAtIndex:(NSInteger)index +{ + return [self.view nodeForItemAtIndexPath:[NSIndexPath indexPathForItem:index inSection:0]]; +} + #pragma mark - ASCollectionViewDataSource - (ASCellNodeBlock)collectionView:(ASCollectionView *)collectionView nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath diff --git a/AsyncDisplayKit/ASTableView.h b/AsyncDisplayKit/ASTableView.h index 7d36cc3d4d..06ce862606 100644 --- a/AsyncDisplayKit/ASTableView.h +++ b/AsyncDisplayKit/ASTableView.h @@ -433,6 +433,18 @@ NS_ASSUME_NONNULL_BEGIN */ - (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView; +/** + * Provides the constrained size range for measuring the row at the index path. + * Note: the widths in the returned size range are ignored! + * + * @param tableView The sender. + * + * @param indexPath The index path of the node. + * + * @returns A constrained size range for layout the node at this index path. + */ +- (ASSizeRange)tableView:(ASTableView *)tableView constrainedSizeForRowAtIndexPath:(NSIndexPath *)indexPath; + /** * Informs the delegate that the table view did remove the node which was previously * at the given index path from the view hierarchy. diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 8c62f23aa4..db73c8049c 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -28,6 +28,7 @@ #import +static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; //#define LOG(...) NSLog(__VA_ARGS__) @@ -144,6 +145,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; unsigned int asyncDelegateScrollViewWillEndDraggingWithVelocityTargetContentOffset:1; unsigned int asyncDelegateTableViewWillBeginBatchFetchWithContext:1; unsigned int asyncDelegateShouldBatchFetchForTableView:1; + unsigned int asyncDelegateTableViewConstrainedSizeForRowAtIndexPath:1; } _asyncDelegateFlags; struct { @@ -164,6 +166,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; // Always set, whether ASCollectionView is created directly or via ASCollectionNode. @property (nonatomic, weak) ASTableNode *tableNode; +@property (nonatomic) BOOL test_enableSuperUpdateCallLogging; @end @implementation ASTableView @@ -335,6 +338,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; _asyncDelegateFlags.asyncDelegateShouldBatchFetchForTableView = [_asyncDelegate respondsToSelector:@selector(shouldBatchFetchForTableView:)]; _asyncDelegateFlags.asyncDelegateScrollViewWillBeginDragging = [_asyncDelegate respondsToSelector:@selector(scrollViewWillBeginDragging:)]; _asyncDelegateFlags.asyncDelegateScrollViewDidEndDragging = [_asyncDelegate respondsToSelector:@selector(scrollViewDidEndDragging:willDecelerate:)]; + _asyncDelegateFlags.asyncDelegateTableViewConstrainedSizeForRowAtIndexPath = [_asyncDelegate respondsToSelector:@selector(tableView:constrainedSizeForRowAtIndexPath:)]; + } super.delegate = (id)_proxyDelegate; @@ -474,18 +479,21 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController insertSections:sections withAnimationOptions:animation]; } - (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController deleteSections:sections withAnimationOptions:animation]; } - (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (sections.count == 0) { return; } [_dataController reloadSections:sections withAnimationOptions:animation]; } @@ -498,18 +506,21 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } - (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); + if (indexPaths.count == 0) { return; } [_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } @@ -993,6 +1004,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super insertRowsAtIndexPaths]: %@", indexPaths); + } [super insertRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -1013,6 +1027,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super deleteRowsAtIndexPaths]: %@", indexPaths); + } [super deleteRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -1034,6 +1051,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super insertSections]: %@", indexSet); + } [super insertSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); @@ -1050,6 +1070,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ + if (self.test_enableSuperUpdateCallLogging) { + NSLog(@"-[super deleteSections]: %@", indexSet); + } [super deleteSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); @@ -1088,8 +1111,17 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (ASSizeRange)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - return ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, 0), - CGSizeMake(_nodesConstrainedWidth, FLT_MAX)); + ASSizeRange constrainedSize = kInvalidSizeRange; + if (_asyncDelegateFlags.asyncDelegateTableViewConstrainedSizeForRowAtIndexPath) { + ASSizeRange delegateConstrainedSize = [_asyncDelegate tableView:self constrainedSizeForRowAtIndexPath:indexPath]; + // ignore widths in the returned size range (for TableView) + constrainedSize = ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, delegateConstrainedSize.min.height), + CGSizeMake(_nodesConstrainedWidth, delegateConstrainedSize.max.height)); + } else { + constrainedSize = ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, 0), + CGSizeMake(_nodesConstrainedWidth, FLT_MAX)); + } + return constrainedSize; } - (NSUInteger)dataController:(ASDataController *)dataController rowsInSection:(NSUInteger)section diff --git a/AsyncDisplayKit/ASTableViewInternal.h b/AsyncDisplayKit/ASTableViewInternal.h index 93cdca0fcb..22ac11ff7e 100644 --- a/AsyncDisplayKit/ASTableViewInternal.h +++ b/AsyncDisplayKit/ASTableViewInternal.h @@ -34,4 +34,7 @@ */ - (instancetype)_initWithFrame:(CGRect)frame style:(UITableViewStyle)style dataControllerClass:(Class)dataControllerClass ownedByNode:(BOOL)ownedByNode; +/// Set YES and we'll log every time we call [super insertRows…] etc +@property (nonatomic) BOOL test_enableSuperUpdateCallLogging; + @end diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index a1e3d6c3e7..3151437f55 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -366,31 +366,35 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)setAttributedText:(NSAttributedString *)attributedText { - std::lock_guard l(_textLock); if (attributedText == nil) { attributedText = [[NSAttributedString alloc] initWithString:@"" attributes:nil]; } - - if (ASObjectIsEqual(attributedText, _attributedText)) { - return; - } - - _attributedText = ASCleanseAttributedStringOfCoreTextAttributes(attributedText); - - if (_attributedText.length > 0) { - CGFloat screenScale = ASScreenScale(); - self.ascender = round([[_attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; - self.descender = round([[_attributedText attribute:NSFontAttributeName atIndex:_attributedText.length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; - } - - // Sync the truncation string with attributes from the updated _attributedString - // Without this, the size calculation of the text with truncation applied will - // not take into account the attributes of attributedText in the last line - [self _updateComposedTruncationText]; - // We need an entirely new renderer - [self _invalidateRenderer]; + // Don't hold textLock for too long. + { + std::lock_guard l(_textLock); + if (ASObjectIsEqual(attributedText, _attributedText)) { + return; + } + + _attributedText = ASCleanseAttributedStringOfCoreTextAttributes(attributedText); + + // Sync the truncation string with attributes from the updated _attributedString + // Without this, the size calculation of the text with truncation applied will + // not take into account the attributes of attributedText in the last line + [self _updateComposedTruncationText]; + + // We need an entirely new renderer + [self _invalidateRenderer]; + } + + NSUInteger length = attributedText.length; + if (length > 0) { + CGFloat screenScale = ASScreenScale(); + self.ascender = round([[attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; + self.descender = round([[attributedText attribute:NSFontAttributeName atIndex:length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; + } // Tell the display node superclasses that the cached layout is incorrect now [self invalidateCalculatedLayout]; @@ -399,8 +403,8 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // Accessiblity - self.accessibilityLabel = _attributedText.string; - self.isAccessibilityElement = (_attributedText.length != 0); // We're an accessibility element by default if there is a string. + self.accessibilityLabel = attributedText.string; + self.isAccessibilityElement = (length != 0); // We're an accessibility element by default if there is a string. } #pragma mark - Text Layout diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 379a70955b..13d469ea89 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -164,6 +164,10 @@ static NSString * const kStatus = @"status"; - (void)addPlayerItemObservers:(AVPlayerItem *)playerItem { + if (playerItem == nil) { + return; + } + [playerItem addObserver:self forKeyPath:kStatus options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:ASVideoNodeContext]; [playerItem addObserver:self forKeyPath:kPlaybackLikelyToKeepUpKey options:NSKeyValueObservingOptionNew context:ASVideoNodeContext]; [playerItem addObserver:self forKeyPath:kplaybackBufferEmpty options:NSKeyValueObservingOptionNew context:ASVideoNodeContext]; @@ -641,7 +645,9 @@ static NSString * const kStatus = @"status"; _currentPlayerItem = currentItem; - [self addPlayerItemObservers:currentItem]; + if (currentItem != nil) { + [self addPlayerItemObservers:currentItem]; + } } - (ASDisplayNode *)playerNode diff --git a/AsyncDisplayKit/ASVideoPlayerNode.h b/AsyncDisplayKit/ASVideoPlayerNode.h index de07dada8e..c8f65fcb80 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.h +++ b/AsyncDisplayKit/ASVideoPlayerNode.h @@ -49,6 +49,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign, readwrite) BOOL muted; @property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState; @property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall; +@property (nullable, atomic, strong, readwrite) NSURL *placeholderImageURL; //! Defaults to 100 @property (nonatomic, assign) int32_t periodicTimeObserverTimescale; diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index cd880bcd4d..fd76f79d30 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -76,6 +76,9 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; @end @implementation ASVideoPlayerNode + +@dynamic placeholderImageURL; + - (instancetype)init { if (!(self = [super init])) { @@ -771,6 +774,16 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; return _videoNode.shouldAggressivelyRecoverFromStall; } +- (void) setPlaceholderImageURL:(NSURL *)placeholderImageURL +{ + _videoNode.URL = placeholderImageURL; +} + +- (NSURL*) placeholderImageURL +{ + return _videoNode.URL; +} + - (void)setShouldAggressivelyRecoverFromStall:(BOOL)shouldAggressivelyRecoverFromStall { if (_shouldAggressivelyRecoverFromStall == shouldAggressivelyRecoverFromStall) { diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index efce00ad31..f6615d1bdb 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -14,6 +14,7 @@ #import "ASInternalHelpers.h" #import "_ASHierarchyChangeSet.h" #import "ASAssert.h" +#import "NSIndexSet+ASHelpers.h" #import "ASDataController+Subclasses.h" @@ -47,6 +48,9 @@ [super beginUpdates]; + NSAssert([_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload item changes to have been converted into insert/deletes."); + NSAssert([_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload section changes to have been converted into insert/deletes."); + for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; } @@ -54,17 +58,7 @@ for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions]; } - - // TODO: Shouldn't reloads be processed before deletes, since deletes affect - // the index space and reloads don't? - for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload]) { - [super reloadSections:change.indexSet withAnimationOptions:change.animationOptions]; - } - - for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload]) { - [super reloadRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; - } - + for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeInsert]) { [super insertSections:change.indexSet withAnimationOptions:change.animationOptions]; } @@ -115,7 +109,10 @@ if ([self batchUpdating]) { [_changeSet reloadSections:sections animationOptions:animationOptions]; } else { - [super reloadSections:sections withAnimationOptions:animationOptions]; + [self beginUpdates]; + [super deleteSections:sections withAnimationOptions:animationOptions]; + [super insertSections:sections withAnimationOptions:animationOptions]; + [self endUpdates]; } } @@ -158,7 +155,10 @@ if ([self batchUpdating]) { [_changeSet reloadItems:indexPaths animationOptions:animationOptions]; } else { - [super reloadRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; + [self beginUpdates]; + [super deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; + [super insertRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; + [self endUpdates]; } } diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index b54583c2a2..df0e7d592b 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -115,30 +115,6 @@ } } -- (void)prepareForReloadSections:(NSIndexSet *)sections -{ - for (NSString *kind in [self supplementaryKinds]) { - NSMutableArray *contexts = [NSMutableArray array]; - [self _populateSupplementaryNodesOfKind:kind withSections:sections mutableContexts:contexts]; - _pendingContexts[kind] = contexts; - } -} - -- (void)willReloadSections:(NSIndexSet *)sections -{ - NSArray *keys = _pendingContexts.allKeys; - for (NSString *kind in keys) { - NSMutableArray *contexts = _pendingContexts[kind]; - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet([self editingNodesOfKind:kind], sections); - [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; - // reinsert the elements - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { - [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; - }]; - [_pendingContexts removeObjectForKey:kind]; - } -} - - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { for (NSString *kind in [self supplementaryKinds]) { @@ -187,30 +163,6 @@ } } -- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - for (NSString *kind in [self supplementaryKinds]) { - NSMutableArray *contexts = [NSMutableArray array]; - [self _populateSupplementaryNodesOfKind:kind atIndexPaths:indexPaths mutableContexts:contexts]; - _pendingContexts[kind] = contexts; - } -} - -- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - NSArray *keys = _pendingContexts.allKeys; - for (NSString *kind in keys) { - NSMutableArray *contexts = _pendingContexts[kind]; - - [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; - // reinsert the elements - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { - [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; - }]; - [_pendingContexts removeObjectForKey:kind]; - } -} - - (void)_populateSupplementaryNodesOfKind:(NSString *)kind withMutableContexts:(NSMutableArray *)contexts { id environment = [self.environmentDelegate dataControllerEnvironment]; diff --git a/AsyncDisplayKit/Details/ASDataController+Subclasses.h b/AsyncDisplayKit/Details/ASDataController+Subclasses.h index d837540362..099a9bfe45 100644 --- a/AsyncDisplayKit/Details/ASDataController+Subclasses.h +++ b/AsyncDisplayKit/Details/ASDataController+Subclasses.h @@ -128,28 +128,6 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (void)willDeleteSections:(NSIndexSet *)sections; -/** - * Notifies the subclass to perform any work needed before the given sections will be reloaded. - * - * @discussion This method will be performed before the data controller enters its editing queue, usually on the main - * thread. The data source is locked at this point and accessing it is safe. Use this method to set up any nodes or - * data stores before entering into editing the backing store on a background thread. - * - * @param sections Indices of sections to be reloaded - */ -- (void)prepareForReloadSections:(NSIndexSet *)sections; - -/** - * Notifies the subclass that the data controller will reload the sections in the given index set - * - * @discussion This method will be performed on the data controller's editing background queue before the parent's - * concrete implementation. This is a great place to perform any additional transformations like supplementary views - * or header/footer nodes. - * - * @param sections Indices of sections to be reloaded - */ -- (void)willReloadSections:(NSIndexSet *)sections; - /** * Notifies the subclass that the data controller will move a section to a new position * @@ -206,26 +184,4 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (void)willDeleteRowsAtIndexPaths:(NSArray *)indexPaths; -/** - * Notifies the subclass to perform any work needed before the given rows will be reloaded. - * - * @discussion This method will be performed before the data controller enters its editing queue, usually on the main - * thread. The data source is locked at this point and accessing it is safe. Use this method to set up any nodes or - * data stores before entering into editing the backing store on a background thread. - * - * @param indexPaths Index paths for the rows to be reloaded. - */ -- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths; - -/** - * Notifies the subclass that the data controller will reload the rows at the given index paths. - * - * @discussion This method will be performed on the data controller's editing background queue before the parent's - * concrete implementation. This is a great place to perform any additional transformations like supplementary views - * or header/footer nodes. - * - * @param indexPaths Index paths for the rows to be reloaded. - */ -- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths; - @end diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 86967fc99a..f9a890e609 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -65,6 +65,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; if (!(self = [super init])) { return nil; } + ASDisplayNodeAssert(![self isMemberOfClass:[ASDataController class]], @"ASDataController is an abstract class and should not be instantiated. Instantiate a subclass instead."); _completedNodes = [NSMutableDictionary dictionary]; _editingNodes = [NSMutableDictionary dictionary]; @@ -142,8 +143,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_layoutNode:(ASCellNode *)node withConstrainedSize:(ASSizeRange)constrainedSize { - CGSize size = [node measureWithSizeRange:constrainedSize].size; - node.frame = { .size = size }; + CGRect frame = CGRectZero; + frame.size = [node measureWithSizeRange:constrainedSize].size; + node.frame = frame; } /** @@ -661,29 +663,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)reloadSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - [self performEditCommandWithBlock:^{ - ASDisplayNodeAssertMainThread(); - LOG(@"Edit Command - reloadSections: %@", sections); - - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - - NSArray *contexts= [self _populateFromDataSourceWithSectionIndexSet:sections]; - - [self prepareForReloadSections:sections]; - - [_editingTransactionQueue addOperationWithBlock:^{ - [self willReloadSections:sections]; - - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(_editingNodes[ASDataControllerRowNodeKind], sections); - - LOG(@"Edit Transaction - reloadSections: updatedIndexPaths: %@, indexPaths: %@, _editingNodes: %@", updatedIndexPaths, indexPaths, ASIndexPathsForTwoDimensionalArray(_editingNodes[ASDataControllerRowNodeKind])); - - [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - - // reinsert the elements - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; - }]; + ASDisplayNodeAssert(NO, @"ASDataController does not support %@. Call this on ASChangeSetDataController the reload will be broken into delete & insert.", NSStringFromSelector(_cmd)); } - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions @@ -746,16 +726,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; // Optional template hook for subclasses (See ASDataController+Subclasses.h) } -- (void)prepareForReloadSections:(NSIndexSet *)sections -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - -- (void)willReloadSections:(NSIndexSet *)sections -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { // Optional template hook for subclasses (See ASDataController+Subclasses.h) @@ -781,16 +751,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; // Optional template hook for subclasses (See ASDataController+Subclasses.h) } -- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - -- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths -{ - // Optional template hook for subclasses (See ASDataController+Subclasses.h) -} - #pragma mark - Row Editing (External API) - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions @@ -853,40 +813,7 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - [self performEditCommandWithBlock:^{ - ASDisplayNodeAssertMainThread(); - LOG(@"Edit Command - reloadRows: %@", indexPaths); - - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - - NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; - - // Sort indexPath to avoid messing up the index when deleting - // FIXME: Shouldn't deletes be sorted in descending order? - NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; - - id environment = [self.environmentDelegate dataControllerEnvironment]; - ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; - - for (NSIndexPath *indexPath in sortedIndexPaths) { - ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; - ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; - [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock - indexPath:indexPath - constrainedSize:constrainedSize - environmentTraitCollection:environmentTraitCollection]]; - } - - [self prepareForReloadRowsAtIndexPaths:indexPaths]; - - [_editingTransactionQueue addOperationWithBlock:^{ - [self willReloadRowsAtIndexPaths:indexPaths]; - - LOG(@"Edit Transaction - reloadRows: %@", indexPaths); - [self _deleteNodesAtIndexPaths:sortedIndexPaths withAnimationOptions:animationOptions]; - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; - }]; + ASDisplayNodeAssert(NO, @"ASDataController does not support %@. Call this on ASChangeSetDataController and the reload will be broken into delete & insert.", NSStringFromSelector(_cmd)); } - (void)relayoutAllNodes @@ -923,8 +850,9 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; for (ASCellNode *node in section) { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex]; ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; - CGSize size = [node measureWithSizeRange:constrainedSize].size; - node.frame = { .size = size }; + CGRect frame = CGRectZero; + frame.size = [node measureWithSizeRange:constrainedSize].size; + node.frame = frame; rowIndex += 1; } sectionIndex += 1; diff --git a/AsyncDisplayKit/Details/ASDelegateProxy.m b/AsyncDisplayKit/Details/ASDelegateProxy.m index b1f3310736..13c0d211c9 100644 --- a/AsyncDisplayKit/Details/ASDelegateProxy.m +++ b/AsyncDisplayKit/Details/ASDelegateProxy.m @@ -118,6 +118,15 @@ return self; } +- (BOOL)conformsToProtocol:(Protocol *)aProtocol +{ + if (_target) { + return [_target conformsToProtocol:aProtocol]; + } else { + return [super conformsToProtocol:aProtocol]; + } +} + - (BOOL)respondsToSelector:(SEL)aSelector { if ([self interceptsSelector:aSelector]) { diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index e267de1e8a..dd95c2e107 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -157,6 +157,10 @@ ASDISPLAYNODE_EXTERN_C_END ASDN::MutexLocker l(lock);\ ASEnvironmentTraitCollection oldTraits = self.environmentState.environmentTraitCollection;\ [super setEnvironmentState:environmentState];\ +\ + /* Extra Trait Collection Handling */\ + /* If the node is not loaded yet don't do anything as otherwise the access of the view will trigger a load*/\ + if (!self.isNodeLoaded) { return; } \ ASEnvironmentTraitCollection currentTraits = environmentState.environmentTraitCollection;\ if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(currentTraits, oldTraits) == NO) {\ /* Must dispatch to main for self.view && [self.view.dataController completedNodes]*/ \ diff --git a/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/AsyncDisplayKit/Details/ASFlowLayoutController.mm index cb754bb9bf..ffd553ba96 100644 --- a/AsyncDisplayKit/Details/ASFlowLayoutController.mm +++ b/AsyncDisplayKit/Details/ASFlowLayoutController.mm @@ -92,12 +92,12 @@ currPath.row++; // Once we reach the end of the section, advance to the next one. Keep advancing if the next section is zero-sized. - while (currPath.row >= [(NSArray *)completedNodes[currPath.section] count] && currPath.section < completedNodes.count - 1) { + while (currPath.row >= [(NSArray *)completedNodes[currPath.section] count] && currPath.section < endPath.section) { currPath.row = 0; currPath.section++; - ASDisplayNodeAssert(currPath.section <= endPath.section, @"currPath should never reach a further section than endPath"); } } + ASDisplayNodeAssert(currPath.section <= endPath.section, @"currPath should never reach a further section than endPath"); [indexPathSet addObject:[NSIndexPath indexPathWithASIndexPath:endPath]]; diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h new file mode 100644 index 0000000000..179e685639 --- /dev/null +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h @@ -0,0 +1,25 @@ +// +// NSIndexSet+ASHelpers.h +// AsyncDisplayKit +// +// Created by Adlai Holler on 6/23/16. +// Copyright © 2016 Facebook. All rights reserved. +// + +#import + +@interface NSIndexSet (ASHelpers) + +- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger idx))block; + +- (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes; + +/// Returns all the item indexes from the given index paths that are in the given section. ++ (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section; + +/// If you've got an old index, and you insert items using this index set, this returns the change to get to the new index. +- (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index; + +- (NSString *)as_smallDescription; + +@end diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m new file mode 100644 index 0000000000..fa636ad8c8 --- /dev/null +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -0,0 +1,76 @@ +// +// NSIndexSet+ASHelpers.m +// AsyncDisplayKit +// +// Created by Adlai Holler on 6/23/16. +// Copyright © 2016 Facebook. All rights reserved. +// + +#import + +#import "NSIndexSet+ASHelpers.h" + +@implementation NSIndexSet (ASHelpers) + +- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger))block +{ + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + [self enumerateIndexesUsingBlock:^(NSUInteger idx, __unused BOOL * _Nonnull stop) { + NSUInteger newIndex = block(idx); + if (newIndex != NSNotFound) { + [result addIndex:newIndex]; + } + }]; + return result; +} + +- (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes +{ + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + [indexes enumerateRangesInRange:range options:kNilOptions usingBlock:^(NSRange range, BOOL * _Nonnull stop) { + [result addIndexesInRange:range]; + }]; + }]; + return result; +} + ++ (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section +{ + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + for (NSIndexPath *indexPath in indexPaths) { + if (indexPath.section == section) { + [result addIndex:indexPath.item]; + } + } + return result; +} + +- (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index +{ + __block NSUInteger newIndex = index; + [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { + if (idx <= newIndex) { + newIndex += 1; + } else { + *stop = YES; + } + }]; + return newIndex - index; +} + +- (NSString *)as_smallDescription +{ + NSMutableString *result = [NSMutableString stringWithString:@"{ "]; + [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + if (range.length == 1) { + [result appendFormat:@"%lu ", (unsigned long)range.location]; + } else { + [result appendFormat:@"%lu-%lu ", (unsigned long)range.location, (unsigned long)NSMaxRange(range)]; + } + }]; + [result appendString:@"}"]; + return result; +} + +@end diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index 6ec3b4ca75..755d82004d 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -13,6 +13,8 @@ #import #import +NS_ASSUME_NONNULL_BEGIN + typedef NSUInteger ASDataControllerAnimationOptions; typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @@ -21,6 +23,8 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { _ASHierarchyChangeTypeInsert }; +NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); + @interface _ASHierarchySectionChange : NSObject // FIXME: Generalize this to `changeMetadata` dict? @@ -34,11 +38,11 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @property (nonatomic, readonly) ASDataControllerAnimationOptions animationOptions; /// Index paths are sorted descending for changeType .Delete, ascending otherwise -@property (nonatomic, strong, readonly) NSArray *indexPaths; +@property (nonatomic, strong, readonly) NSArray *indexPaths; @property (nonatomic, readonly) _ASHierarchyChangeType changeType; -+ (NSDictionary *)sectionToIndexSetMapFromChanges:(NSArray *)changes ofType:(_ASHierarchyChangeType)changeType; ++ (NSDictionary *)sectionToIndexSetMapFromChanges:(NSArray<_ASHierarchyItemChange *> *)changes ofType:(_ASHierarchyChangeType)changeType; @end @interface _ASHierarchyChangeSet : NSObject @@ -47,8 +51,6 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @property (nonatomic, strong, readonly) NSIndexSet *deletedSections; /// @precondition The change set must be completed. @property (nonatomic, strong, readonly) NSIndexSet *insertedSections; -/// @precondition The change set must be completed. -@property (nonatomic, strong, readonly) NSIndexSet *reloadedSections; /** Get the section index after the update for the given section before the update. @@ -56,11 +58,12 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @precondition The change set must be completed. @returns The new section index, or NSNotFound if the given section was deleted. */ -- (NSInteger)newSectionForOldSection:(NSInteger)oldSection; +- (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection; @property (nonatomic, readonly) BOOL completed; /// Call this once the change set has been constructed to prevent future modifications to the changeset. Calling this more than once is a programmer error. +/// NOTE: Calling this method will cause the changeset to convert all reloads into delete/insert pairs. - (void)markCompleted; /** @@ -77,13 +80,18 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { - Inserted sections, ascending order - Inserted items, ascending order */ -- (NSArray /*<_ASHierarchySectionChange *>*/ *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; -- (NSArray /*<_ASHierarchyItemChange *>*/ *)itemChangesOfType:(_ASHierarchyChangeType)changeType; +- (nullable NSArray <_ASHierarchySectionChange *> *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; +- (nullable NSArray <_ASHierarchyItemChange *> *)itemChangesOfType:(_ASHierarchyChangeType)changeType; + +/// Returns all item indexes affected by changes of the given type in the given section. +- (NSIndexSet *)indexesForItemChangesOfType:(_ASHierarchyChangeType)changeType inSection:(NSUInteger)section; - (void)deleteSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; - (void)insertSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; - (void)reloadSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; -- (void)insertItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; -- (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; -- (void)reloadItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)insertItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)reloadItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; @end + +NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index c89fc99332..d1b54438a0 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -12,6 +12,22 @@ #import "_ASHierarchyChangeSet.h" #import "ASInternalHelpers.h" +#import "NSIndexSet+ASHelpers.h" +#import "ASAssert.h" + +NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) +{ + switch (changeType) { + case _ASHierarchyChangeTypeInsert: + return @"Insert"; + case _ASHierarchyChangeTypeDelete: + return @"Delete"; + case _ASHierarchyChangeTypeReload: + return @"Reload"; + default: + return @"(invalid)"; + } +} @interface _ASHierarchySectionChange () - (instancetype)initWithChangeType:(_ASHierarchyChangeType)changeType indexSet:(NSIndexSet *)indexSet animationOptions:(ASDataControllerAnimationOptions)animationOptions; @@ -23,7 +39,7 @@ + (void)sortAndCoalesceChanges:(NSMutableArray *)changes; /// Returns all the indexes from all the `indexSet`s of the given `_ASHierarchySectionChange` objects. -+ (NSMutableIndexSet *)allIndexesInChanges:(NSArray *)changes; ++ (NSMutableIndexSet *)allIndexesInSectionChanges:(NSArray *)changes; @end @interface _ASHierarchyItemChange () @@ -38,12 +54,12 @@ @interface _ASHierarchyChangeSet () -@property (nonatomic, strong, readonly) NSMutableArray *insertItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray *deleteItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray *reloadItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray *insertSectionChanges; -@property (nonatomic, strong, readonly) NSMutableArray *deleteSectionChanges; -@property (nonatomic, strong, readonly) NSMutableArray *reloadSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *insertItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *deleteItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *reloadItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *insertSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *deleteSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *reloadSectionChanges; @end @@ -103,21 +119,27 @@ } } -- (NSInteger)newSectionForOldSection:(NSInteger)oldSection +- (NSIndexSet *)indexesForItemChangesOfType:(_ASHierarchyChangeType)changeType inSection:(NSUInteger)section { + [self _ensureCompleted]; + NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; + for (_ASHierarchyItemChange *change in [self itemChangesOfType:changeType]) { + [result addIndexes:[NSIndexSet as_indexSetFromIndexPaths:change.indexPaths inSection:section]]; + } + return result; +} + +- (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection +{ + ASDisplayNodeAssertNotNil(_deletedSections, @"Cannot call %@ before `markCompleted` returns.", NSStringFromSelector(_cmd)); + ASDisplayNodeAssertNotNil(_insertedSections, @"Cannot call %@ before `markCompleted` returns.", NSStringFromSelector(_cmd)); [self _ensureCompleted]; if ([_deletedSections containsIndex:oldSection]) { return NSNotFound; } - __block NSInteger newIndex = oldSection - [_deletedSections countOfIndexesInRange:NSMakeRange(0, oldSection)]; - [_insertedSections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= newIndex) { - newIndex += 1; - } else { - *stop = YES; - } - }]; + NSUInteger newIndex = oldSection - [_deletedSections countOfIndexesInRange:NSMakeRange(0, oldSection)]; + newIndex += [_insertedSections as_indexChangeByInsertingItemsBelowIndex:newIndex]; return newIndex; } @@ -180,42 +202,42 @@ - (void)_sortAndCoalesceChangeArrays { @autoreleasepool { + + // Split reloaded sections into [delete(oldIndex), insert(newIndex)] + + // Give these their "pre-reloads" values. Once we add in the reloads we'll re-process them. + _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; + _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; + + for (_ASHierarchySectionChange *change in _reloadSectionChanges) { + NSIndexSet *newSections = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { + NSUInteger newSec = [self newSectionForOldSection:idx]; + NSAssert(newSec != NSNotFound, @"Request to reload deleted section %lu", (unsigned long)idx); + return newSec; + }]; + + _ASHierarchySectionChange *deleteChange = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexSet:change.indexSet animationOptions:change.animationOptions]; + [_deleteSectionChanges addObject:deleteChange]; + + _ASHierarchySectionChange *insertChange = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexSet:newSections animationOptions:change.animationOptions]; + [_insertSectionChanges addObject:insertChange]; + } + + _reloadSectionChanges = nil; + [_ASHierarchySectionChange sortAndCoalesceChanges:_deleteSectionChanges]; [_ASHierarchySectionChange sortAndCoalesceChanges:_insertSectionChanges]; - [_ASHierarchySectionChange sortAndCoalesceChanges:_reloadSectionChanges]; + _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; + _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; - _deletedSections = [[_ASHierarchySectionChange allIndexesInChanges:_deleteSectionChanges] copy]; - _insertedSections = [[_ASHierarchySectionChange allIndexesInChanges:_insertSectionChanges] copy]; - _reloadedSections = [[_ASHierarchySectionChange allIndexesInChanges:_reloadSectionChanges] copy]; - - // These are invalid old section indexes. - NSMutableIndexSet *deletedOrReloaded = [_deletedSections mutableCopy]; - [deletedOrReloaded addIndexes:_reloadedSections]; - - // These are invalid new section indexes. - NSMutableIndexSet *insertedOrReloaded = [_insertedSections mutableCopy]; - - // Get the new section that each reloaded section index corresponds to. - // Coalesce reload sections' indexes into deletes and inserts - [_reloadedSections enumerateIndexesUsingBlock:^(NSUInteger oldIndex, __unused BOOL * stop) { - NSUInteger newIndex = [self newSectionForOldSection:oldIndex]; - if (newIndex != NSNotFound) { - [insertedOrReloaded addIndex:newIndex]; - } - [deletedOrReloaded addIndex:oldIndex]; - }]; - - _deletedSections = deletedOrReloaded; - _insertedSections = insertedOrReloaded; - _reloadedSections = nil; - - // reload items changes need to be adjusted so that we access the correct indexPaths in the datasource + // Split reloaded items into [delete(oldIndexPath), insert(newIndexPath)] + NSDictionary *insertedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_insertItemChanges ofType:_ASHierarchyChangeTypeInsert]; NSDictionary *deletedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_deleteItemChanges ofType:_ASHierarchyChangeTypeDelete]; for (_ASHierarchyItemChange *change in _reloadItemChanges) { NSAssert(change.changeType == _ASHierarchyChangeTypeReload, @"It must be a reload change to be in here"); - NSMutableArray *newIndexPaths = [NSMutableArray array]; + NSMutableArray *newIndexPaths = [NSMutableArray arrayWithCapacity:change.indexPaths.count]; // Every indexPaths in the change need to update its section and/or row // depending on all the deletions and insertions @@ -223,39 +245,21 @@ // - delete/reload indexPaths that are passed in should all be their current indexPaths // - insert indexPaths that are passed in should all be their future indexPaths after deletions for (NSIndexPath *indexPath in change.indexPaths) { - __block NSUInteger section = indexPath.section; - __block NSUInteger row = indexPath.row; - - - // Update section number based on section insertions/deletions that are above the current section - section -= [_deletedSections countOfIndexesInRange:NSMakeRange(0, section)]; - [_insertedSections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= section) { - section += 1; - } else { - *stop = YES; - } - }]; + NSUInteger section = [self newSectionForOldSection:indexPath.section]; + NSUInteger item = indexPath.item; // Update row number based on deletions that are above the current row in the current section NSIndexSet *indicesDeletedInSection = deletedIndexPathsMap[@(indexPath.section)]; - row -= [indicesDeletedInSection countOfIndexesInRange:NSMakeRange(0, row)]; + item -= [indicesDeletedInSection countOfIndexesInRange:NSMakeRange(0, item)]; // Update row number based on insertions that are above the current row in the future section NSIndexSet *indicesInsertedInSection = insertedIndexPathsMap[@(section)]; - [indicesInsertedInSection enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= row) { - row += 1; - } else { - *stop = YES; - } - }]; + item += [indicesInsertedInSection as_indexChangeByInsertingItemsBelowIndex:item]; - //TODO: reuse the old indexPath object if section and row aren't changed - NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:row inSection:section]; + NSIndexPath *newIndexPath = [NSIndexPath indexPathForItem:item inSection:section]; [newIndexPaths addObject:newIndexPath]; } - // All reload changes are coalesced into deletes and inserts + // All reload changes are translated into deletes and inserts // We delete the items that needs reload together with other deleted items, at their original index _ASHierarchyItemChange *deleteItemChangeFromReloadChange = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexPaths:change.indexPaths animationOptions:change.animationOptions presorted:NO]; [_deleteItemChanges addObject:deleteItemChangeFromReloadChange]; @@ -263,16 +267,20 @@ _ASHierarchyItemChange *insertItemChangeFromReloadChange = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexPaths:newIndexPaths animationOptions:change.animationOptions presorted:NO]; [_insertItemChanges addObject:insertItemChangeFromReloadChange]; } - [_reloadItemChanges removeAllObjects]; + _reloadItemChanges = nil; // Ignore item deletes in reloaded/deleted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:deletedOrReloaded]; + [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:_deletedSections]; // Ignore item inserts in reloaded(new)/inserted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_insertItemChanges ignoringChangesInSections:insertedOrReloaded]; + [_ASHierarchyItemChange sortAndCoalesceChanges:_insertItemChanges ignoringChangesInSections:_insertedSections]; } } +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@ %p: deletedSections=%@, insertedSections=%@, deletedItems=%@, insertedItems=%@>", NSStringFromClass(self.class), self, _deletedSections, _insertedSections, _deleteItemChanges, _insertItemChanges]; +} @end @@ -283,6 +291,7 @@ { self = [super init]; if (self) { + ASDisplayNodeAssert(indexSet.count > 0, @"Request to create _ASHierarchySectionChange with no sections!"); _changeType = changeType; _indexSet = indexSet; _animationOptions = animationOptions; @@ -346,7 +355,7 @@ [changes setArray:result]; } -+ (NSMutableIndexSet *)allIndexesInChanges:(NSArray *)changes ++ (NSMutableIndexSet *)allIndexesInSectionChanges:(NSArray<_ASHierarchySectionChange *> *)changes { NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet]; for (_ASHierarchySectionChange *change in changes) { @@ -355,6 +364,11 @@ return indexes; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: anim=%lu, type=%@, indexes=%@>", NSStringFromClass(self.class), (unsigned long)_animationOptions, NSStringFromASHierarchyChangeType(_changeType), [self.indexSet as_smallDescription]]; +} + @end @implementation _ASHierarchyItemChange @@ -363,6 +377,7 @@ { self = [super init]; if (self) { + ASDisplayNodeAssert(indexPaths.count > 0, @"Request to create _ASHierarchyItemChange with no items!"); _changeType = changeType; if (presorted) { _indexPaths = indexPaths; @@ -387,9 +402,9 @@ NSNumber *sectionKey = @(indexPath.section); NSMutableIndexSet *indexSet = sectionToIndexSetMap[sectionKey]; if (indexSet) { - [indexSet addIndex:indexPath.row]; + [indexSet addIndex:indexPath.item]; } else { - indexSet = [NSMutableIndexSet indexSetWithIndex:indexPath.row]; + indexSet = [NSMutableIndexSet indexSetWithIndex:indexPath.item]; sectionToIndexSetMap[sectionKey] = indexSet; } } @@ -397,7 +412,7 @@ return sectionToIndexSetMap; } -+ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)sections ++ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)ignoredSections { if (changes.count < 1) { return; @@ -411,12 +426,9 @@ // All changed index paths, sorted NSMutableArray *allIndexPaths = [NSMutableArray new]; - NSPredicate *indexPathInValidSection = [NSPredicate predicateWithBlock:^BOOL(NSIndexPath *indexPath, __unused NSDictionary *_) { - return ![sections containsIndex:indexPath.section]; - }]; for (_ASHierarchyItemChange *change in changes) { for (NSIndexPath *indexPath in change.indexPaths) { - if ([indexPathInValidSection evaluateWithObject:indexPath]) { + if (![ignoredSections containsIndex:indexPath.section]) { animationOptions[indexPath] = @(change.animationOptions); [allIndexPaths addObject:indexPath]; } @@ -459,4 +471,9 @@ [changes setArray:result]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"<%@: anim=%lu, type=%@, indexPaths=%@>", NSStringFromClass(self.class), (unsigned long)_animationOptions, NSStringFromASHierarchyChangeType(_changeType), self.indexPaths]; +} + @end diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 6b0d1b651b..5253562d6d 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -200,4 +200,44 @@ XCTAssertTrue([(ASTextCellNodeWithSetSelectedCounter *)node setSelectedCounter] == 6, @"setSelected: should not be called on node multiple times."); } +- (void)testTuningParametersWithExplicitRangeMode +{ + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + + ASRangeTuningParameters minimumRenderParams = { .leadingBufferScreenfuls = 0.1, .trailingBufferScreenfuls = 0.1 }; + ASRangeTuningParameters minimumPreloadParams = { .leadingBufferScreenfuls = 0.1, .trailingBufferScreenfuls = 0.1 }; + ASRangeTuningParameters fullRenderParams = { .leadingBufferScreenfuls = 0.5, .trailingBufferScreenfuls = 0.5 }; + ASRangeTuningParameters fullPreloadParams = { .leadingBufferScreenfuls = 1, .trailingBufferScreenfuls = 0.5 }; + + [collectionView setTuningParameters:minimumRenderParams forRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeDisplay]; + [collectionView setTuningParameters:minimumPreloadParams forRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeFetchData]; + [collectionView setTuningParameters:fullRenderParams forRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeDisplay]; + [collectionView setTuningParameters:fullPreloadParams forRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeFetchData]; + + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(minimumRenderParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeDisplay])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(minimumPreloadParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeFetchData])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(fullRenderParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeDisplay])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(fullPreloadParams, + [collectionView tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeFetchData])); +} + +- (void)testTuningParameters +{ + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + + ASRangeTuningParameters renderParams = { .leadingBufferScreenfuls = 1.2, .trailingBufferScreenfuls = 3.2 }; + ASRangeTuningParameters preloadParams = { .leadingBufferScreenfuls = 4.3, .trailingBufferScreenfuls = 2.3 }; + + [collectionView setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeDisplay]; + [collectionView setTuningParameters:preloadParams forRangeType:ASLayoutRangeTypeFetchData]; + + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(renderParams, [collectionView tuningParametersForRangeType:ASLayoutRangeTypeDisplay])); + XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(preloadParams, [collectionView tuningParametersForRangeType:ASLayoutRangeTypeFetchData])); +} + @end diff --git a/AsyncDisplayKitTests/ASTableViewTests.m b/AsyncDisplayKitTests/ASTableViewTests.m index 7cb13fb8ca..98914d1bd4 100644 --- a/AsyncDisplayKitTests/ASTableViewTests.m +++ b/AsyncDisplayKitTests/ASTableViewTests.m @@ -128,7 +128,6 @@ return textCellNode; } - - (ASCellNodeBlock)tableView:(ASTableView *)tableView nodeBlockForRowAtIndexPath:(NSIndexPath *)indexPath { return ^{ @@ -140,12 +139,52 @@ @end +@interface ASTableViewFilledDelegate : NSObject +@end + +@implementation ASTableViewFilledDelegate + +- (ASSizeRange)tableView:(ASTableView *)tableView constrainedSizeForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return ASSizeRangeMakeExactSize(CGSizeMake(10, 42)); +} + +@end + @interface ASTableViewTests : XCTestCase @property (atomic, retain) ASTableView *testTableView; @end @implementation ASTableViewTests +- (void)testConstrainedSizeForRowAtIndexPath +{ + // Initial width of the table view is non-zero and all nodes are measured with this size. + // Any subsequence size change must trigger a relayout. + // Width and height are swapped so that a later size change will simulate a rotation + ASTestTableView *tableView = [[ASTestTableView alloc] __initWithFrame:CGRectMake(0, 0, 100, 400) + style:UITableViewStylePlain]; + + ASTableViewFilledDelegate *delegate = [ASTableViewFilledDelegate new]; + ASTableViewFilledDataSource *dataSource = [ASTableViewFilledDataSource new]; + + tableView.asyncDelegate = delegate; + tableView.asyncDataSource = dataSource; + + [tableView reloadDataImmediately]; + [tableView setNeedsLayout]; + [tableView layoutIfNeeded]; + + for (int section = 0; section < NumberOfSections; section++) { + for (int row = 0; row < NumberOfRowsPerSection; row++) { + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section]; + CGRect rect = [tableView rectForRowAtIndexPath:indexPath]; + XCTAssertEqual(rect.size.width, 100); // specified width should be ignored for table + XCTAssertEqual(rect.size.height, 42); + } + } +} + // TODO: Convert this to ARC. - (void)DISABLED_testTableViewDoesNotRetainItselfAndDelegate { diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index 5d6fa8f637..62ddffdd90 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -8,6 +8,7 @@ @import XCTest; #import +#import "ASTableViewInternal.h" // Set to 1 to use UITableView and see if the issue still exists. #define USE_UIKIT_REFERENCE 0 @@ -19,8 +20,8 @@ #define TableView ASTableView #endif -#define kInitialSectionCount 20 -#define kInitialItemCount 20 +#define kInitialSectionCount 10 +#define kInitialItemCount 10 #define kMinimumItemCount 5 #define kMinimumSectionCount 3 #define kFickleness 0.1 @@ -145,7 +146,7 @@ static volatile int32_t ASThrashTestSectionNextID = 1; } - (NSString *)description { - return [NSString stringWithFormat:@"

", (unsigned long)_sectionID, (unsigned long)self.items.count]; + return [NSString stringWithFormat:@"
", (unsigned long)_sectionID, (unsigned long)self.items.count, ASThrashArrayDescription(self.items)]; } - (id)copyWithZone:(NSZone *)zone { @@ -445,17 +446,22 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; @implementation ASTableViewThrashTests { // The current update, which will be logged in case of a failure. ASThrashUpdate *_update; + BOOL _failed; } #pragma mark Overrides - (void)tearDown { + if (_failed && _update != nil) { + NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation); + } + _failed = NO; _update = nil; } // NOTE: Despite the documentation, this is not always called if an exception is caught. - (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filePath atLine:(NSUInteger)lineNumber expected:(BOOL)expected { - [self logCurrentUpdateIfNeeded]; + _failed = YES; [super recordFailureWithDescription:description inFile:filePath atLine:lineNumber expected:expected]; } @@ -477,11 +483,12 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; } ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:_update.oldData]; + ds.tableView.test_enableSuperUpdateCallLogging = YES; [self applyUpdate:_update toDataSource:ds]; [self verifyDataSource:ds]; } -- (void)DISABLED_testThrashingWildly { +- (void)testThrashingWildly { for (NSInteger i = 0; i < kThrashingIterationCount; i++) { [self setUp]; ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:[ASThrashTestSection sectionsWithCount:kInitialSectionCount]]; @@ -495,12 +502,6 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; #pragma mark Helpers -- (void)logCurrentUpdateIfNeeded { - if (_update != nil) { - NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation); - } -} - - (void)applyUpdate:(ASThrashUpdate *)update toDataSource:(ASThrashDataSource *)dataSource { TableView *tableView = dataSource.tableView; @@ -533,7 +534,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; [tableView waitUntilAllUpdatesAreCommitted]; #endif } @catch (NSException *exception) { - [self logCurrentUpdateIfNeeded]; + _failed = YES; @throw exception; } } @@ -553,7 +554,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; XCTAssertEqual([tableView rectForRowAtIndexPath:indexPath].size.height, item.rowHeight); #else ASThrashTestNode *node = (ASThrashTestNode *)[tableView nodeForRowAtIndexPath:indexPath]; - XCTAssertEqual(node.item, item); + XCTAssertEqualObjects(node.item, item, @"Wrong node at index path %@", indexPath); #endif } } diff --git a/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase b/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase index 9e8343590e..e9dc1e9cc0 100644 --- a/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase +++ b/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase @@ -1 +1 @@ -YnBsaXN0MDDUAAEAAgADAAQABQAGDfYN91gkdmVyc2lvblgkb2JqZWN0c1kkYXJjaGl2ZXJUJHRvcBIAAYagrxEDRQAHAAgADwAtAC4ALwAwADEAMgAzADQANQA2ADcAOAA5AEAARgBdAGEAaABrAG4AcQB0AHcAegB9AIAAgwCGAIkAjACPAJIAlQCYAJsAngChAKYAqgCuAMUAyADLAM4A0QDUANcA2gDdAOAA4wDmAOkA7ADvAPIA9QD4APsA/gEBAQUBHAEfASIBJQEoASsBLgExATQBNwE6AT0BQAFDAUYBSQFMAU8BUgFVAVgBXAFzAXYBeQF8AX8BggGFAYgBiwGOAZEBlAGXAZoBnQGgAaMBpgGpAawBrwG1AbkBvgHDAdsB4AHjAeYB6AHqAewB7wHyAfQB9gH5AfwB/wICAgUCBwIKA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AJERAmqAItIAjwALAJ0AkRECa4Ai0gCPAAsAoACREQJsgCLSAD0APgCjAKRfEBNBU1RocmFzaFRlc3RTZWN0aW9uogClAENfEBNBU1RocmFzaFRlc3RTZWN0aW9u0wCBAIIACwCnAKgAhYApEQGGgCfSABEACwCrADulAKwArQCuAK8AsIAqgCuALIAtgC6AENIAjwALALMAkRECbYAi0gCPAAsAtgCREQJugCLSAI8ACwC5AJERAm+AItIAjwALALwAkRECcIAi0gCPAAsAvwCREQJxgCLTAIEAggALAMIAwwCFgDARAYeAJ9IAEQALAMYAO6UAxwDIAMkAygDLgDGAMoAzgDSANYAQ0gCPAAsAzgCREQJygCLSAI8ACwDRAJERAnOAItIAjwALANQAkRECdIAi0gCPAAsA1wCREQJ1gCLSAI8ACwDaAJERAnaAItMAgQCCAAsA3QDeAIWANxEBiIAn0gARAAsA4QA7pQDiAOMA5ADlAOaAOIA5gDqAO4A8gBDSAI8ACwDpAJERAneAItIAjwALAOwAkRECeIAi0gCPAAsA7wCREQJ5gCLSAI8ACwDyAJERAnqAItIAjwALAPUAkRECe4Ai0wCBAIIACwD4APkAhYA+EQGJgCfSABEACwD8ADulAP0A/gD/AQABAYA/gECAQYBCgEOAENIAjwALAQQAkRECfIAi0gCPAAsBBwCREQJ9gCLSAI8ACwEKAJERAn6AItIAjwALAQ0AkRECf4Ai0gCPAAsBEACREQKAgCLSAD0APgBCAROiAEIAQ9IAEQALARUAO6QBFgEXARgBGYBGgEmAUIBSgBDTAIEAggALARwAqACFgEeAJ9IAEQALAR8AO6YArACtAK4BIwCvALCAKoArgCyASIAtgC6AENIAjwALASgAkREChoAi0wCBAIIACwErASwAhYBKEQGZgCfSABEACwEvADulATABMQEyATMBNIBLgEyATYBOgE+AENIAjwALATcAkRECgYAi0gCPAAsBOgCREQKCgCLSAI8ACwE9AJERAoOAItIAjwALAUAAkREChIAi0gCPAAsBQwCREQKFgCLTAIEAggALAUYA3gCFgFGAJ9IAEQALAUkAO6UA4gDjAOQA5QDmg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EAUZBRwFHgUnBT0FQgVYBWUFZwVqBWwFdQWABYIFhAWGBYgFigWMBZUFmAWaBaMFpgWoBbEFtAW2Bb8FwgXEBc0F0AXSBd8F4QXkBeYF7wX6BfwF/gYABgIGBAYGBg8GEgYUBh0GIAYiBisGLgYwBjkGPAY+BkcGSgZMBlkGWwZeBmAGaQZ0BnYGeAZ6BnwGfgaABokGjAaOBpcGmgacBqUGqAaqBrMGtga4BsEGxAbGBtMG1QbYBtoG4wbuBvAG8gb0BvYG+Ab6BwMHBgcIBxEHFAcWBx8HIgckBy0HMAcyBzsHPgdAB0kHTgdXB2AHYgdkB2YHaAdqB3cHeQd7B4QHkQeTB5UHlweZB5sHnQefB6gHqwetB7oHvAe/B8EHygfVB9cH2QfbB90H3wfhB+oH7QfvB/gH+wf9CAYICQgLCBQIFwgZCCIIJQgnCDQINgg4CEEITAhOCFAIUghUCFYIWAhlCGcIaQhyCH8IgQiDCIUIhwiJCIsIjQiWCJkImwikCKYIrwi6CLwIvgjACMIIxAjGCM8I0QjaCNwI5QjnCPAI8gj7CP0JBgkRCRMJFQkXCRkJGwkdCSYJKAkxCTMJPAk+CUcJSQlSCVQJXQlmCWgJaglsCW4JcAl5CXwJfgmACYkJigmMCZUJlgmYCaEJpAmmCagJuQm7CcQJxwnJCcsJ1AnhCeYJ8wn8CgsKEAofCjEKNgo7AAAAAAAAAgIAAAAAAAABrAAAAAAAAAAAAAAAAAAACj0= \ No newline at end of file diff --git a/README.md b/README.md index 10f28e5005..812826197f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-59C939.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/facebook/AsyncDisplayKit.svg)](https://travis-ci.org/facebook/AsyncDisplayKit) [![License](https://img.shields.io/cocoapods/l/AsyncDisplayKit.svg)](https://github.com/facebook/AsyncDisplayKit/blob/master/LICENSE) - + AsyncDisplayKit is an iOS framework that keeps even the most complex user interfaces smooth and responsive. It was originally built to make Facebook's @@ -18,14 +18,14 @@ interfaces smooth and responsive. It was originally built to make Facebook's [pop](https://github.com/facebook/pop)'s physics-based animations — but it's just as powerful with UIKit Dynamics and conventional app designs. -### Quick start +### Quick start ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: ```ruby pod 'AsyncDisplayKit' ``` - + (ASDK can also be used as a regular static library: Copy the project to your codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace. Add `libAsyncDisplayKit.a`, MapKit, AssetsLibrary, and Photos to the "Link Binary With @@ -46,7 +46,7 @@ CALayers: You can construct entire node hierarchies in parallel, or instantiate and size a single node on a background thread — for example, you could do -something like this in a UIViewController: +something like this in a UIViewController: ```objective-c dispatch_async(_backgroundQueue, ^{ diff --git a/build.sh b/build.sh index 02a2ddb4ab..e6f1f0566f 100755 --- a/build.sh +++ b/build.sh @@ -36,6 +36,46 @@ if [ "$MODE" = "tests" ]; then exit 0 fi +if [ "$MODE" = "examples" ]; then + echo "Verifying that all AsyncDisplayKit examples compile." + + for example in examples/*/; do + echo "Building (examples) $example." + + if [ -f "${example}/Podfile" ]; then + echo "Using CocoaPods" + pod install --project-directory=$example + + set -o pipefail && xcodebuild \ + -workspace "${example}/Sample.xcworkspace" \ + -scheme Sample \ + -sdk "$SDK" \ + -destination "$PLATFORM" \ + -derivedDataPath ~/ \ + build | xcpretty $FORMATTER + elif [ -f "${example}/Cartfile" ]; then + echo "Using Carthage" + local_repo=`pwd` + current_branch=`git rev-parse --abbrev-ref HEAD` + cd $example + + echo "git \"file://${local_repo}\" \"${current_branch}\"" > "Cartfile" + carthage update --platform iOS + + set -o pipefail && xcodebuild \ + -project "Sample.xcodeproj" \ + -scheme Sample \ + -sdk "$SDK" \ + -destination "$PLATFORM" \ + build | xcpretty $FORMATTER + + cd ../.. + fi + done + trap - EXIT + exit 0 +fi + if [ "$MODE" = "examples-pt1" ]; then echo "Verifying that all AsyncDisplayKit examples compile." From 01fed69b264a1e118c9cc8e05e907d39adb1036c Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Tue, 28 Jun 2016 16:41:57 -0700 Subject: [PATCH 057/247] Adds trampoline for inserting and deletion of nodes Currently measurement always needs to happen on the main thread if implicit hierarchy management is enabled as adding and removing from nodes needs to happen on the main thread. We now will trampoline to the main thread to do the insertion and deletion of nodes. This also resolves the issue that can occur if a node is already loaded deep in the layout hierarchy in the layout that the node is transforming to. Before insertion or deletion is happening we need to crawl the layout hierarchy to check that though. --- AsyncDisplayKit/ASDisplayNode.mm | 52 ++++++++---- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 5 ++ AsyncDisplayKit/Layout/ASLayoutable.h | 8 ++ .../Private/ASDisplayNodeInternal.h | 1 + AsyncDisplayKit/Private/ASLayoutTransition.h | 37 +++++++- AsyncDisplayKit/Private/ASLayoutTransition.mm | 39 +++++++++ .../ASDisplayNodeImplicitHierarchyTests.m | 84 +++++++++++++++++++ 7 files changed, 206 insertions(+), 20 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index cf38ddd804..ce0eb1edb5 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -15,6 +15,7 @@ #import #import +#import #import "_ASAsyncTransaction.h" #import "_ASAsyncTransactionContainer+Private.h" @@ -626,7 +627,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) if (! [self shouldMeasureWithSizeRange:constrainedSize]) { return _layout; } - + [self cancelLayoutTransitionsInProgress]; ASLayout *previousLayout = _layout; @@ -637,13 +638,14 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) pendingLayout:newLayout previousLayout:previousLayout]; } else { - ASLayoutTransition *layoutContext; + ASLayoutTransition *layoutTransition = nil; if (self.usesImplicitHierarchyManagement) { - layoutContext = [[ASLayoutTransition alloc] initWithNode:self - pendingLayout:newLayout - previousLayout:previousLayout]; + layoutTransition = [[ASLayoutTransition alloc] initWithNode:self + pendingLayout:newLayout + previousLayout:previousLayout]; } - [self applyLayout:newLayout layoutContext:layoutContext]; + + [self _applyLayout:newLayout layoutTransition:layoutTransition]; [self _completeLayoutCalculation]; } @@ -680,6 +682,11 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) return ASLayoutableTypeDisplayNode; } +- (BOOL)canLayoutAsynchronous +{ + return !self.isNodeLoaded; +} + #pragma mark - Layout Transition - (void)transitionLayoutWithAnimation:(BOOL)animated @@ -750,10 +757,10 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } ASLayout *previousLayout = _layout; - [self applyLayout:newLayout layoutContext:nil]; + [self _applyLayout:newLayout layoutTransition:nil]; ASDisplayNodePerformBlockOnEverySubnode(self, ^(ASDisplayNode * _Nonnull node) { - [node applyPendingLayoutContext]; + [node _applyPendingLayoutContext]; [node _completeLayoutCalculation]; node.hierarchyState &= (~ASHierarchyStateLayoutPending); }); @@ -776,6 +783,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) }); }; + // TODO ihm: Can we always push the measure to the background thread and remove the parameter from the API? if (shouldMeasureAsync) { ASPerformBlockOnBackgroundThread(transitionBlock); } else { @@ -838,8 +846,8 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (BOOL)_hasTransitionInProgress { - ASDN::MutexLocker l(_propertyLock); - return _transitionInProgress; + ASDN::MutexLocker l(_propertyLock); + return _transitionInProgress; } /// Starts a new transition and returns the transition id @@ -2414,16 +2422,16 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) }); } -- (void)applyPendingLayoutContext +- (void)_applyPendingLayoutContext { ASDN::MutexLocker l(_propertyLock); if (_pendingLayoutTransition) { - [self applyLayout:_pendingLayoutTransition.pendingLayout layoutContext:_pendingLayoutTransition]; + [self _applyLayout:_pendingLayoutTransition.pendingLayout layoutTransition:_pendingLayoutTransition]; _pendingLayoutTransition = nil; } } -- (void)applyLayout:(ASLayout *)layout layoutContext:(ASLayoutTransition *)layoutContext +- (void)_applyLayout:(ASLayout *)layout layoutTransition:(ASLayoutTransition *)layoutTransition { ASDN::MutexLocker l(_propertyLock); _layout = layout; @@ -2432,10 +2440,22 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) ASDisplayNodeAssertTrue(layout.size.width >= 0.0); ASDisplayNodeAssertTrue(layout.size.height >= 0.0); - if (self.usesImplicitHierarchyManagement && layoutContext != nil) { - [layoutContext applySubnodeInsertions]; - [layoutContext applySubnodeRemovals]; + if (layoutTransition == nil || self.usesImplicitHierarchyManagement == NO) { + return; } + + // Trampoline to the main thread if necessary + if (ASDisplayNodeThreadIsMain() == NO && layoutTransition.canTransitionAsynchronous == NO) { + + // Subnode insertions and removals need to happen always on the main thread if at least one subnode is already loaded + ASPerformBlockOnMainThread(^{ + [layoutTransition applySubnodeTransition]; + }); + + return; + } + + [layoutTransition applySubnodeTransition]; } - (void)layout diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index b0bd8ee8ed..eed668782e 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -54,6 +54,11 @@ typedef std::map, std::less> ASCh return ASLayoutableTypeLayoutSpec; } +- (BOOL)canLayoutAsynchronous +{ + return YES; +} + #pragma mark - Layout - (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize diff --git a/AsyncDisplayKit/Layout/ASLayoutable.h b/AsyncDisplayKit/Layout/ASLayoutable.h index 1199c89fdf..0f68d5e2dd 100644 --- a/AsyncDisplayKit/Layout/ASLayoutable.h +++ b/AsyncDisplayKit/Layout/ASLayoutable.h @@ -46,8 +46,16 @@ NS_ASSUME_NONNULL_BEGIN */ @protocol ASLayoutable +/** + * @abstract Returns type of layoutable + */ @property (nonatomic, readonly) ASLayoutableType layoutableType; +/** + * @abstract Returns if the layoutable can be used to layout in an asynchronous way on a background thread. + */ +@property (nonatomic, readonly) BOOL canLayoutAsynchronous; + /** * @abstract Calculate a layout based on given size range. * diff --git a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h index ee3da6b041..db6d818f7a 100644 --- a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h +++ b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h @@ -118,6 +118,7 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo ASEnvironmentState _environmentState; ASLayout *_layout; + UIEdgeInsets _hitTestSlop; NSMutableArray *_subnodes; diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.h b/AsyncDisplayKit/Private/ASLayoutTransition.h index c972f41aef..5c38a3d5cd 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.h +++ b/AsyncDisplayKit/Private/ASLayoutTransition.h @@ -18,16 +18,45 @@ @interface ASLayoutTransition : NSObject <_ASTransitionContextLayoutDelegate> +/** + * Node to apply layout transition on + */ @property (nonatomic, readonly, weak) ASDisplayNode *node; -@property (nonatomic, readonly, strong) ASLayout *pendingLayout; + +/** + * Previous layout to transition from + */ @property (nonatomic, readonly, strong) ASLayout *previousLayout; -- (instancetype)initWithNode:(ASDisplayNode *)node - pendingLayout:(ASLayout *)pendingLayout - previousLayout:(ASLayout *)previousLayout; +/** + * Pending layout to transition to + */ +@property (nonatomic, readonly, strong) ASLayout *pendingLayout; +/** + * Returns if the layout transition can happen asynchronously + */ +@property (nonatomic, readonly, assign) BOOL canTransitionAsynchronous; + +/** + * Returns a newly initialized layout transition + */ +- (instancetype)initWithNode:(ASDisplayNode *)node pendingLayout:(ASLayout *)pendingLayout previousLayout:(ASLayout *)previousLayout NS_DESIGNATED_INITIALIZER; +- (instancetype)init NS_UNAVAILABLE; + +/** + * Insert and remove subnodes that where added or removed between the previousLayout and the pendingLayout + */ +- (void)applySubnodeTransition; + +/** + * Insert all new subnodes that where added between the previous layout and the pending layout + */ - (void)applySubnodeInsertions; +/** + * Remove all subnodes that are removed between the previous layout and the pending layout + */ - (void)applySubnodeRemovals; @end diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index 560ac6135e..b86fe572f8 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -18,10 +18,37 @@ #import "ASLayout.h" #import +#import #import "NSArray+Diffing.h" #import "ASEqualityHelpers.h" +/** + * Search the whole layout stack if at least one layout has a layoutable object that can not be layed out asynchronous. + * This can be the case for example if a node was already loaded + */ +static BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { + // Queue used to keep track of sublayouts while traversing this layout in a BFS fashion. + std::queue queue; + queue.push(layout); + + while (!queue.empty()) { + layout = queue.front(); + queue.pop(); + + if (layout.layoutableObject.canLayoutAsynchronous == NO) { + return NO; + } + + // Add all sublayouts to process in next step + for (int i = 0; i < layout.sublayouts.count; i++) { + queue.push(layout.sublayouts[0]); + } + } + + return YES; +} + @implementation ASLayoutTransition { ASDN::RecursiveMutex _propertyLock; BOOL _calculatedSubnodeOperations; @@ -44,6 +71,18 @@ return self; } +- (BOOL)canTransitionAsynchronous +{ + ASDN::MutexLocker l(_propertyLock); + return ASLayoutCanTransitionAsynchronous(_pendingLayout); +} + +- (void)applySubnodeTransition +{ + [self applySubnodeInsertions]; + [self applySubnodeRemovals]; +} + - (void)applySubnodeInsertions { ASDN::MutexLocker l(_propertyLock); diff --git a/AsyncDisplayKitTests/ASDisplayNodeImplicitHierarchyTests.m b/AsyncDisplayKitTests/ASDisplayNodeImplicitHierarchyTests.m index a701fa050b..627960d12d 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeImplicitHierarchyTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeImplicitHierarchyTests.m @@ -130,4 +130,88 @@ XCTAssertEqual(node.subnodes[2], node2); } +- (void)testMeasurementInBackgroundThreadWithLoadedNode +{ + ASDisplayNode *node1 = [[ASDisplayNode alloc] init]; + ASDisplayNode *node2 = [[ASDisplayNode alloc] init]; + + ASSpecTestDisplayNode *node = [[ASSpecTestDisplayNode alloc] init]; + node.layoutSpecBlock = ^(ASDisplayNode *weakNode, ASSizeRange constrainedSize) { + ASSpecTestDisplayNode *strongNode = (ASSpecTestDisplayNode *)weakNode; + if ([strongNode.layoutState isEqualToNumber:@1]) { + return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[node1]]; + } else { + return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[node2]]; + } + }; + + // Intentionally trigger view creation + [node2 view]; + + XCTestExpectation *expectation = [self expectationWithDescription:@"Fix IHM layout also if one node is already loaded"]; + + dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ + + [node measureWithSizeRange:ASSizeRangeMake(CGSizeZero, CGSizeZero)]; + XCTAssertEqual(node.subnodes[0], node1); + + node.layoutState = @2; + [node invalidateCalculatedLayout]; + [node measureWithSizeRange:ASSizeRangeMake(CGSizeZero, CGSizeZero)]; + + // Dispatch back to the main thread to let the insertion / deletion of subnodes happening + dispatch_async(dispatch_get_main_queue(), ^{ + XCTAssertEqual(node.subnodes[0], node2); + [expectation fulfill]; + }); + }); + + [self waitForExpectationsWithTimeout:5.0 handler:^(NSError *error) { + if (error) { + NSLog(@"Timeout Error: %@", error); + } + }]; +} + +- (void)testTransitionLayoutWithAnimationWithLoadedNodes +{ + ASDisplayNode *node1 = [[ASDisplayNode alloc] init]; + ASDisplayNode *node2 = [[ASDisplayNode alloc] init]; + + ASSpecTestDisplayNode *node = [[ASSpecTestDisplayNode alloc] init]; + + node.layoutSpecBlock = ^(ASDisplayNode *weakNode, ASSizeRange constrainedSize) { + ASSpecTestDisplayNode *strongNode = (ASSpecTestDisplayNode *)weakNode; + if ([strongNode.layoutState isEqualToNumber:@1]) { + return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[node1]]; + } else { + return [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[node2]]; + } + }; + + // Intentionally trigger view creation + [node2 view]; + + XCTestExpectation *expectation = [self expectationWithDescription:@"Fix IHM layout transition also if one node is already loaded"]; + + [node measureWithSizeRange:ASSizeRangeMake(CGSizeZero, CGSizeZero)]; + XCTAssertEqual(node.subnodes[0], node1); + + node.layoutState = @2; + [node invalidateCalculatedLayout]; + [node transitionLayoutWithAnimation:YES shouldMeasureAsync:YES measurementCompletion:^{ + // Push this to the next runloop to let async insertion / removing of nodes finished before checking + dispatch_async(dispatch_get_main_queue(), ^{ + XCTAssertEqual(node.subnodes[0], node2); + [expectation fulfill]; + }); + }]; + + [self waitForExpectationsWithTimeout:5.0 handler:^(NSError *error) { + if (error) { + NSLog(@"Timeout Error: %@", error); + } + }]; +} + @end From d2d8b0a1cb2027bdcda171117ba5d6e811d02564 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Fri, 1 Jul 2016 20:11:23 -0700 Subject: [PATCH 058/247] [ASDisplayNode] Adjust behavior of -removeFromSupernode to ensure "root" nodes are removed from their superview/superlayer. This situation is relatively uncommon. If a user manually uses -[UIView addSubnode:], the convenience category method, and then calls -[ASDisplayNode removeFromSuperview] -- we would bypass performing the actual removal as no supernode pointer is set. After further consideration, the special handling here to support divergence between the supernode pointer and the view / layer hierarchy is not something we need to maintain going forward, and removing it makes addressing this easy. --- AsyncDisplayKit/ASDisplayNode.mm | 21 +++++++-------------- AsyncDisplayKit/Details/_ASDisplayView.mm | 5 +++-- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index cf38ddd804..32b1c80b6a 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1543,27 +1543,20 @@ static NSInteger incrementIfFound(NSInteger i) { __weak UIView *view = _view; __weak CALayer *layer = _layer; BOOL layerBacked = _flags.layerBacked; + BOOL isNodeLoaded = (layer != nil || view != nil); _propertyLock.unlock(); - - if (supernode == nil) { - return; - } + // Clear supernode's reference to us before removing the view from the hierarchy, as _ASDisplayView + // will trigger us to clear our _supernode pointer in willMoveToSuperview:nil. + // This may result in removing the last strong reference, triggering deallocation after this method. [supernode _removeSubnode:self]; - if (self.nodeLoaded && supernode.nodeLoaded) { - // Check to ensure that our view or layer is actually inside of our supernode; otherwise, don't remove it. - // Though _ASDisplayView decouples the supernode if it is inserted inside another view hierarchy, this is - // more difficult to guarantee with _ASDisplayLayer because CoreAnimation doesn't have a -didMoveToSuperlayer. + if (isNodeLoaded && (supernode == nil || supernode.isNodeLoaded)) { ASPerformBlockOnMainThread(^{ if (layerBacked || supernode.layerBacked) { - if (layer.superlayer == supernode.layer) { - [layer removeFromSuperlayer]; - } + [layer removeFromSuperlayer]; } else { - if (view.superview == supernode.view) { - [view removeFromSuperview]; - } + [view removeFromSuperview]; } }); } diff --git a/AsyncDisplayKit/Details/_ASDisplayView.mm b/AsyncDisplayKit/Details/_ASDisplayView.mm index ba0de48e0f..2d4deb5259 100644 --- a/AsyncDisplayKit/Details/_ASDisplayView.mm +++ b/AsyncDisplayKit/Details/_ASDisplayView.mm @@ -86,8 +86,7 @@ UIView *currentSuperview = self.superview; if (!currentSuperview && newSuperview) { self.keepalive_node = _node; - } - else if (currentSuperview && !newSuperview) { + } else if (currentSuperview && !newSuperview) { // Clearing keepalive_node may cause deallocation of the node. In this case, __exitHierarchy may not have an opportunity (e.g. _node will be cleared // by the time -didMoveToWindow occurs after this) to clear the Visible interfaceState, which we need to do before deallocation to meet an API guarantee. if (_node.inHierarchy) { @@ -95,6 +94,8 @@ } self.keepalive_node = nil; } + + ASDisplayNodeAssert(self.keepalive_node == nil || newSuperview != nil, @"Keepalive reference should not exist if there is no superview."); if (newSuperview) { ASDisplayNode *supernode = _node.supernode; From 9be2f1db4e05cfbd058ff441f8adfe4da076b133 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 29 Jun 2016 11:20:24 -0700 Subject: [PATCH 059/247] Prevent calling endUpdatesAnimated:completion: in an unbalanced way --- .../Details/ASChangeSetDataController.m | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index f6615d1bdb..3a31b8ce82 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -18,22 +18,19 @@ #import "ASDataController+Subclasses.h" -@interface ASChangeSetDataController () - -@property (nonatomic, assign) NSUInteger changeSetBatchUpdateCounter; -@property (nonatomic, strong) _ASHierarchyChangeSet *changeSet; - -@end - -@implementation ASChangeSetDataController +@implementation ASChangeSetDataController { + NSInteger _changeSetBatchUpdateCounter; + _ASHierarchyChangeSet *_changeSet; +} #pragma mark - Batching (External API) - (void)beginUpdates { ASDisplayNodeAssertMainThread(); - if (_changeSetBatchUpdateCounter == 0) { + if (_changeSetBatchUpdateCounter <= 0) { _changeSet = [_ASHierarchyChangeSet new]; + _changeSetBatchUpdateCounter = 0; } _changeSetBatchUpdateCounter++; } @@ -43,6 +40,9 @@ ASDisplayNodeAssertMainThread(); _changeSetBatchUpdateCounter--; + // Prevent calling endUpdatesAnimated:completion: in an unbalanced way + NSAssert(_changeSetBatchUpdateCounter >= 0, @"endUpdatesAnimated:completion: called without having a balanced beginUpdates call"); + if (_changeSetBatchUpdateCounter == 0) { [_changeSet markCompleted]; From 52a34db88475529a40a3fb70c51856ede1cf2545 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 30 Jun 2016 07:44:00 -0700 Subject: [PATCH 060/247] Add pending state for range mode in ASTableNode and ASCollectionNode --- AsyncDisplayKit/ASCollectionNode.h | 4 +- AsyncDisplayKit/ASCollectionNode.mm | 159 +++++++++++------- AsyncDisplayKit/ASTableNode.h | 2 +- AsyncDisplayKit/ASTableNode.mm | 88 ++++++---- .../Details/ASAbstractLayoutController.mm | 6 +- 5 files changed, 163 insertions(+), 96 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionNode.h b/AsyncDisplayKit/ASCollectionNode.h index b65c79a244..c28eae098f 100644 --- a/AsyncDisplayKit/ASCollectionNode.h +++ b/AsyncDisplayKit/ASCollectionNode.h @@ -25,11 +25,11 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout; - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout; +@property (strong, nonatomic, readonly) ASCollectionView *view; + @property (weak, nonatomic) id delegate; @property (weak, nonatomic) id dataSource; -@property (nonatomic, readonly) ASCollectionView *view; - /** * Tuning parameters for a range type in full mode. * diff --git a/AsyncDisplayKit/ASCollectionNode.mm b/AsyncDisplayKit/ASCollectionNode.mm index 2784c9a9d1..876429c3cb 100644 --- a/AsyncDisplayKit/ASCollectionNode.mm +++ b/AsyncDisplayKit/ASCollectionNode.mm @@ -12,52 +12,76 @@ #import "ASCollectionNode.h" #import "ASCollectionInternal.h" -#import "ASCollectionViewLayoutFacilitatorProtocol.h" #import "ASDisplayNode+Subclasses.h" #import "ASEnvironmentInternal.h" #import "ASInternalHelpers.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" + #include +#pragma mark - _ASCollectionPendingState + @interface _ASCollectionPendingState : NSObject @property (weak, nonatomic) id delegate; @property (weak, nonatomic) id dataSource; +@property (assign, nonatomic) ASLayoutRangeMode rangeMode; @end @implementation _ASCollectionPendingState -@end -#if 0 // This is not used yet, but will provide a way to avoid creating the view to set range values. -@implementation _ASCollectionPendingState +- (instancetype)init { - std::vector _tuningParameters; + self = [super init]; + if (self) { + _rangeMode = ASLayoutRangeModeCount; + } + return self; +} +@end + +// TODO: Add support for tuning parameters in the pending state +#if 0 // This is not used yet, but will provide a way to avoid creating the view to set range values. +@implementation _ASCollectionPendingState { + std::vector> _tuningParameters; } - (instancetype)init { - if (!(self = [super init])) { - return nil; + self = [super init]; + if (self) { + _tuningParameters = std::vector> (ASLayoutRangeModeCount, std::vector (ASLayoutRangeTypeCount)); + _rangeMode = ASLayoutRangeModeCount; } - _tuningParameters = std::vector(ASLayoutRangeTypeCount); return self; } - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType { - ASDisplayNodeAssert(rangeType < _tuningParameters.size(), @"Requesting a range that is OOB for the configured tuning parameters"); - return _tuningParameters[rangeType]; + return [self tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; } - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType { - ASDisplayNodeAssert(rangeType < _tuningParameters.size(), @"Requesting a range that is OOB for the configured tuning parameters"); - ASDisplayNodeAssert(rangeType != ASLayoutRangeTypeVisible, @"Must not set Visible range tuning parameters (always 0, 0)"); - _tuningParameters[rangeType] = tuningParameters; + return [self setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; +} + +- (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType +{ + ASDisplayNodeAssert(rangeMode < _tuningParameters.size() && rangeType < _tuningParameters[rangeMode].size(), @"Requesting a range that is OOB for the configured tuning parameters"); + return _tuningParameters[rangeMode][rangeType]; +} + +- (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType +{ + ASDisplayNodeAssert(rangeMode < _tuningParameters.size() && rangeType < _tuningParameters[rangeMode].size(), @"Setting a range that is OOB for the configured tuning parameters"); + _tuningParameters[rangeMode][rangeType] = tuningParameters; } @end #endif +#pragma mark - ASCollectionNode + @interface ASCollectionNode () { ASDN::RecursiveMutex _environmentStateLock; @@ -67,6 +91,8 @@ @implementation ASCollectionNode +#pragma mark Lifecycle + - (instancetype)init { ASDISPLAYNODE_NOT_DESIGNATED_INITIALIZER(); @@ -109,6 +135,8 @@ return nil; } +#pragma mark ASDisplayNode + - (void)didLoad { [super didLoad]; @@ -121,9 +149,39 @@ self.pendingState = nil; view.asyncDelegate = pendingState.delegate; view.asyncDataSource = pendingState.dataSource; + if (pendingState.rangeMode != ASLayoutRangeModeCount) { + [view.rangeController updateCurrentRangeWithMode:pendingState.rangeMode]; + } } } +- (ASCollectionView *)view +{ + return (ASCollectionView *)[super view]; +} + +- (void)clearContents +{ + [super clearContents]; + [self.view clearContents]; +} + +- (void)clearFetchedData +{ + [super clearFetchedData]; + [self.view clearFetchedData]; +} + +#if ASRangeControllerLoggingEnabled +- (void)visibleStateDidChange:(BOOL)isVisible +{ + [super visibleStateDidChange:isVisible]; + NSLog(@"%@ - visible: %d", self, isVisible); +} +#endif + +#pragma mark Setter / Getter + - (_ASCollectionPendingState *)pendingState { if (!_pendingState && ![self isNodeLoaded]) { @@ -171,47 +229,7 @@ } } -- (ASCollectionView *)view -{ - return (ASCollectionView *)[super view]; -} - -#if ASRangeControllerLoggingEnabled -- (void)visibleStateDidChange:(BOOL)isVisible -{ - [super visibleStateDidChange:isVisible]; - NSLog(@"%@ - visible: %d", self, isVisible); -} -#endif - -- (void)clearContents -{ - [super clearContents]; - [self.view clearContents]; -} - -- (void)clearFetchedData -{ - [super clearFetchedData]; - [self.view clearFetchedData]; -} - -- (void)beginUpdates -{ - [self.view.dataController beginUpdates]; -} - -- (void)endUpdatesAnimated:(BOOL)animated -{ - [self endUpdatesAnimated:animated completion:nil]; -} - -- (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion -{ - [self.view.dataController endUpdatesAnimated:animated completion:completion]; -} - -#pragma mark - ASCollectionView Forwards +#pragma mark ASCollectionView Forwards - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType { @@ -233,11 +251,6 @@ return [self.view.rangeController setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; } -- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode; -{ - [self.view.rangeController updateCurrentRangeWithMode:rangeMode]; -} - - (void)reloadDataWithCompletion:(void (^)())completion { [self.view reloadDataWithCompletion:completion]; @@ -253,6 +266,34 @@ [self.view reloadDataImmediately]; } +- (void)beginUpdates +{ + [self.view.dataController beginUpdates]; +} + +- (void)endUpdatesAnimated:(BOOL)animated +{ + [self endUpdatesAnimated:animated completion:nil]; +} + +- (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion +{ + [self.view.dataController endUpdatesAnimated:animated completion:completion]; +} + +#pragma mark - ASRangeControllerUpdateRangeProtocol + +- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode; +{ + if ([self pendingState]) { + _pendingState.rangeMode = rangeMode; + } else { + [self.view.rangeController updateCurrentRangeWithMode:rangeMode]; + } +} + +#pragma mark ASEnvironment + ASEnvironmentCollectionTableSetEnvironmentState(_environmentStateLock) @end diff --git a/AsyncDisplayKit/ASTableNode.h b/AsyncDisplayKit/ASTableNode.h index 795e2ef95a..4139f36f11 100644 --- a/AsyncDisplayKit/ASTableNode.h +++ b/AsyncDisplayKit/ASTableNode.h @@ -21,7 +21,7 @@ - (instancetype)init; // UITableViewStylePlain - (instancetype)initWithStyle:(UITableViewStyle)style; -@property (nonatomic, readonly) ASTableView *view; +@property (strong, nonatomic, readonly) ASTableView *view; // These properties can be set without triggering the view to be created, so it's fine to set them in -init. @property (weak, nonatomic) id delegate; diff --git a/AsyncDisplayKit/ASTableNode.mm b/AsyncDisplayKit/ASTableNode.mm index e5b09fea11..191eba6328 100644 --- a/AsyncDisplayKit/ASTableNode.mm +++ b/AsyncDisplayKit/ASTableNode.mm @@ -10,21 +10,35 @@ // of patent rights can be found in the PATENTS file in the same directory. // +#import "ASTableNode.h" +#import "ASTableViewInternal.h" #import "ASEnvironmentInternal.h" #import "ASDisplayNode+Subclasses.h" -#import "ASFlowLayoutController.h" #import "ASInternalHelpers.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" -#import "ASTableViewInternal.h" + +#pragma mark - _ASTablePendingState @interface _ASTablePendingState : NSObject @property (weak, nonatomic) id delegate; @property (weak, nonatomic) id dataSource; +@property (assign, nonatomic) ASLayoutRangeMode rangeMode; @end @implementation _ASTablePendingState +- (instancetype)init +{ + self = [super init]; + if (self) { + _rangeMode = ASLayoutRangeModeCount; + } + return self; +} + @end +#pragma mark - ASTableView + @interface ASTableNode () { ASDN::RecursiveMutex _environmentStateLock; @@ -39,6 +53,8 @@ @implementation ASTableNode +#pragma mark Lifecycle + - (instancetype)_initWithTableView:(ASTableView *)tableView { // Avoid a retain cycle. In this case, the ASTableView is creating us, and strongly retains us. @@ -72,6 +88,8 @@ return [self _initWithFrame:CGRectZero style:UITableViewStylePlain dataControllerClass:nil]; } +#pragma mark ASDisplayNode + - (void)didLoad { [super didLoad]; @@ -84,22 +102,43 @@ self.pendingState = nil; view.asyncDelegate = pendingState.delegate; view.asyncDataSource = pendingState.dataSource; + if (pendingState.rangeMode != ASLayoutRangeModeCount) { + [view.rangeController updateCurrentRangeWithMode:pendingState.rangeMode]; + } } } -- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode +- (ASTableView *)view { - if (!self.isNodeLoaded) { - return; - } - - [self.view.rangeController updateCurrentRangeWithMode:rangeMode]; + return (ASTableView *)[super view]; } +- (void)clearContents +{ + [super clearContents]; + [self.view clearContents]; +} + +- (void)clearFetchedData +{ + [super clearFetchedData]; + [self.view clearFetchedData]; +} + +#if ASRangeControllerLoggingEnabled +- (void)visibleStateDidChange:(BOOL)isVisible +{ + [super visibleStateDidChange:isVisible]; + NSLog(@"%@ - visible: %d", self, isVisible); +} +#endif + +#pragma mark Setter / Getter + - (_ASTablePendingState *)pendingState { if (!_pendingState && ![self isNodeLoaded]) { - self.pendingState = [[_ASTablePendingState alloc] init]; + _pendingState = [[_ASTablePendingState alloc] init]; } ASDisplayNodeAssert(![self isNodeLoaded] || !_pendingState, @"ASTableNode should not have a pendingState once it is loaded"); return _pendingState; @@ -143,30 +182,19 @@ } } -- (ASTableView *)view +#pragma mark ASRangeControllerUpdateRangeProtocol + +- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode { - return (ASTableView *)[super view]; + if ([self pendingState]) { + _pendingState.rangeMode = rangeMode; + } else { + ASDisplayNodeAssert([self isNodeLoaded], @"ASTableNode should be loaded if pendingState doesn't exist"); + [self.view.rangeController updateCurrentRangeWithMode:rangeMode]; + } } -#if ASRangeControllerLoggingEnabled -- (void)visibleStateDidChange:(BOOL)isVisible -{ - [super visibleStateDidChange:isVisible]; - NSLog(@"%@ - visible: %d", self, isVisible); -} -#endif - -- (void)clearContents -{ - [super clearContents]; - [self.view clearContents]; -} - -- (void)clearFetchedData -{ - [super clearFetchedData]; - [self.view clearFetchedData]; -} +#pragma mark ASEnvironment ASEnvironmentCollectionTableSetEnvironmentState(_environmentStateLock) diff --git a/AsyncDisplayKit/Details/ASAbstractLayoutController.mm b/AsyncDisplayKit/Details/ASAbstractLayoutController.mm index 9112108317..b0ef11b350 100644 --- a/AsyncDisplayKit/Details/ASAbstractLayoutController.mm +++ b/AsyncDisplayKit/Details/ASAbstractLayoutController.mm @@ -91,15 +91,13 @@ extern BOOL ASRangeTuningParametersEqualToRangeTuningParameters(ASRangeTuningPar - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - ASDisplayNodeAssert(rangeMode < _tuningParameters.size() && rangeType < _tuningParameters[rangeMode].size(), - @"Requesting a range that is OOB for the configured tuning parameters"); + ASDisplayNodeAssert(rangeMode < _tuningParameters.size() && rangeType < _tuningParameters[rangeMode].size(), @"Requesting a range that is OOB for the configured tuning parameters"); return _tuningParameters[rangeMode][rangeType]; } - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - ASDisplayNodeAssert(rangeMode < _tuningParameters.size() && rangeType < _tuningParameters[rangeMode].size(), - @"Setting a range that is OOB for the configured tuning parameters"); + ASDisplayNodeAssert(rangeMode < _tuningParameters.size() && rangeType < _tuningParameters[rangeMode].size(), @"Setting a range that is OOB for the configured tuning parameters"); _tuningParameters[rangeMode][rangeType] = tuningParameters; } From 3080ee33cf83c667f98004e9e70a8c2ca00672f9 Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Sat, 2 Jul 2016 11:45:40 -0700 Subject: [PATCH 061/247] Revert "update from master/" This reverts commit d7fde61e168b6594ca5d74836597b0aac0e83e9b. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 34 ++-- AsyncDisplayKit/ASButtonNode.mm | 9 +- AsyncDisplayKit/ASCollectionView.mm | 14 +- AsyncDisplayKit/ASDisplayNode+Subclasses.h | 7 - AsyncDisplayKit/ASDisplayNode.mm | 22 +-- AsyncDisplayKit/ASPagerNode.h | 47 ++--- AsyncDisplayKit/ASPagerNode.m | 5 - AsyncDisplayKit/ASTableView.h | 12 -- AsyncDisplayKit/ASTableView.mm | 36 +--- AsyncDisplayKit/ASTableViewInternal.h | 3 - AsyncDisplayKit/ASTextNode.mm | 42 ++--- AsyncDisplayKit/ASVideoNode.mm | 8 +- AsyncDisplayKit/ASVideoPlayerNode.h | 1 - AsyncDisplayKit/ASVideoPlayerNode.mm | 13 -- .../Details/ASChangeSetDataController.m | 26 +-- .../Details/ASCollectionDataController.mm | 48 +++++ .../Details/ASDataController+Subclasses.h | 44 +++++ AsyncDisplayKit/Details/ASDataController.mm | 90 ++++++++- AsyncDisplayKit/Details/ASDelegateProxy.m | 9 - AsyncDisplayKit/Details/ASEnvironment.h | 4 - .../Details/ASFlowLayoutController.mm | 4 +- .../Details/NSIndexSet+ASHelpers.h | 25 --- .../Details/NSIndexSet+ASHelpers.m | 76 -------- .../Private/_ASHierarchyChangeSet.h | 28 +-- .../Private/_ASHierarchyChangeSet.m | 175 ++++++++---------- AsyncDisplayKitTests/ASCollectionViewTests.m | 40 ---- AsyncDisplayKitTests/ASTableViewTests.m | 41 +--- AsyncDisplayKitTests/ASTableViewThrashTests.m | 27 ++- .../TestResources/ASThrashTestRecordedCase | 2 +- README.md | 8 +- build.sh | 40 ---- 31 files changed, 354 insertions(+), 586 deletions(-) delete mode 100644 AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h delete mode 100644 AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 0c518f3cab..62c3baffc7 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -256,9 +256,9 @@ 68355B3A1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; 68355B3B1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B3C1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; - 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; }; 68355B3E1CB57A60001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; - 68355B3F1CB57A64001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 68355B3F1CB57A64001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; }; 68355B401CB57A69001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; 68355B411CB57A6C001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68AF37DB1CBEF4D80077BF76 /* ASImageNode+AnimatedImagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */; }; @@ -368,7 +368,6 @@ 9C8898BB1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */; }; 9C8898BC1C738BA800D6B02E /* ASTextKitFontSizeAdjuster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */; }; 9C8898BD1C738BB800D6B02E /* ASTextKitFontSizeAdjuster.h in Headers */ = {isa = PBXBuildFile; fileRef = A32FEDD31C501B6A004F642A /* ASTextKitFontSizeAdjuster.h */; }; - 9CC606651D24DF9E006581A0 /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; 9CDC18CC1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CDC18CD1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CFFC6BE1CCAC52B006A6476 /* ASEnvironment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */; }; @@ -547,13 +546,10 @@ CC3B208E1C3F7D0A00798563 /* ASWeakSetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.m */; }; CC3B20901C3F892D00798563 /* ASBridgedPropertiesTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */; }; CC4981B31D1A02BE004E13CC /* ASTableViewThrashTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981B21D1A02BE004E13CC /* ASTableViewThrashTests.m */; }; - CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; - CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; CC7FD9DE1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; CC7FD9DF1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */; }; CC7FD9E11BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */; }; CC7FD9E21BB603FF005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; D785F6621A74327E00291744 /* ASScrollNode.h in Headers */ = {isa = PBXBuildFile; fileRef = D785F6601A74327E00291744 /* ASScrollNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; D785F6631A74327E00291744 /* ASScrollNode.m in Sources */ = {isa = PBXBuildFile; fileRef = D785F6611A74327E00291744 /* ASScrollNode.m */; }; DB55C2611C6408D6004EDCF5 /* _ASTransitionContext.h in Headers */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; @@ -941,8 +937,6 @@ CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASWeakSetTests.m; sourceTree = ""; }; CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASBridgedPropertiesTests.mm; sourceTree = ""; }; CC4981B21D1A02BE004E13CC /* ASTableViewThrashTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASTableViewThrashTests.m; sourceTree = ""; }; - CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSIndexSet+ASHelpers.h"; sourceTree = ""; }; - CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSIndexSet+ASHelpers.m"; sourceTree = ""; }; CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASPhotosFrameworkImageRequest.h; sourceTree = ""; }; CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPhotosFrameworkImageRequest.m; sourceTree = ""; }; CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASPhotosFrameworkImageRequestTests.m; sourceTree = ""; }; @@ -1235,8 +1229,6 @@ 058D09E1195D050800B7D73C /* Details */ = { isa = PBXGroup; children = ( - CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */, - CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */, 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */, 058D09E2195D050800B7D73C /* _ASDisplayLayer.h */, 058D09E3195D050800B7D73C /* _ASDisplayLayer.mm */, @@ -1642,7 +1634,6 @@ ACF6ED2D1B17843500DA7C62 /* ASRatioLayoutSpec.h in Headers */, AC47D9451B3BB41900AAEE9D /* ASRelativeSize.h in Headers */, 291B63FB1AA53A7A000A71B3 /* ASScrollDirection.h in Headers */, - CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */, D785F6621A74327E00291744 /* ASScrollNode.h in Headers */, 058D0A7F195D05F900B7D73C /* ASSentinel.h in Headers */, 9C8221951BA237B80037F19A /* ASStackBaselinePositionedLayout.h in Headers */, @@ -1801,7 +1792,6 @@ 254C6B741BF94DF4003EC431 /* ASTextNodeWordKerner.h in Headers */, DB55C2671C641AE4004EDCF5 /* ASContextTransitioning.h in Headers */, 68B0277B1C1A79D60041016B /* ASDisplayNode+Beta.h in Headers */, - CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */, B350622D1B010EFD0018CF92 /* ASScrollDirection.h in Headers */, 254C6B751BF94DF4003EC431 /* ASTextKitComponents.h in Headers */, B35062081B010EFD0018CF92 /* ASScrollNode.h in Headers */, @@ -1884,12 +1874,12 @@ isa = PBXNativeTarget; buildConfigurationList = 058D09D2195D04C000B7D73C /* Build configuration list for PBXNativeTarget "AsyncDisplayKitTests" */; buildPhases = ( - 2E61B6A0DB0F436A9DDBE86F /* [CP] Check Pods Manifest.lock */, + 2E61B6A0DB0F436A9DDBE86F /* 📦 Check Pods Manifest.lock */, 058D09B8195D04C000B7D73C /* Sources */, 058D09B9195D04C000B7D73C /* Frameworks */, 058D09BA195D04C000B7D73C /* Resources */, - 3B9D88CDF51B429C8409E4B6 /* [CP] Copy Pods Resources */, - B130AB1AC0A1E5162E211C19 /* [CP] Embed Pods Frameworks */, + 3B9D88CDF51B429C8409E4B6 /* 📦 Copy Pods Resources */, + B130AB1AC0A1E5162E211C19 /* 📦 Embed Pods Frameworks */, ); buildRules = ( ); @@ -1990,14 +1980,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2E61B6A0DB0F436A9DDBE86F /* [CP] Check Pods Manifest.lock */ = { + 2E61B6A0DB0F436A9DDBE86F /* 📦 Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "[CP] Check Pods Manifest.lock"; + name = "📦 Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -2005,14 +1995,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 3B9D88CDF51B429C8409E4B6 /* [CP] Copy Pods Resources */ = { + 3B9D88CDF51B429C8409E4B6 /* 📦 Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "[CP] Copy Pods Resources"; + name = "📦 Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -2020,14 +2010,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - B130AB1AC0A1E5162E211C19 /* [CP] Embed Pods Frameworks */ = { + B130AB1AC0A1E5162E211C19 /* 📦 Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "[CP] Embed Pods Frameworks"; + name = "📦 Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -2111,7 +2101,6 @@ ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.mm in Sources */, 68FC85DF1CE29AB700EDD713 /* ASNavigationController.m in Sources */, ACF6ED251B17843500DA7C62 /* ASLayout.mm in Sources */, - CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */, DB55C2631C6408D6004EDCF5 /* _ASTransitionContext.m in Sources */, 92074A631CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */, 251B8EFA1BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m in Sources */, @@ -2277,7 +2266,6 @@ CC3B208C1C3F7A5400798563 /* ASWeakSet.m in Sources */, B350621C1B010EFD0018CF92 /* ASFlowLayoutController.mm in Sources */, B350621E1B010EFD0018CF92 /* ASHighlightOverlayLayer.mm in Sources */, - 9CC606651D24DF9E006581A0 /* NSIndexSet+ASHelpers.m in Sources */, 92074A641CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */, B35062541B010EFD0018CF92 /* ASImageNode+CGExtras.m in Sources */, 68355B401CB57A69001D4E68 /* ASImageContainerProtocolCategories.m in Sources */, diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 54c30ad47e..5638e7c125 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -15,7 +15,6 @@ #import "ASBackgroundLayoutSpec.h" #import "ASInsetLayoutSpec.h" #import "ASDisplayNode+Beta.h" -#import "ASStaticLayoutSpec.h" @interface ASButtonNode () { @@ -492,13 +491,9 @@ spec = [ASInsetLayoutSpec insetLayoutSpecWithInsets:contentEdgeInsets child:spec]; } - if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO) { - stack.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(self.preferredFrameSize); - spec = [ASStaticLayoutSpec staticLayoutSpecWithChildren:@[stack]]; - } - if (_backgroundImageNode.image) { - spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec background:_backgroundImageNode]; + spec = [ASBackgroundLayoutSpec backgroundLayoutSpecWithChild:spec + background:_backgroundImageNode]; } return spec; diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index e5546436ac..e90d6e398b 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -430,22 +430,22 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType { - [_rangeController setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; + [_collectionNode setTuningParameters:tuningParameters forRangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType { - return [_rangeController tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; + return [_collectionNode tuningParametersForRangeType:rangeType]; } - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - [_rangeController setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; + [_collectionNode setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - return [_rangeController tuningParametersForRangeMode:rangeMode rangeType:rangeType]; + return [_collectionNode tuningParametersForRangeMode:rangeMode rangeType:rangeType]; } - (CGSize)calculatedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath @@ -517,21 +517,18 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)insertSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); - if (sections.count == 0) { return; } [_dataController insertSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)deleteSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); - if (sections.count == 0) { return; } [_dataController deleteSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)reloadSections:(NSIndexSet *)sections { ASDisplayNodeAssertMainThread(); - if (sections.count == 0) { return; } [_dataController reloadSections:sections withAnimationOptions:kASCollectionViewAnimationNone]; } @@ -544,21 +541,18 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)insertItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); - if (indexPaths.count == 0) { return; } [_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)deleteItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); - if (indexPaths.count == 0) { return; } [_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } - (void)reloadItemsAtIndexPaths:(NSArray *)indexPaths { ASDisplayNodeAssertMainThread(); - if (indexPaths.count == 0) { return; } [_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:kASCollectionViewAnimationNone]; } diff --git a/AsyncDisplayKit/ASDisplayNode+Subclasses.h b/AsyncDisplayKit/ASDisplayNode+Subclasses.h index 9711355757..967b82270d 100644 --- a/AsyncDisplayKit/ASDisplayNode+Subclasses.h +++ b/AsyncDisplayKit/ASDisplayNode+Subclasses.h @@ -465,13 +465,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSString *)descriptionForRecursiveDescription; -/** - * @abstract Called when the node's ASTraitCollection changes - * - * @discussion Subclasses can override this method to react to a trait collection change. - */ -- (void)asyncTraitCollectionDidChange; - @end #define ASDisplayNodeAssertThreadAffinity(viewNode) ASDisplayNodeAssert(!viewNode || ASDisplayNodeThreadIsMain() || !(viewNode).nodeLoaded, @"Incorrect display node thread affinity - this method should not be called off the main thread after the ASDisplayNode's view or layer have been created") diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index cf38ddd804..e38731e7f8 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1100,14 +1100,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) // measureWithSizeRange: on subnodes to assert. return; } - - // Handle placeholder layer creation in case the size of the node changed after the initial placeholder layer - // was created - if ([self _shouldHavePlaceholderLayer]) { - [self _setupPlaceholderLayerIfNeeded]; - } _placeholderLayer.frame = bounds; - [self layout]; [self layoutDidFinish]; } @@ -2762,12 +2755,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (void)setEnvironmentState:(ASEnvironmentState)environmentState { - ASEnvironmentTraitCollection oldTraitCollection = _environmentState.environmentTraitCollection; _environmentState = environmentState; - - if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(oldTraitCollection, _environmentState.environmentTraitCollection) == NO) { - [self asyncTraitCollectionDidChange]; - } } - (ASDisplayNode *)parent @@ -2797,10 +2785,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (void)setEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection { - if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(environmentTraitCollection, _environmentState.environmentTraitCollection) == NO) { - _environmentState.environmentTraitCollection = environmentTraitCollection; - [self asyncTraitCollectionDidChange]; - } + _environmentState.environmentTraitCollection = environmentTraitCollection; } ASEnvironmentLayoutOptionsForwarding @@ -2812,11 +2797,6 @@ ASEnvironmentLayoutExtensibilityForwarding return [ASTraitCollection traitCollectionWithASEnvironmentTraitCollection:self.environmentTraitCollection]; } -- (void)asyncTraitCollectionDidChange -{ - -} - #if TARGET_OS_TV #pragma mark - UIFocusEnvironment Protocol (tvOS) diff --git a/AsyncDisplayKit/ASPagerNode.h b/AsyncDisplayKit/ASPagerNode.h index cbef217812..2f9809da79 100644 --- a/AsyncDisplayKit/ASPagerNode.h +++ b/AsyncDisplayKit/ASPagerNode.h @@ -22,6 +22,8 @@ * This method replaces -collectionView:numberOfItemsInSection: * * @param pagerNode The sender. + * + * * @returns The total number of pages that can display in the pagerNode. */ - (NSInteger)numberOfPagesInPagerNode:(ASPagerNode *)pagerNode; @@ -32,7 +34,9 @@ * This method replaces -collectionView:nodeForItemAtIndexPath: * * @param pagerNode The sender. - * @param index The index of the requested node. + * + * @param index The index of the requested node. + * * @returns a node for display at this index. This will be called on the main thread and should * not implement reuse (it will be called once per row). Unlike UICollectionView's version, * this method is not called when the row is about to display. @@ -44,7 +48,9 @@ * This method takes precedence over pagerNode:nodeAtIndex: if implemented. * * @param pagerNode The sender. - * @param index The index of the requested node. + * + * @param index The index of the requested node. + * * @returns a block that creates the node for display at this index. * Must be thread-safe (can be called on the main thread or a background * queue) and should not implement reuse (it will be called once per row). @@ -55,7 +61,9 @@ * Provides the constrained size range for measuring the node at the index path. * * @param pagerNode The sender. + * * @param indexPath The index path of the node. + * * @returns A constrained size range for layout the node at this index path. */ - (ASSizeRange)pagerNode:(ASPagerNode *)pagerNode constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath; @@ -68,46 +76,27 @@ @interface ASPagerNode : ASCollectionNode -/** - * Configures a default horizontal, paging flow layout with 0 inter-item spacing. - */ +/// Configures a default horizontal, paging flow layout with 0 inter-item spacing. - (instancetype)init; -/** - * Initializer with custom-configured flow layout properties. - */ +/// Initializer with custom-configured flow layout properties. - (instancetype)initWithCollectionViewLayout:(ASPagerFlowLayout *)flowLayout; -/** - * Data Source is required, and uses a different protocol from ASCollectionNode. - */ +/// Data Source is required, and uses a different protocol from ASCollectionNode. - (void)setDataSource:(id )dataSource; - (id )dataSource; -/** - * Delegate is optional, and uses the same protocol as ASCollectionNode. - * This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay... - */ +// Delegate is optional, and uses the same protocol as ASCollectionNode. +// This includes UIScrollViewDelegate as well as most methods from UICollectionViewDelegate, like willDisplay... @property (nonatomic, weak) id delegate; -/** - * The underlying ASCollectionView object. - */ +/// The underlying ASCollectionView object. @property (nonatomic, readonly) ASCollectionView *view; -/** - * Returns the current page index - */ +/// Returns the current page index @property (nonatomic, assign, readonly) NSInteger currentPageIndex; -/** - * Scroll the contents of the receiver to ensure that the page is visible - */ +/// Scroll the contents of the receiver to ensure that the page is visible - (void)scrollToPageAtIndex:(NSInteger)index animated:(BOOL)animated; -/** - * Returns the node for the passed page index - */ -- (ASCellNode *)nodeForPageAtIndex:(NSInteger)index; - @end diff --git a/AsyncDisplayKit/ASPagerNode.m b/AsyncDisplayKit/ASPagerNode.m index c266ef18f3..2c6cd4b32e 100644 --- a/AsyncDisplayKit/ASPagerNode.m +++ b/AsyncDisplayKit/ASPagerNode.m @@ -98,11 +98,6 @@ [self.view scrollToItemAtIndexPath:indexPath atScrollPosition:UICollectionViewScrollPositionLeft animated:animated]; } -- (ASCellNode *)nodeForPageAtIndex:(NSInteger)index -{ - return [self.view nodeForItemAtIndexPath:[NSIndexPath indexPathForItem:index inSection:0]]; -} - #pragma mark - ASCollectionViewDataSource - (ASCellNodeBlock)collectionView:(ASCollectionView *)collectionView nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath diff --git a/AsyncDisplayKit/ASTableView.h b/AsyncDisplayKit/ASTableView.h index 06ce862606..7d36cc3d4d 100644 --- a/AsyncDisplayKit/ASTableView.h +++ b/AsyncDisplayKit/ASTableView.h @@ -433,18 +433,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (BOOL)shouldBatchFetchForTableView:(ASTableView *)tableView; -/** - * Provides the constrained size range for measuring the row at the index path. - * Note: the widths in the returned size range are ignored! - * - * @param tableView The sender. - * - * @param indexPath The index path of the node. - * - * @returns A constrained size range for layout the node at this index path. - */ -- (ASSizeRange)tableView:(ASTableView *)tableView constrainedSizeForRowAtIndexPath:(NSIndexPath *)indexPath; - /** * Informs the delegate that the table view did remove the node which was previously * at the given index path from the view hierarchy. diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index db73c8049c..8c62f23aa4 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -28,7 +28,6 @@ #import -static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; //#define LOG(...) NSLog(__VA_ARGS__) @@ -145,7 +144,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; unsigned int asyncDelegateScrollViewWillEndDraggingWithVelocityTargetContentOffset:1; unsigned int asyncDelegateTableViewWillBeginBatchFetchWithContext:1; unsigned int asyncDelegateShouldBatchFetchForTableView:1; - unsigned int asyncDelegateTableViewConstrainedSizeForRowAtIndexPath:1; } _asyncDelegateFlags; struct { @@ -166,7 +164,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; // Always set, whether ASCollectionView is created directly or via ASCollectionNode. @property (nonatomic, weak) ASTableNode *tableNode; -@property (nonatomic) BOOL test_enableSuperUpdateCallLogging; @end @implementation ASTableView @@ -338,8 +335,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; _asyncDelegateFlags.asyncDelegateShouldBatchFetchForTableView = [_asyncDelegate respondsToSelector:@selector(shouldBatchFetchForTableView:)]; _asyncDelegateFlags.asyncDelegateScrollViewWillBeginDragging = [_asyncDelegate respondsToSelector:@selector(scrollViewWillBeginDragging:)]; _asyncDelegateFlags.asyncDelegateScrollViewDidEndDragging = [_asyncDelegate respondsToSelector:@selector(scrollViewDidEndDragging:willDecelerate:)]; - _asyncDelegateFlags.asyncDelegateTableViewConstrainedSizeForRowAtIndexPath = [_asyncDelegate respondsToSelector:@selector(tableView:constrainedSizeForRowAtIndexPath:)]; - } super.delegate = (id)_proxyDelegate; @@ -479,21 +474,18 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)insertSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); - if (sections.count == 0) { return; } [_dataController insertSections:sections withAnimationOptions:animation]; } - (void)deleteSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); - if (sections.count == 0) { return; } [_dataController deleteSections:sections withAnimationOptions:animation]; } - (void)reloadSections:(NSIndexSet *)sections withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); - if (sections.count == 0) { return; } [_dataController reloadSections:sections withAnimationOptions:animation]; } @@ -506,21 +498,18 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); - if (indexPaths.count == 0) { return; } [_dataController insertRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } - (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); - if (indexPaths.count == 0) { return; } [_dataController deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation { ASDisplayNodeAssertMainThread(); - if (indexPaths.count == 0) { return; } [_dataController reloadRowsAtIndexPaths:indexPaths withAnimationOptions:animation]; } @@ -1004,9 +993,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ - if (self.test_enableSuperUpdateCallLogging) { - NSLog(@"-[super insertRowsAtIndexPaths]: %@", indexPaths); - } [super insertRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -1027,9 +1013,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ - if (self.test_enableSuperUpdateCallLogging) { - NSLog(@"-[super deleteRowsAtIndexPaths]: %@", indexPaths); - } [super deleteRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -1051,9 +1034,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ - if (self.test_enableSuperUpdateCallLogging) { - NSLog(@"-[super insertSections]: %@", indexSet); - } [super insertSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); @@ -1070,9 +1050,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL preventAnimation = animationOptions == UITableViewRowAnimationNone; ASPerformBlockWithoutAnimation(preventAnimation, ^{ - if (self.test_enableSuperUpdateCallLogging) { - NSLog(@"-[super deleteSections]: %@", indexSet); - } [super deleteSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); @@ -1111,17 +1088,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (ASSizeRange)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - ASSizeRange constrainedSize = kInvalidSizeRange; - if (_asyncDelegateFlags.asyncDelegateTableViewConstrainedSizeForRowAtIndexPath) { - ASSizeRange delegateConstrainedSize = [_asyncDelegate tableView:self constrainedSizeForRowAtIndexPath:indexPath]; - // ignore widths in the returned size range (for TableView) - constrainedSize = ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, delegateConstrainedSize.min.height), - CGSizeMake(_nodesConstrainedWidth, delegateConstrainedSize.max.height)); - } else { - constrainedSize = ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, 0), - CGSizeMake(_nodesConstrainedWidth, FLT_MAX)); - } - return constrainedSize; + return ASSizeRangeMake(CGSizeMake(_nodesConstrainedWidth, 0), + CGSizeMake(_nodesConstrainedWidth, FLT_MAX)); } - (NSUInteger)dataController:(ASDataController *)dataController rowsInSection:(NSUInteger)section diff --git a/AsyncDisplayKit/ASTableViewInternal.h b/AsyncDisplayKit/ASTableViewInternal.h index 22ac11ff7e..93cdca0fcb 100644 --- a/AsyncDisplayKit/ASTableViewInternal.h +++ b/AsyncDisplayKit/ASTableViewInternal.h @@ -34,7 +34,4 @@ */ - (instancetype)_initWithFrame:(CGRect)frame style:(UITableViewStyle)style dataControllerClass:(Class)dataControllerClass ownedByNode:(BOOL)ownedByNode; -/// Set YES and we'll log every time we call [super insertRows…] etc -@property (nonatomic) BOOL test_enableSuperUpdateCallLogging; - @end diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 3151437f55..a1e3d6c3e7 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -366,36 +366,32 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)setAttributedText:(NSAttributedString *)attributedText { + std::lock_guard l(_textLock); if (attributedText == nil) { attributedText = [[NSAttributedString alloc] initWithString:@"" attributes:nil]; } - - // Don't hold textLock for too long. - { - std::lock_guard l(_textLock); - if (ASObjectIsEqual(attributedText, _attributedText)) { - return; - } - _attributedText = ASCleanseAttributedStringOfCoreTextAttributes(attributedText); - - // Sync the truncation string with attributes from the updated _attributedString - // Without this, the size calculation of the text with truncation applied will - // not take into account the attributes of attributedText in the last line - [self _updateComposedTruncationText]; - - // We need an entirely new renderer - [self _invalidateRenderer]; + if (ASObjectIsEqual(attributedText, _attributedText)) { + return; } - - NSUInteger length = attributedText.length; - if (length > 0) { + + _attributedText = ASCleanseAttributedStringOfCoreTextAttributes(attributedText); + + if (_attributedText.length > 0) { CGFloat screenScale = ASScreenScale(); - self.ascender = round([[attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; - self.descender = round([[attributedText attribute:NSFontAttributeName atIndex:length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; + self.ascender = round([[_attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; + self.descender = round([[_attributedText attribute:NSFontAttributeName atIndex:_attributedText.length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; } + // Sync the truncation string with attributes from the updated _attributedString + // Without this, the size calculation of the text with truncation applied will + // not take into account the attributes of attributedText in the last line + [self _updateComposedTruncationText]; + + // We need an entirely new renderer + [self _invalidateRenderer]; + // Tell the display node superclasses that the cached layout is incorrect now [self invalidateCalculatedLayout]; @@ -403,8 +399,8 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // Accessiblity - self.accessibilityLabel = attributedText.string; - self.isAccessibilityElement = (length != 0); // We're an accessibility element by default if there is a string. + self.accessibilityLabel = _attributedText.string; + self.isAccessibilityElement = (_attributedText.length != 0); // We're an accessibility element by default if there is a string. } #pragma mark - Text Layout diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 13d469ea89..379a70955b 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -164,10 +164,6 @@ static NSString * const kStatus = @"status"; - (void)addPlayerItemObservers:(AVPlayerItem *)playerItem { - if (playerItem == nil) { - return; - } - [playerItem addObserver:self forKeyPath:kStatus options:NSKeyValueObservingOptionInitial | NSKeyValueObservingOptionNew context:ASVideoNodeContext]; [playerItem addObserver:self forKeyPath:kPlaybackLikelyToKeepUpKey options:NSKeyValueObservingOptionNew context:ASVideoNodeContext]; [playerItem addObserver:self forKeyPath:kplaybackBufferEmpty options:NSKeyValueObservingOptionNew context:ASVideoNodeContext]; @@ -645,9 +641,7 @@ static NSString * const kStatus = @"status"; _currentPlayerItem = currentItem; - if (currentItem != nil) { - [self addPlayerItemObservers:currentItem]; - } + [self addPlayerItemObservers:currentItem]; } - (ASDisplayNode *)playerNode diff --git a/AsyncDisplayKit/ASVideoPlayerNode.h b/AsyncDisplayKit/ASVideoPlayerNode.h index c8f65fcb80..de07dada8e 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.h +++ b/AsyncDisplayKit/ASVideoPlayerNode.h @@ -49,7 +49,6 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign, readwrite) BOOL muted; @property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState; @property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall; -@property (nullable, atomic, strong, readwrite) NSURL *placeholderImageURL; //! Defaults to 100 @property (nonatomic, assign) int32_t periodicTimeObserverTimescale; diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index fd76f79d30..cd880bcd4d 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -76,9 +76,6 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; @end @implementation ASVideoPlayerNode - -@dynamic placeholderImageURL; - - (instancetype)init { if (!(self = [super init])) { @@ -774,16 +771,6 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; return _videoNode.shouldAggressivelyRecoverFromStall; } -- (void) setPlaceholderImageURL:(NSURL *)placeholderImageURL -{ - _videoNode.URL = placeholderImageURL; -} - -- (NSURL*) placeholderImageURL -{ - return _videoNode.URL; -} - - (void)setShouldAggressivelyRecoverFromStall:(BOOL)shouldAggressivelyRecoverFromStall { if (_shouldAggressivelyRecoverFromStall == shouldAggressivelyRecoverFromStall) { diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index f6615d1bdb..efce00ad31 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -14,7 +14,6 @@ #import "ASInternalHelpers.h" #import "_ASHierarchyChangeSet.h" #import "ASAssert.h" -#import "NSIndexSet+ASHelpers.h" #import "ASDataController+Subclasses.h" @@ -48,9 +47,6 @@ [super beginUpdates]; - NSAssert([_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload item changes to have been converted into insert/deletes."); - NSAssert([_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload section changes to have been converted into insert/deletes."); - for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; } @@ -58,7 +54,17 @@ for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteSections:change.indexSet withAnimationOptions:change.animationOptions]; } - + + // TODO: Shouldn't reloads be processed before deletes, since deletes affect + // the index space and reloads don't? + for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload]) { + [super reloadSections:change.indexSet withAnimationOptions:change.animationOptions]; + } + + for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload]) { + [super reloadRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; + } + for (_ASHierarchySectionChange *change in [_changeSet sectionChangesOfType:_ASHierarchyChangeTypeInsert]) { [super insertSections:change.indexSet withAnimationOptions:change.animationOptions]; } @@ -109,10 +115,7 @@ if ([self batchUpdating]) { [_changeSet reloadSections:sections animationOptions:animationOptions]; } else { - [self beginUpdates]; - [super deleteSections:sections withAnimationOptions:animationOptions]; - [super insertSections:sections withAnimationOptions:animationOptions]; - [self endUpdates]; + [super reloadSections:sections withAnimationOptions:animationOptions]; } } @@ -155,10 +158,7 @@ if ([self batchUpdating]) { [_changeSet reloadItems:indexPaths animationOptions:animationOptions]; } else { - [self beginUpdates]; - [super deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - [super insertRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - [self endUpdates]; + [super reloadRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; } } diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index df0e7d592b..b54583c2a2 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -115,6 +115,30 @@ } } +- (void)prepareForReloadSections:(NSIndexSet *)sections +{ + for (NSString *kind in [self supplementaryKinds]) { + NSMutableArray *contexts = [NSMutableArray array]; + [self _populateSupplementaryNodesOfKind:kind withSections:sections mutableContexts:contexts]; + _pendingContexts[kind] = contexts; + } +} + +- (void)willReloadSections:(NSIndexSet *)sections +{ + NSArray *keys = _pendingContexts.allKeys; + for (NSString *kind in keys) { + NSMutableArray *contexts = _pendingContexts[kind]; + NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet([self editingNodesOfKind:kind], sections); + [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; + // reinsert the elements + [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; + }]; + [_pendingContexts removeObjectForKey:kind]; + } +} + - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { for (NSString *kind in [self supplementaryKinds]) { @@ -163,6 +187,30 @@ } } +- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths +{ + for (NSString *kind in [self supplementaryKinds]) { + NSMutableArray *contexts = [NSMutableArray array]; + [self _populateSupplementaryNodesOfKind:kind atIndexPaths:indexPaths mutableContexts:contexts]; + _pendingContexts[kind] = contexts; + } +} + +- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths +{ + NSArray *keys = _pendingContexts.allKeys; + for (NSString *kind in keys) { + NSMutableArray *contexts = _pendingContexts[kind]; + + [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; + // reinsert the elements + [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; + }]; + [_pendingContexts removeObjectForKey:kind]; + } +} + - (void)_populateSupplementaryNodesOfKind:(NSString *)kind withMutableContexts:(NSMutableArray *)contexts { id environment = [self.environmentDelegate dataControllerEnvironment]; diff --git a/AsyncDisplayKit/Details/ASDataController+Subclasses.h b/AsyncDisplayKit/Details/ASDataController+Subclasses.h index 099a9bfe45..d837540362 100644 --- a/AsyncDisplayKit/Details/ASDataController+Subclasses.h +++ b/AsyncDisplayKit/Details/ASDataController+Subclasses.h @@ -128,6 +128,28 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (void)willDeleteSections:(NSIndexSet *)sections; +/** + * Notifies the subclass to perform any work needed before the given sections will be reloaded. + * + * @discussion This method will be performed before the data controller enters its editing queue, usually on the main + * thread. The data source is locked at this point and accessing it is safe. Use this method to set up any nodes or + * data stores before entering into editing the backing store on a background thread. + * + * @param sections Indices of sections to be reloaded + */ +- (void)prepareForReloadSections:(NSIndexSet *)sections; + +/** + * Notifies the subclass that the data controller will reload the sections in the given index set + * + * @discussion This method will be performed on the data controller's editing background queue before the parent's + * concrete implementation. This is a great place to perform any additional transformations like supplementary views + * or header/footer nodes. + * + * @param sections Indices of sections to be reloaded + */ +- (void)willReloadSections:(NSIndexSet *)sections; + /** * Notifies the subclass that the data controller will move a section to a new position * @@ -184,4 +206,26 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (void)willDeleteRowsAtIndexPaths:(NSArray *)indexPaths; +/** + * Notifies the subclass to perform any work needed before the given rows will be reloaded. + * + * @discussion This method will be performed before the data controller enters its editing queue, usually on the main + * thread. The data source is locked at this point and accessing it is safe. Use this method to set up any nodes or + * data stores before entering into editing the backing store on a background thread. + * + * @param indexPaths Index paths for the rows to be reloaded. + */ +- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths; + +/** + * Notifies the subclass that the data controller will reload the rows at the given index paths. + * + * @discussion This method will be performed on the data controller's editing background queue before the parent's + * concrete implementation. This is a great place to perform any additional transformations like supplementary views + * or header/footer nodes. + * + * @param indexPaths Index paths for the rows to be reloaded. + */ +- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths; + @end diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index f9a890e609..86967fc99a 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -65,7 +65,6 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; if (!(self = [super init])) { return nil; } - ASDisplayNodeAssert(![self isMemberOfClass:[ASDataController class]], @"ASDataController is an abstract class and should not be instantiated. Instantiate a subclass instead."); _completedNodes = [NSMutableDictionary dictionary]; _editingNodes = [NSMutableDictionary dictionary]; @@ -143,9 +142,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; */ - (void)_layoutNode:(ASCellNode *)node withConstrainedSize:(ASSizeRange)constrainedSize { - CGRect frame = CGRectZero; - frame.size = [node measureWithSizeRange:constrainedSize].size; - node.frame = frame; + CGSize size = [node measureWithSizeRange:constrainedSize].size; + node.frame = { .size = size }; } /** @@ -663,7 +661,29 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)reloadSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASDisplayNodeAssert(NO, @"ASDataController does not support %@. Call this on ASChangeSetDataController the reload will be broken into delete & insert.", NSStringFromSelector(_cmd)); + [self performEditCommandWithBlock:^{ + ASDisplayNodeAssertMainThread(); + LOG(@"Edit Command - reloadSections: %@", sections); + + [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + + NSArray *contexts= [self _populateFromDataSourceWithSectionIndexSet:sections]; + + [self prepareForReloadSections:sections]; + + [_editingTransactionQueue addOperationWithBlock:^{ + [self willReloadSections:sections]; + + NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(_editingNodes[ASDataControllerRowNodeKind], sections); + + LOG(@"Edit Transaction - reloadSections: updatedIndexPaths: %@, indexPaths: %@, _editingNodes: %@", updatedIndexPaths, indexPaths, ASIndexPathsForTwoDimensionalArray(_editingNodes[ASDataControllerRowNodeKind])); + + [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; + + // reinsert the elements + [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; + }]; + }]; } - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions @@ -726,6 +746,16 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; // Optional template hook for subclasses (See ASDataController+Subclasses.h) } +- (void)prepareForReloadSections:(NSIndexSet *)sections +{ + // Optional template hook for subclasses (See ASDataController+Subclasses.h) +} + +- (void)willReloadSections:(NSIndexSet *)sections +{ + // Optional template hook for subclasses (See ASDataController+Subclasses.h) +} + - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { // Optional template hook for subclasses (See ASDataController+Subclasses.h) @@ -751,6 +781,16 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; // Optional template hook for subclasses (See ASDataController+Subclasses.h) } +- (void)prepareForReloadRowsAtIndexPaths:(NSArray *)indexPaths +{ + // Optional template hook for subclasses (See ASDataController+Subclasses.h) +} + +- (void)willReloadRowsAtIndexPaths:(NSArray *)indexPaths +{ + // Optional template hook for subclasses (See ASDataController+Subclasses.h) +} + #pragma mark - Row Editing (External API) - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions @@ -813,7 +853,40 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASDisplayNodeAssert(NO, @"ASDataController does not support %@. Call this on ASChangeSetDataController and the reload will be broken into delete & insert.", NSStringFromSelector(_cmd)); + [self performEditCommandWithBlock:^{ + ASDisplayNodeAssertMainThread(); + LOG(@"Edit Command - reloadRows: %@", indexPaths); + + [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + + NSMutableArray *contexts = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; + + // Sort indexPath to avoid messing up the index when deleting + // FIXME: Shouldn't deletes be sorted in descending order? + NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; + + id environment = [self.environmentDelegate dataControllerEnvironment]; + ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; + + for (NSIndexPath *indexPath in sortedIndexPaths) { + ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; + ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; + [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock + indexPath:indexPath + constrainedSize:constrainedSize + environmentTraitCollection:environmentTraitCollection]]; + } + + [self prepareForReloadRowsAtIndexPaths:indexPaths]; + + [_editingTransactionQueue addOperationWithBlock:^{ + [self willReloadRowsAtIndexPaths:indexPaths]; + + LOG(@"Edit Transaction - reloadRows: %@", indexPaths); + [self _deleteNodesAtIndexPaths:sortedIndexPaths withAnimationOptions:animationOptions]; + [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; + }]; + }]; } - (void)relayoutAllNodes @@ -850,9 +923,8 @@ static void *kASSizingQueueContext = &kASSizingQueueContext; for (ASCellNode *node in section) { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex]; ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; - CGRect frame = CGRectZero; - frame.size = [node measureWithSizeRange:constrainedSize].size; - node.frame = frame; + CGSize size = [node measureWithSizeRange:constrainedSize].size; + node.frame = { .size = size }; rowIndex += 1; } sectionIndex += 1; diff --git a/AsyncDisplayKit/Details/ASDelegateProxy.m b/AsyncDisplayKit/Details/ASDelegateProxy.m index 13c0d211c9..b1f3310736 100644 --- a/AsyncDisplayKit/Details/ASDelegateProxy.m +++ b/AsyncDisplayKit/Details/ASDelegateProxy.m @@ -118,15 +118,6 @@ return self; } -- (BOOL)conformsToProtocol:(Protocol *)aProtocol -{ - if (_target) { - return [_target conformsToProtocol:aProtocol]; - } else { - return [super conformsToProtocol:aProtocol]; - } -} - - (BOOL)respondsToSelector:(SEL)aSelector { if ([self interceptsSelector:aSelector]) { diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index dd95c2e107..e267de1e8a 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -157,10 +157,6 @@ ASDISPLAYNODE_EXTERN_C_END ASDN::MutexLocker l(lock);\ ASEnvironmentTraitCollection oldTraits = self.environmentState.environmentTraitCollection;\ [super setEnvironmentState:environmentState];\ -\ - /* Extra Trait Collection Handling */\ - /* If the node is not loaded yet don't do anything as otherwise the access of the view will trigger a load*/\ - if (!self.isNodeLoaded) { return; } \ ASEnvironmentTraitCollection currentTraits = environmentState.environmentTraitCollection;\ if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(currentTraits, oldTraits) == NO) {\ /* Must dispatch to main for self.view && [self.view.dataController completedNodes]*/ \ diff --git a/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/AsyncDisplayKit/Details/ASFlowLayoutController.mm index ffd553ba96..cb754bb9bf 100644 --- a/AsyncDisplayKit/Details/ASFlowLayoutController.mm +++ b/AsyncDisplayKit/Details/ASFlowLayoutController.mm @@ -92,12 +92,12 @@ currPath.row++; // Once we reach the end of the section, advance to the next one. Keep advancing if the next section is zero-sized. - while (currPath.row >= [(NSArray *)completedNodes[currPath.section] count] && currPath.section < endPath.section) { + while (currPath.row >= [(NSArray *)completedNodes[currPath.section] count] && currPath.section < completedNodes.count - 1) { currPath.row = 0; currPath.section++; + ASDisplayNodeAssert(currPath.section <= endPath.section, @"currPath should never reach a further section than endPath"); } } - ASDisplayNodeAssert(currPath.section <= endPath.section, @"currPath should never reach a further section than endPath"); [indexPathSet addObject:[NSIndexPath indexPathWithASIndexPath:endPath]]; diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h deleted file mode 100644 index 179e685639..0000000000 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// NSIndexSet+ASHelpers.h -// AsyncDisplayKit -// -// Created by Adlai Holler on 6/23/16. -// Copyright © 2016 Facebook. All rights reserved. -// - -#import - -@interface NSIndexSet (ASHelpers) - -- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger idx))block; - -- (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes; - -/// Returns all the item indexes from the given index paths that are in the given section. -+ (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section; - -/// If you've got an old index, and you insert items using this index set, this returns the change to get to the new index. -- (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index; - -- (NSString *)as_smallDescription; - -@end diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m deleted file mode 100644 index fa636ad8c8..0000000000 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m +++ /dev/null @@ -1,76 +0,0 @@ -// -// NSIndexSet+ASHelpers.m -// AsyncDisplayKit -// -// Created by Adlai Holler on 6/23/16. -// Copyright © 2016 Facebook. All rights reserved. -// - -#import - -#import "NSIndexSet+ASHelpers.h" - -@implementation NSIndexSet (ASHelpers) - -- (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger))block -{ - NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; - [self enumerateIndexesUsingBlock:^(NSUInteger idx, __unused BOOL * _Nonnull stop) { - NSUInteger newIndex = block(idx); - if (newIndex != NSNotFound) { - [result addIndex:newIndex]; - } - }]; - return result; -} - -- (NSIndexSet *)as_intersectionWithIndexes:(NSIndexSet *)indexes -{ - NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; - [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { - [indexes enumerateRangesInRange:range options:kNilOptions usingBlock:^(NSRange range, BOOL * _Nonnull stop) { - [result addIndexesInRange:range]; - }]; - }]; - return result; -} - -+ (NSIndexSet *)as_indexSetFromIndexPaths:(NSArray *)indexPaths inSection:(NSUInteger)section -{ - NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; - for (NSIndexPath *indexPath in indexPaths) { - if (indexPath.section == section) { - [result addIndex:indexPath.item]; - } - } - return result; -} - -- (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index -{ - __block NSUInteger newIndex = index; - [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= newIndex) { - newIndex += 1; - } else { - *stop = YES; - } - }]; - return newIndex - index; -} - -- (NSString *)as_smallDescription -{ - NSMutableString *result = [NSMutableString stringWithString:@"{ "]; - [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { - if (range.length == 1) { - [result appendFormat:@"%lu ", (unsigned long)range.location]; - } else { - [result appendFormat:@"%lu-%lu ", (unsigned long)range.location, (unsigned long)NSMaxRange(range)]; - } - }]; - [result appendString:@"}"]; - return result; -} - -@end diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index 755d82004d..6ec3b4ca75 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -13,8 +13,6 @@ #import #import -NS_ASSUME_NONNULL_BEGIN - typedef NSUInteger ASDataControllerAnimationOptions; typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { @@ -23,8 +21,6 @@ typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { _ASHierarchyChangeTypeInsert }; -NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); - @interface _ASHierarchySectionChange : NSObject // FIXME: Generalize this to `changeMetadata` dict? @@ -38,11 +34,11 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); @property (nonatomic, readonly) ASDataControllerAnimationOptions animationOptions; /// Index paths are sorted descending for changeType .Delete, ascending otherwise -@property (nonatomic, strong, readonly) NSArray *indexPaths; +@property (nonatomic, strong, readonly) NSArray *indexPaths; @property (nonatomic, readonly) _ASHierarchyChangeType changeType; -+ (NSDictionary *)sectionToIndexSetMapFromChanges:(NSArray<_ASHierarchyItemChange *> *)changes ofType:(_ASHierarchyChangeType)changeType; ++ (NSDictionary *)sectionToIndexSetMapFromChanges:(NSArray *)changes ofType:(_ASHierarchyChangeType)changeType; @end @interface _ASHierarchyChangeSet : NSObject @@ -51,6 +47,8 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); @property (nonatomic, strong, readonly) NSIndexSet *deletedSections; /// @precondition The change set must be completed. @property (nonatomic, strong, readonly) NSIndexSet *insertedSections; +/// @precondition The change set must be completed. +@property (nonatomic, strong, readonly) NSIndexSet *reloadedSections; /** Get the section index after the update for the given section before the update. @@ -58,12 +56,11 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); @precondition The change set must be completed. @returns The new section index, or NSNotFound if the given section was deleted. */ -- (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection; +- (NSInteger)newSectionForOldSection:(NSInteger)oldSection; @property (nonatomic, readonly) BOOL completed; /// Call this once the change set has been constructed to prevent future modifications to the changeset. Calling this more than once is a programmer error. -/// NOTE: Calling this method will cause the changeset to convert all reloads into delete/insert pairs. - (void)markCompleted; /** @@ -80,18 +77,13 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); - Inserted sections, ascending order - Inserted items, ascending order */ -- (nullable NSArray <_ASHierarchySectionChange *> *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; -- (nullable NSArray <_ASHierarchyItemChange *> *)itemChangesOfType:(_ASHierarchyChangeType)changeType; - -/// Returns all item indexes affected by changes of the given type in the given section. -- (NSIndexSet *)indexesForItemChangesOfType:(_ASHierarchyChangeType)changeType inSection:(NSUInteger)section; +- (NSArray /*<_ASHierarchySectionChange *>*/ *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; +- (NSArray /*<_ASHierarchyItemChange *>*/ *)itemChangesOfType:(_ASHierarchyChangeType)changeType; - (void)deleteSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; - (void)insertSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; - (void)reloadSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options; -- (void)insertItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; -- (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; -- (void)reloadItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)insertItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; +- (void)reloadItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options; @end - -NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index d1b54438a0..c89fc99332 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -12,22 +12,6 @@ #import "_ASHierarchyChangeSet.h" #import "ASInternalHelpers.h" -#import "NSIndexSet+ASHelpers.h" -#import "ASAssert.h" - -NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) -{ - switch (changeType) { - case _ASHierarchyChangeTypeInsert: - return @"Insert"; - case _ASHierarchyChangeTypeDelete: - return @"Delete"; - case _ASHierarchyChangeTypeReload: - return @"Reload"; - default: - return @"(invalid)"; - } -} @interface _ASHierarchySectionChange () - (instancetype)initWithChangeType:(_ASHierarchyChangeType)changeType indexSet:(NSIndexSet *)indexSet animationOptions:(ASDataControllerAnimationOptions)animationOptions; @@ -39,7 +23,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) + (void)sortAndCoalesceChanges:(NSMutableArray *)changes; /// Returns all the indexes from all the `indexSet`s of the given `_ASHierarchySectionChange` objects. -+ (NSMutableIndexSet *)allIndexesInSectionChanges:(NSArray *)changes; ++ (NSMutableIndexSet *)allIndexesInChanges:(NSArray *)changes; @end @interface _ASHierarchyItemChange () @@ -54,12 +38,12 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) @interface _ASHierarchyChangeSet () -@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *insertItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *deleteItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *reloadItemChanges; -@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *insertSectionChanges; -@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *deleteSectionChanges; -@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *reloadSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray *insertItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray *deleteItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray *reloadItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray *insertSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray *deleteSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray *reloadSectionChanges; @end @@ -119,27 +103,21 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) } } -- (NSIndexSet *)indexesForItemChangesOfType:(_ASHierarchyChangeType)changeType inSection:(NSUInteger)section +- (NSInteger)newSectionForOldSection:(NSInteger)oldSection { - [self _ensureCompleted]; - NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; - for (_ASHierarchyItemChange *change in [self itemChangesOfType:changeType]) { - [result addIndexes:[NSIndexSet as_indexSetFromIndexPaths:change.indexPaths inSection:section]]; - } - return result; -} - -- (NSUInteger)newSectionForOldSection:(NSUInteger)oldSection -{ - ASDisplayNodeAssertNotNil(_deletedSections, @"Cannot call %@ before `markCompleted` returns.", NSStringFromSelector(_cmd)); - ASDisplayNodeAssertNotNil(_insertedSections, @"Cannot call %@ before `markCompleted` returns.", NSStringFromSelector(_cmd)); [self _ensureCompleted]; if ([_deletedSections containsIndex:oldSection]) { return NSNotFound; } - NSUInteger newIndex = oldSection - [_deletedSections countOfIndexesInRange:NSMakeRange(0, oldSection)]; - newIndex += [_insertedSections as_indexChangeByInsertingItemsBelowIndex:newIndex]; + __block NSInteger newIndex = oldSection - [_deletedSections countOfIndexesInRange:NSMakeRange(0, oldSection)]; + [_insertedSections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { + if (idx <= newIndex) { + newIndex += 1; + } else { + *stop = YES; + } + }]; return newIndex; } @@ -202,42 +180,42 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) - (void)_sortAndCoalesceChangeArrays { @autoreleasepool { - - // Split reloaded sections into [delete(oldIndex), insert(newIndex)] - - // Give these their "pre-reloads" values. Once we add in the reloads we'll re-process them. - _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; - _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; - - for (_ASHierarchySectionChange *change in _reloadSectionChanges) { - NSIndexSet *newSections = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { - NSUInteger newSec = [self newSectionForOldSection:idx]; - NSAssert(newSec != NSNotFound, @"Request to reload deleted section %lu", (unsigned long)idx); - return newSec; - }]; - - _ASHierarchySectionChange *deleteChange = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexSet:change.indexSet animationOptions:change.animationOptions]; - [_deleteSectionChanges addObject:deleteChange]; - - _ASHierarchySectionChange *insertChange = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexSet:newSections animationOptions:change.animationOptions]; - [_insertSectionChanges addObject:insertChange]; - } - - _reloadSectionChanges = nil; - [_ASHierarchySectionChange sortAndCoalesceChanges:_deleteSectionChanges]; [_ASHierarchySectionChange sortAndCoalesceChanges:_insertSectionChanges]; - _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; - _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; + [_ASHierarchySectionChange sortAndCoalesceChanges:_reloadSectionChanges]; - // Split reloaded items into [delete(oldIndexPath), insert(newIndexPath)] - + _deletedSections = [[_ASHierarchySectionChange allIndexesInChanges:_deleteSectionChanges] copy]; + _insertedSections = [[_ASHierarchySectionChange allIndexesInChanges:_insertSectionChanges] copy]; + _reloadedSections = [[_ASHierarchySectionChange allIndexesInChanges:_reloadSectionChanges] copy]; + + // These are invalid old section indexes. + NSMutableIndexSet *deletedOrReloaded = [_deletedSections mutableCopy]; + [deletedOrReloaded addIndexes:_reloadedSections]; + + // These are invalid new section indexes. + NSMutableIndexSet *insertedOrReloaded = [_insertedSections mutableCopy]; + + // Get the new section that each reloaded section index corresponds to. + // Coalesce reload sections' indexes into deletes and inserts + [_reloadedSections enumerateIndexesUsingBlock:^(NSUInteger oldIndex, __unused BOOL * stop) { + NSUInteger newIndex = [self newSectionForOldSection:oldIndex]; + if (newIndex != NSNotFound) { + [insertedOrReloaded addIndex:newIndex]; + } + [deletedOrReloaded addIndex:oldIndex]; + }]; + + _deletedSections = deletedOrReloaded; + _insertedSections = insertedOrReloaded; + _reloadedSections = nil; + + // reload items changes need to be adjusted so that we access the correct indexPaths in the datasource NSDictionary *insertedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_insertItemChanges ofType:_ASHierarchyChangeTypeInsert]; NSDictionary *deletedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_deleteItemChanges ofType:_ASHierarchyChangeTypeDelete]; for (_ASHierarchyItemChange *change in _reloadItemChanges) { NSAssert(change.changeType == _ASHierarchyChangeTypeReload, @"It must be a reload change to be in here"); - NSMutableArray *newIndexPaths = [NSMutableArray arrayWithCapacity:change.indexPaths.count]; + NSMutableArray *newIndexPaths = [NSMutableArray array]; // Every indexPaths in the change need to update its section and/or row // depending on all the deletions and insertions @@ -245,21 +223,39 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) // - delete/reload indexPaths that are passed in should all be their current indexPaths // - insert indexPaths that are passed in should all be their future indexPaths after deletions for (NSIndexPath *indexPath in change.indexPaths) { - NSUInteger section = [self newSectionForOldSection:indexPath.section]; - NSUInteger item = indexPath.item; + __block NSUInteger section = indexPath.section; + __block NSUInteger row = indexPath.row; + + + // Update section number based on section insertions/deletions that are above the current section + section -= [_deletedSections countOfIndexesInRange:NSMakeRange(0, section)]; + [_insertedSections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { + if (idx <= section) { + section += 1; + } else { + *stop = YES; + } + }]; // Update row number based on deletions that are above the current row in the current section NSIndexSet *indicesDeletedInSection = deletedIndexPathsMap[@(indexPath.section)]; - item -= [indicesDeletedInSection countOfIndexesInRange:NSMakeRange(0, item)]; + row -= [indicesDeletedInSection countOfIndexesInRange:NSMakeRange(0, row)]; // Update row number based on insertions that are above the current row in the future section NSIndexSet *indicesInsertedInSection = insertedIndexPathsMap[@(section)]; - item += [indicesInsertedInSection as_indexChangeByInsertingItemsBelowIndex:item]; + [indicesInsertedInSection enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { + if (idx <= row) { + row += 1; + } else { + *stop = YES; + } + }]; - NSIndexPath *newIndexPath = [NSIndexPath indexPathForItem:item inSection:section]; + //TODO: reuse the old indexPath object if section and row aren't changed + NSIndexPath *newIndexPath = [NSIndexPath indexPathForRow:row inSection:section]; [newIndexPaths addObject:newIndexPath]; } - // All reload changes are translated into deletes and inserts + // All reload changes are coalesced into deletes and inserts // We delete the items that needs reload together with other deleted items, at their original index _ASHierarchyItemChange *deleteItemChangeFromReloadChange = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexPaths:change.indexPaths animationOptions:change.animationOptions presorted:NO]; [_deleteItemChanges addObject:deleteItemChangeFromReloadChange]; @@ -267,20 +263,16 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) _ASHierarchyItemChange *insertItemChangeFromReloadChange = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexPaths:newIndexPaths animationOptions:change.animationOptions presorted:NO]; [_insertItemChanges addObject:insertItemChangeFromReloadChange]; } - _reloadItemChanges = nil; + [_reloadItemChanges removeAllObjects]; // Ignore item deletes in reloaded/deleted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:_deletedSections]; + [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:deletedOrReloaded]; // Ignore item inserts in reloaded(new)/inserted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_insertItemChanges ignoringChangesInSections:_insertedSections]; + [_ASHierarchyItemChange sortAndCoalesceChanges:_insertItemChanges ignoringChangesInSections:insertedOrReloaded]; } } -- (NSString *)description -{ - return [NSString stringWithFormat:@"<%@ %p: deletedSections=%@, insertedSections=%@, deletedItems=%@, insertedItems=%@>", NSStringFromClass(self.class), self, _deletedSections, _insertedSections, _deleteItemChanges, _insertItemChanges]; -} @end @@ -291,7 +283,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) { self = [super init]; if (self) { - ASDisplayNodeAssert(indexSet.count > 0, @"Request to create _ASHierarchySectionChange with no sections!"); _changeType = changeType; _indexSet = indexSet; _animationOptions = animationOptions; @@ -355,7 +346,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) [changes setArray:result]; } -+ (NSMutableIndexSet *)allIndexesInSectionChanges:(NSArray<_ASHierarchySectionChange *> *)changes ++ (NSMutableIndexSet *)allIndexesInChanges:(NSArray *)changes { NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet]; for (_ASHierarchySectionChange *change in changes) { @@ -364,11 +355,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return indexes; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"<%@: anim=%lu, type=%@, indexes=%@>", NSStringFromClass(self.class), (unsigned long)_animationOptions, NSStringFromASHierarchyChangeType(_changeType), [self.indexSet as_smallDescription]]; -} - @end @implementation _ASHierarchyItemChange @@ -377,7 +363,6 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) { self = [super init]; if (self) { - ASDisplayNodeAssert(indexPaths.count > 0, @"Request to create _ASHierarchyItemChange with no items!"); _changeType = changeType; if (presorted) { _indexPaths = indexPaths; @@ -402,9 +387,9 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) NSNumber *sectionKey = @(indexPath.section); NSMutableIndexSet *indexSet = sectionToIndexSetMap[sectionKey]; if (indexSet) { - [indexSet addIndex:indexPath.item]; + [indexSet addIndex:indexPath.row]; } else { - indexSet = [NSMutableIndexSet indexSetWithIndex:indexPath.item]; + indexSet = [NSMutableIndexSet indexSetWithIndex:indexPath.row]; sectionToIndexSetMap[sectionKey] = indexSet; } } @@ -412,7 +397,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return sectionToIndexSetMap; } -+ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)ignoredSections ++ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)sections { if (changes.count < 1) { return; @@ -426,9 +411,12 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) // All changed index paths, sorted NSMutableArray *allIndexPaths = [NSMutableArray new]; + NSPredicate *indexPathInValidSection = [NSPredicate predicateWithBlock:^BOOL(NSIndexPath *indexPath, __unused NSDictionary *_) { + return ![sections containsIndex:indexPath.section]; + }]; for (_ASHierarchyItemChange *change in changes) { for (NSIndexPath *indexPath in change.indexPaths) { - if (![ignoredSections containsIndex:indexPath.section]) { + if ([indexPathInValidSection evaluateWithObject:indexPath]) { animationOptions[indexPath] = @(change.animationOptions); [allIndexPaths addObject:indexPath]; } @@ -471,9 +459,4 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) [changes setArray:result]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"<%@: anim=%lu, type=%@, indexPaths=%@>", NSStringFromClass(self.class), (unsigned long)_animationOptions, NSStringFromASHierarchyChangeType(_changeType), self.indexPaths]; -} - @end diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 5253562d6d..6b0d1b651b 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -200,44 +200,4 @@ XCTAssertTrue([(ASTextCellNodeWithSetSelectedCounter *)node setSelectedCounter] == 6, @"setSelected: should not be called on node multiple times."); } -- (void)testTuningParametersWithExplicitRangeMode -{ - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; - ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; - - ASRangeTuningParameters minimumRenderParams = { .leadingBufferScreenfuls = 0.1, .trailingBufferScreenfuls = 0.1 }; - ASRangeTuningParameters minimumPreloadParams = { .leadingBufferScreenfuls = 0.1, .trailingBufferScreenfuls = 0.1 }; - ASRangeTuningParameters fullRenderParams = { .leadingBufferScreenfuls = 0.5, .trailingBufferScreenfuls = 0.5 }; - ASRangeTuningParameters fullPreloadParams = { .leadingBufferScreenfuls = 1, .trailingBufferScreenfuls = 0.5 }; - - [collectionView setTuningParameters:minimumRenderParams forRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeDisplay]; - [collectionView setTuningParameters:minimumPreloadParams forRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeFetchData]; - [collectionView setTuningParameters:fullRenderParams forRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeDisplay]; - [collectionView setTuningParameters:fullPreloadParams forRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeFetchData]; - - XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(minimumRenderParams, - [collectionView tuningParametersForRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeDisplay])); - XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(minimumPreloadParams, - [collectionView tuningParametersForRangeMode:ASLayoutRangeModeMinimum rangeType:ASLayoutRangeTypeFetchData])); - XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(fullRenderParams, - [collectionView tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeDisplay])); - XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(fullPreloadParams, - [collectionView tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:ASLayoutRangeTypeFetchData])); -} - -- (void)testTuningParameters -{ - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; - ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; - - ASRangeTuningParameters renderParams = { .leadingBufferScreenfuls = 1.2, .trailingBufferScreenfuls = 3.2 }; - ASRangeTuningParameters preloadParams = { .leadingBufferScreenfuls = 4.3, .trailingBufferScreenfuls = 2.3 }; - - [collectionView setTuningParameters:renderParams forRangeType:ASLayoutRangeTypeDisplay]; - [collectionView setTuningParameters:preloadParams forRangeType:ASLayoutRangeTypeFetchData]; - - XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(renderParams, [collectionView tuningParametersForRangeType:ASLayoutRangeTypeDisplay])); - XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(preloadParams, [collectionView tuningParametersForRangeType:ASLayoutRangeTypeFetchData])); -} - @end diff --git a/AsyncDisplayKitTests/ASTableViewTests.m b/AsyncDisplayKitTests/ASTableViewTests.m index 98914d1bd4..7cb13fb8ca 100644 --- a/AsyncDisplayKitTests/ASTableViewTests.m +++ b/AsyncDisplayKitTests/ASTableViewTests.m @@ -128,6 +128,7 @@ return textCellNode; } + - (ASCellNodeBlock)tableView:(ASTableView *)tableView nodeBlockForRowAtIndexPath:(NSIndexPath *)indexPath { return ^{ @@ -139,52 +140,12 @@ @end -@interface ASTableViewFilledDelegate : NSObject -@end - -@implementation ASTableViewFilledDelegate - -- (ASSizeRange)tableView:(ASTableView *)tableView constrainedSizeForRowAtIndexPath:(NSIndexPath *)indexPath -{ - return ASSizeRangeMakeExactSize(CGSizeMake(10, 42)); -} - -@end - @interface ASTableViewTests : XCTestCase @property (atomic, retain) ASTableView *testTableView; @end @implementation ASTableViewTests -- (void)testConstrainedSizeForRowAtIndexPath -{ - // Initial width of the table view is non-zero and all nodes are measured with this size. - // Any subsequence size change must trigger a relayout. - // Width and height are swapped so that a later size change will simulate a rotation - ASTestTableView *tableView = [[ASTestTableView alloc] __initWithFrame:CGRectMake(0, 0, 100, 400) - style:UITableViewStylePlain]; - - ASTableViewFilledDelegate *delegate = [ASTableViewFilledDelegate new]; - ASTableViewFilledDataSource *dataSource = [ASTableViewFilledDataSource new]; - - tableView.asyncDelegate = delegate; - tableView.asyncDataSource = dataSource; - - [tableView reloadDataImmediately]; - [tableView setNeedsLayout]; - [tableView layoutIfNeeded]; - - for (int section = 0; section < NumberOfSections; section++) { - for (int row = 0; row < NumberOfRowsPerSection; row++) { - NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section]; - CGRect rect = [tableView rectForRowAtIndexPath:indexPath]; - XCTAssertEqual(rect.size.width, 100); // specified width should be ignored for table - XCTAssertEqual(rect.size.height, 42); - } - } -} - // TODO: Convert this to ARC. - (void)DISABLED_testTableViewDoesNotRetainItselfAndDelegate { diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index 62ddffdd90..5d6fa8f637 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -8,7 +8,6 @@ @import XCTest; #import -#import "ASTableViewInternal.h" // Set to 1 to use UITableView and see if the issue still exists. #define USE_UIKIT_REFERENCE 0 @@ -20,8 +19,8 @@ #define TableView ASTableView #endif -#define kInitialSectionCount 10 -#define kInitialItemCount 10 +#define kInitialSectionCount 20 +#define kInitialItemCount 20 #define kMinimumItemCount 5 #define kMinimumSectionCount 3 #define kFickleness 0.1 @@ -146,7 +145,7 @@ static volatile int32_t ASThrashTestSectionNextID = 1; } - (NSString *)description { - return [NSString stringWithFormat:@"
", (unsigned long)_sectionID, (unsigned long)self.items.count, ASThrashArrayDescription(self.items)]; + return [NSString stringWithFormat:@"
", (unsigned long)_sectionID, (unsigned long)self.items.count]; } - (id)copyWithZone:(NSZone *)zone { @@ -446,22 +445,17 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; @implementation ASTableViewThrashTests { // The current update, which will be logged in case of a failure. ASThrashUpdate *_update; - BOOL _failed; } #pragma mark Overrides - (void)tearDown { - if (_failed && _update != nil) { - NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation); - } - _failed = NO; _update = nil; } // NOTE: Despite the documentation, this is not always called if an exception is caught. - (void)recordFailureWithDescription:(NSString *)description inFile:(NSString *)filePath atLine:(NSUInteger)lineNumber expected:(BOOL)expected { - _failed = YES; + [self logCurrentUpdateIfNeeded]; [super recordFailureWithDescription:description inFile:filePath atLine:lineNumber expected:expected]; } @@ -483,12 +477,11 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; } ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:_update.oldData]; - ds.tableView.test_enableSuperUpdateCallLogging = YES; [self applyUpdate:_update toDataSource:ds]; [self verifyDataSource:ds]; } -- (void)testThrashingWildly { +- (void)DISABLED_testThrashingWildly { for (NSInteger i = 0; i < kThrashingIterationCount; i++) { [self setUp]; ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:[ASThrashTestSection sectionsWithCount:kInitialSectionCount]]; @@ -502,6 +495,12 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; #pragma mark Helpers +- (void)logCurrentUpdateIfNeeded { + if (_update != nil) { + NSLog(@"Failed update %@: %@", _update, _update.logFriendlyBase64Representation); + } +} + - (void)applyUpdate:(ASThrashUpdate *)update toDataSource:(ASThrashDataSource *)dataSource { TableView *tableView = dataSource.tableView; @@ -534,7 +533,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; [tableView waitUntilAllUpdatesAreCommitted]; #endif } @catch (NSException *exception) { - _failed = YES; + [self logCurrentUpdateIfNeeded]; @throw exception; } } @@ -554,7 +553,7 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; XCTAssertEqual([tableView rectForRowAtIndexPath:indexPath].size.height, item.rowHeight); #else ASThrashTestNode *node = (ASThrashTestNode *)[tableView nodeForRowAtIndexPath:indexPath]; - XCTAssertEqualObjects(node.item, item, @"Wrong node at index path %@", indexPath); + XCTAssertEqual(node.item, item); #endif } } diff --git a/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase b/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase index e9dc1e9cc0..9e8343590e 100644 --- a/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase +++ b/AsyncDisplayKitTests/TestResources/ASThrashTestRecordedCase @@ -1 +1 @@ -YnBsaXN0MDDUAAEAAgADAAQABQAGAagBqVgkdmVyc2lvblgkb2JqZWN0c1kkYXJjaGl2ZXJUJHRvcBIAAYagrxBrAAcACAAPAC0ALgA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AAAADfoAAAAAAAAAAAAAAAAAAEs2 \ No newline at end of file diff --git a/README.md b/README.md index 812826197f..10f28e5005 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-59C939.svg?style=flat)](https://github.com/Carthage/Carthage) [![Build Status](https://travis-ci.org/facebook/AsyncDisplayKit.svg)](https://travis-ci.org/facebook/AsyncDisplayKit) [![License](https://img.shields.io/cocoapods/l/AsyncDisplayKit.svg)](https://github.com/facebook/AsyncDisplayKit/blob/master/LICENSE) - + AsyncDisplayKit is an iOS framework that keeps even the most complex user interfaces smooth and responsive. It was originally built to make Facebook's @@ -18,14 +18,14 @@ interfaces smooth and responsive. It was originally built to make Facebook's [pop](https://github.com/facebook/pop)'s physics-based animations — but it's just as powerful with UIKit Dynamics and conventional app designs. -### Quick start +### Quick start ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: ```ruby pod 'AsyncDisplayKit' ``` - + (ASDK can also be used as a regular static library: Copy the project to your codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace. Add `libAsyncDisplayKit.a`, MapKit, AssetsLibrary, and Photos to the "Link Binary With @@ -46,7 +46,7 @@ CALayers: You can construct entire node hierarchies in parallel, or instantiate and size a single node on a background thread — for example, you could do -something like this in a UIViewController: +something like this in a UIViewController: ```objective-c dispatch_async(_backgroundQueue, ^{ diff --git a/build.sh b/build.sh index e6f1f0566f..02a2ddb4ab 100755 --- a/build.sh +++ b/build.sh @@ -36,46 +36,6 @@ if [ "$MODE" = "tests" ]; then exit 0 fi -if [ "$MODE" = "examples" ]; then - echo "Verifying that all AsyncDisplayKit examples compile." - - for example in examples/*/; do - echo "Building (examples) $example." - - if [ -f "${example}/Podfile" ]; then - echo "Using CocoaPods" - pod install --project-directory=$example - - set -o pipefail && xcodebuild \ - -workspace "${example}/Sample.xcworkspace" \ - -scheme Sample \ - -sdk "$SDK" \ - -destination "$PLATFORM" \ - -derivedDataPath ~/ \ - build | xcpretty $FORMATTER - elif [ -f "${example}/Cartfile" ]; then - echo "Using Carthage" - local_repo=`pwd` - current_branch=`git rev-parse --abbrev-ref HEAD` - cd $example - - echo "git \"file://${local_repo}\" \"${current_branch}\"" > "Cartfile" - carthage update --platform iOS - - set -o pipefail && xcodebuild \ - -project "Sample.xcodeproj" \ - -scheme Sample \ - -sdk "$SDK" \ - -destination "$PLATFORM" \ - build | xcpretty $FORMATTER - - cd ../.. - fi - done - trap - EXIT - exit 0 -fi - if [ "$MODE" = "examples-pt1" ]; then echo "Verifying that all AsyncDisplayKit examples compile." From bf6fbd173db9081689c7fd608f401bb683d1efd6 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sun, 3 Jul 2016 13:33:23 -0700 Subject: [PATCH 062/247] Address first comments --- AsyncDisplayKit/ASDisplayNode.mm | 8 ++++---- AsyncDisplayKit/Private/ASLayoutTransition.h | 2 +- AsyncDisplayKit/Private/ASLayoutTransition.mm | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index ce0eb1edb5..c32d5a5aef 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -718,7 +718,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) int32_t transitionID = [self _startNewTransition]; ASDisplayNodePerformBlockOnEverySubnode(self, ^(ASDisplayNode * _Nonnull node) { - ASDisplayNodeAssert([node _hasTransitionInProgress] == NO, @"Can't start a transition when one of the subnodes is performing one."); + ASDisplayNodeAssert([node _isTransitionInProgress] == NO, @"Can't start a transition when one of the subnodes is performing one."); node.hierarchyState |= ASHierarchyStateLayoutPending; node.pendingTransitionID = transitionID; }); @@ -821,7 +821,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)cancelLayoutTransitionsInProgress { ASDN::MutexLocker l(_propertyLock); - if ([self _hasTransitionInProgress]) { + if ([self _isTransitionInProgress]) { // Cancel transition in progress [self _finishOrCancelTransition]; @@ -844,7 +844,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) _usesImplicitHierarchyManagement = value; } -- (BOOL)_hasTransitionInProgress +- (BOOL)_isTransitionInProgress { ASDN::MutexLocker l(_propertyLock); return _transitionInProgress; @@ -2445,7 +2445,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) } // Trampoline to the main thread if necessary - if (ASDisplayNodeThreadIsMain() == NO && layoutTransition.canTransitionAsynchronous == NO) { + if (ASDisplayNodeThreadIsMain() == NO && layoutTransition.isSynchronous == NO) { // Subnode insertions and removals need to happen always on the main thread if at least one subnode is already loaded ASPerformBlockOnMainThread(^{ diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.h b/AsyncDisplayKit/Private/ASLayoutTransition.h index 5c38a3d5cd..e5eea561f9 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.h +++ b/AsyncDisplayKit/Private/ASLayoutTransition.h @@ -36,7 +36,7 @@ /** * Returns if the layout transition can happen asynchronously */ -@property (nonatomic, readonly, assign) BOOL canTransitionAsynchronous; +@property (nonatomic, readonly, assign, getter=isSynchronous) BOOL synchronous; /** * Returns a newly initialized layout transition diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index b86fe572f8..1e7e543313 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -27,7 +27,7 @@ * Search the whole layout stack if at least one layout has a layoutable object that can not be layed out asynchronous. * This can be the case for example if a node was already loaded */ -static BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { +static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { // Queue used to keep track of sublayouts while traversing this layout in a BFS fashion. std::queue queue; queue.push(layout); @@ -71,7 +71,7 @@ static BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { return self; } -- (BOOL)canTransitionAsynchronous +- (BOOL)isSynchronous { ASDN::MutexLocker l(_propertyLock); return ASLayoutCanTransitionAsynchronous(_pendingLayout); From 9de014f17940e12266244b33da1118fa16cff32e Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sun, 3 Jul 2016 14:38:26 -0700 Subject: [PATCH 063/247] Change applySubnodeTransition to startTransition --- AsyncDisplayKit/ASDisplayNode.mm | 4 ++-- AsyncDisplayKit/Private/ASLayoutTransition.h | 4 ++-- AsyncDisplayKit/Private/ASLayoutTransition.mm | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index c32d5a5aef..50545d6d45 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2449,13 +2449,13 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) // Subnode insertions and removals need to happen always on the main thread if at least one subnode is already loaded ASPerformBlockOnMainThread(^{ - [layoutTransition applySubnodeTransition]; + [layoutTransition startTransition]; }); return; } - [layoutTransition applySubnodeTransition]; + [layoutTransition startTransition]; } - (void)layout diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.h b/AsyncDisplayKit/Private/ASLayoutTransition.h index e5eea561f9..3c8e5781cb 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.h +++ b/AsyncDisplayKit/Private/ASLayoutTransition.h @@ -36,7 +36,7 @@ /** * Returns if the layout transition can happen asynchronously */ -@property (nonatomic, readonly, assign, getter=isSynchronous) BOOL synchronous; +@property (nonatomic, readonly, assign) BOOL isSynchronous; /** * Returns a newly initialized layout transition @@ -47,7 +47,7 @@ /** * Insert and remove subnodes that where added or removed between the previousLayout and the pendingLayout */ -- (void)applySubnodeTransition; +- (void)startTransition; /** * Insert all new subnodes that where added between the previous layout and the pending layout diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index 1e7e543313..919378a8ca 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -77,7 +77,7 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { return ASLayoutCanTransitionAsynchronous(_pendingLayout); } -- (void)applySubnodeTransition +- (void)startTransition { [self applySubnodeInsertions]; [self applySubnodeRemovals]; From c20f452dcab9dbaa76c1d9254724729698bdb985 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sun, 3 Jul 2016 21:47:35 -0700 Subject: [PATCH 064/247] Remove check for [UIDevice systemVersion] check if running on iOS 7 (#1843) --- AsyncDisplayKit/ASCollectionView.mm | 3 ++- AsyncDisplayKit/Private/ASInternalHelpers.h | 6 ++---- AsyncDisplayKit/Private/ASInternalHelpers.mm | 10 ---------- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index abcab6c9e9..c3ebbbe0c6 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -9,6 +9,7 @@ // #import "ASAssert.h" +#import "ASAvailability.h" #import "ASBatchFetching.h" #import "ASDelegateProxy.h" #import "ASCellNode+Internal.h" @@ -592,7 +593,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; cell.node = node; [_rangeController configureContentView:cell.contentView forCellNode:node]; - if (ASRunningOnOS7()) { + if (!AS_AT_LEAST_IOS8) { // Even though UICV was introduced in iOS 6, and UITableView has always had the equivalent method, // -willDisplayCell: was not introduced until iOS 8 for UICV. didEndDisplayingCell, however, is available. [self collectionView:collectionView willDisplayCell:cell forItemAtIndexPath:indexPath]; diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.h b/AsyncDisplayKit/Private/ASInternalHelpers.h index cff8c1fc53..f80f3c82e0 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.h +++ b/AsyncDisplayKit/Private/ASInternalHelpers.h @@ -8,9 +8,9 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#include -#import #import +#import + #import "ASBaseDefines.h" ASDISPLAYNODE_EXTERN_C_BEGIN @@ -35,8 +35,6 @@ CGFloat ASCeilPixelValue(CGFloat f); CGFloat ASRoundPixelValue(CGFloat f); -BOOL ASRunningOnOS7(); - ASDISPLAYNODE_EXTERN_C_END /** diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.mm b/AsyncDisplayKit/Private/ASInternalHelpers.mm index 4d4ccbbf74..4538edf1cd 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.mm +++ b/AsyncDisplayKit/Private/ASInternalHelpers.mm @@ -89,16 +89,6 @@ CGFloat ASRoundPixelValue(CGFloat f) return roundf(f * ASScreenScale()) / ASScreenScale(); } -BOOL ASRunningOnOS7() -{ - static BOOL isOS7 = NO; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - isOS7 = ([[UIDevice currentDevice].systemVersion floatValue] < 8.0); - }); - return isOS7; -} - @implementation NSIndexPath (ASInverseComparison) - (NSComparisonResult)asdk_inverseCompare:(NSIndexPath *)otherIndexPath From 3763df1f0691378993e50a6517ef1ed697364de2 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 4 Jul 2016 14:48:31 -0700 Subject: [PATCH 065/247] [Example] Resolved ASTextNode bugs (test app to reproduce issues, do regression testing) (#1803) * [Examples] text node known inconsistencies with UILabel * addressed @appleguy's comments --- .../TextStressTest/Default-568h@2x.png | Bin 0 -> 17520 bytes .../TextStressTest/Default-667h@2x.png | Bin 0 -> 18314 bytes .../TextStressTest/Default-736h@3x.png | Bin 0 -> 23380 bytes examples_extra/TextStressTest/Podfile | 6 + .../Sample.xcodeproj/project.pbxproj | 364 ++++++++++++++++++ .../xcshareddata/xcschemes/Sample.xcscheme | 91 +++++ .../TextStressTest/Sample/AppDelegate.h | 18 + .../TextStressTest/Sample/AppDelegate.m | 27 ++ .../TextStressTest/Sample/Info.plist | 36 ++ .../TextStressTest/Sample/ViewController.h | 16 + .../TextStressTest/Sample/ViewController.m | 165 ++++++++ examples_extra/TextStressTest/Sample/main.m | 20 + 12 files changed, 743 insertions(+) create mode 100644 examples_extra/TextStressTest/Default-568h@2x.png create mode 100644 examples_extra/TextStressTest/Default-667h@2x.png create mode 100644 examples_extra/TextStressTest/Default-736h@3x.png create mode 100644 examples_extra/TextStressTest/Podfile create mode 100644 examples_extra/TextStressTest/Sample.xcodeproj/project.pbxproj create mode 100644 examples_extra/TextStressTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme create mode 100644 examples_extra/TextStressTest/Sample/AppDelegate.h create mode 100644 examples_extra/TextStressTest/Sample/AppDelegate.m create mode 100644 examples_extra/TextStressTest/Sample/Info.plist create mode 100644 examples_extra/TextStressTest/Sample/ViewController.h create mode 100644 examples_extra/TextStressTest/Sample/ViewController.m create mode 100644 examples_extra/TextStressTest/Sample/main.m diff --git a/examples_extra/TextStressTest/Default-568h@2x.png b/examples_extra/TextStressTest/Default-568h@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..6ee80b93937cd9dd79502629b14fe09aa03cacc2 GIT binary patch literal 17520 zcmeI3&2QsG7{;dyhuxq(aR70$vO)rco)4~Hqb-mA2=CIb8^QK*gwP8wCVy+_i!WbB=&euO z!=w19^{!?6gA#W9HYtq<0qu=Ybz>Z0`-H?on{-{TR{Zmu?}~!!)QWeFmfQ*&q~~s* zhveXV_s~8+u`5n-qh6?vEov|zF&4&yz86{JS~2yt=yB346@|1*d{QfJCIbpbtv#XP zheR++hG@%*E|`^)Vkml9c~ekjMU!MrQZ!LfExBSThA{aQ>jipL4V{j)-@H8;jz+a& zFOCCCl18IZX{43>uq!E*N=1@YNmWJKLyXS67>`9Sx|NwseVQb)LpO+B-xCsF-1diY ztyoM3ntdkMH3(({dC`O&r6`SYASoqT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QO*=y&m*}h@Tc~8g*q+b3v6Y zGkeRA6Y4u`tJUNUWzTbMv)ZYeIx}Tvs=93I-HKc_OiS*t8m(1Toz=z=+wG!!&bk#i zgLJEmtzB+S4XSl5!;n{9oyw*`b-6>UrmUK^il*vDw??bk{BY}ne9ro<$m3;>_6mK{ zv;U_`>IE_XGxBbybA%AHk*$y&Essi=Cl+F`4c zIsUhEU>dfjO$yTgGzYWw>l{=6h`CK=a#@px$7$NGR{I`p>s+{xJnqw$@4<_ua8kkN zOJ_ZOc(8fd2=@U+V2j1fk5@J z8HQPu7E)trK3jz+=d5(*t^B#1|0GbRzX|55>h#WYod>gPx=vT%g@XVf;t+9(`G73q z0zkwe;u7-#S;Pf^h(p9B<^!^b3jh&^h)c`|WDyqtA`TIkm=DMzE&xOvA}%o>kVRYo zh&V)CVm=^?xBw7wh`7XjKo)TUAmR{liTQvm;sQX#A>tDA0a?TafQUoHCFTRNhzkG_ zhloqe2V@Z!03r?%mzWR8A}#<#93n0;ACN^{0Ejq5Tw*>Ti?{#~afrCYd_Wd)0U+WK zaf$hWEaCz{#3AAm^8s1J1%QY{#3kkfvWN=+5r;xt%d@v^na^LX9rAZ*rRRS9n7@B3 zIh(s}Le5_zCFIw8gxH@D@_g{o-5>7o_jw0ft+oBp&%b@Yw8WM7 zrH5boo3EvZ_(1|l00|%gB!C2v01`j~NZ=X>eD`35{4^j-PY%DimD+7>Y`4C6{oeh* E06EB-U;qFB literal 0 HcmV?d00001 diff --git a/examples_extra/TextStressTest/Default-736h@3x.png b/examples_extra/TextStressTest/Default-736h@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..c8949cae16a4217842bd8ad813422c6b02e7cafa GIT binary patch literal 23380 zcmeI3&2QsG7{;dvp`~agBn}`rU}c2_5{^Co*u*CBswBI#5^1Zpi0)~3Y)@Ki6WiGC zChY|TCvFHXE5u>%NL;wV0fEGo^J@PC5E5KCaDuU&4|kFdg zdhMfNZ$I1by=i;VuulBQrS}<*{ybMEgw+Y z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e;NA`StUm=Bi)TpSQ_ z2)M+2xGdn}fQUoDCFa9r0T%~E90D#eA1({HI3VH>aEbYFS-`~s5r=?F%!kVYE)Iw| z1YBZ1To!O~K*S;767%7*fQthn4gr^#50?d891w9R#I-tq&6bAj-P#d*iT2)B=M(k< zuH>!n^bk6E38D8sKf00e*l5C8%|00;m9AOHk_01yBIKmZ5;0U!VbfB+Bx0zd!= l00AHX1c1Q*gn;t`y7MJkdHVCOto({Mu5Na}c>U)4e*&NtopJyG literal 0 HcmV?d00001 diff --git a/examples_extra/TextStressTest/Podfile b/examples_extra/TextStressTest/Podfile new file mode 100644 index 0000000000..5c30ce798e --- /dev/null +++ b/examples_extra/TextStressTest/Podfile @@ -0,0 +1,6 @@ +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '7.0' +target 'Sample' do + pod 'AsyncDisplayKit', :path => '../..' +end + diff --git a/examples_extra/TextStressTest/Sample.xcodeproj/project.pbxproj b/examples_extra/TextStressTest/Sample.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..3453463d27 --- /dev/null +++ b/examples_extra/TextStressTest/Sample.xcodeproj/project.pbxproj @@ -0,0 +1,364 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 0585428019D4DBE100606EA6 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0585427F19D4DBE100606EA6 /* Default-568h@2x.png */; }; + 05E2128719D4DB510098F589 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 05E2128619D4DB510098F589 /* main.m */; }; + 05E2128A19D4DB510098F589 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 05E2128919D4DB510098F589 /* AppDelegate.m */; }; + 05E2128D19D4DB510098F589 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 05E2128C19D4DB510098F589 /* ViewController.m */; }; + 6C2C82AC19EE274300767484 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C2C82AA19EE274300767484 /* Default-667h@2x.png */; }; + 6C2C82AD19EE274300767484 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C2C82AB19EE274300767484 /* Default-736h@3x.png */; }; + 92F1263CECFE3FFCC7A5F936 /* libPods-Sample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E8EC8300ABAAEA079224272A /* libPods-Sample.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 0585427F19D4DBE100606EA6 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "../Default-568h@2x.png"; sourceTree = ""; }; + 05E2128119D4DB510098F589 /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 05E2128519D4DB510098F589 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 05E2128619D4DB510098F589 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 05E2128819D4DB510098F589 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 05E2128919D4DB510098F589 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 05E2128B19D4DB510098F589 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 05E2128C19D4DB510098F589 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 0CDEE995962D3E4584D302EE /* Pods-Sample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig"; sourceTree = ""; }; + 6C2C82AA19EE274300767484 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = SOURCE_ROOT; }; + 6C2C82AB19EE274300767484 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = SOURCE_ROOT; }; + A950870A2154F92D5DC91F1A /* Pods-Sample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.release.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig"; sourceTree = ""; }; + E8EC8300ABAAEA079224272A /* libPods-Sample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Sample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 05E2127E19D4DB510098F589 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 92F1263CECFE3FFCC7A5F936 /* libPods-Sample.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 05E2127819D4DB510098F589 = { + isa = PBXGroup; + children = ( + 05E2128319D4DB510098F589 /* Sample */, + 05E2128219D4DB510098F589 /* Products */, + 6DE0E5D094594AB09140EF84 /* Pods */, + F5DF5EAD6C1B97F91D1C830F /* Frameworks */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 05E2128219D4DB510098F589 /* Products */ = { + isa = PBXGroup; + children = ( + 05E2128119D4DB510098F589 /* Sample.app */, + ); + name = Products; + sourceTree = ""; + }; + 05E2128319D4DB510098F589 /* Sample */ = { + isa = PBXGroup; + children = ( + 05E2128819D4DB510098F589 /* AppDelegate.h */, + 05E2128919D4DB510098F589 /* AppDelegate.m */, + 05E2128B19D4DB510098F589 /* ViewController.h */, + 05E2128C19D4DB510098F589 /* ViewController.m */, + 05E2128419D4DB510098F589 /* Supporting Files */, + ); + path = Sample; + sourceTree = ""; + }; + 05E2128419D4DB510098F589 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 0585427F19D4DBE100606EA6 /* Default-568h@2x.png */, + 6C2C82AA19EE274300767484 /* Default-667h@2x.png */, + 6C2C82AB19EE274300767484 /* Default-736h@3x.png */, + 05E2128519D4DB510098F589 /* Info.plist */, + 05E2128619D4DB510098F589 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 6DE0E5D094594AB09140EF84 /* Pods */ = { + isa = PBXGroup; + children = ( + 0CDEE995962D3E4584D302EE /* Pods-Sample.debug.xcconfig */, + A950870A2154F92D5DC91F1A /* Pods-Sample.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + F5DF5EAD6C1B97F91D1C830F /* Frameworks */ = { + isa = PBXGroup; + children = ( + E8EC8300ABAAEA079224272A /* libPods-Sample.a */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 05E2128019D4DB510098F589 /* Sample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 05E212A419D4DB510098F589 /* Build configuration list for PBXNativeTarget "Sample" */; + buildPhases = ( + 77F6A2B5E8DA12933E6365CE /* [CP] Check Pods Manifest.lock */, + 05E2127D19D4DB510098F589 /* Sources */, + 05E2127E19D4DB510098F589 /* Frameworks */, + 05E2127F19D4DB510098F589 /* Resources */, + 96436DA0C1AFF84D8041B522 /* [CP] Embed Pods Frameworks */, + D17B5BD4AA634EFE93D71E9F /* [CP] Copy Pods Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Sample; + productName = Sample; + productReference = 05E2128119D4DB510098F589 /* Sample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 05E2127919D4DB510098F589 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = Facebook; + TargetAttributes = { + 05E2128019D4DB510098F589 = { + CreatedOnToolsVersion = 6.0.1; + }; + }; + }; + buildConfigurationList = 05E2127C19D4DB510098F589 /* Build configuration list for PBXProject "Sample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 05E2127819D4DB510098F589; + productRefGroup = 05E2128219D4DB510098F589 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 05E2128019D4DB510098F589 /* Sample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 05E2127F19D4DB510098F589 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0585428019D4DBE100606EA6 /* Default-568h@2x.png in Resources */, + 6C2C82AC19EE274300767484 /* Default-667h@2x.png in Resources */, + 6C2C82AD19EE274300767484 /* Default-736h@3x.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 77F6A2B5E8DA12933E6365CE /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 96436DA0C1AFF84D8041B522 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + D17B5BD4AA634EFE93D71E9F /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 05E2127D19D4DB510098F589 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 05E2128D19D4DB510098F589 /* ViewController.m in Sources */, + 05E2128A19D4DB510098F589 /* AppDelegate.m in Sources */, + 05E2128719D4DB510098F589 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 05E212A219D4DB510098F589 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 05E212A319D4DB510098F589 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 05E212A519D4DB510098F589 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0CDEE995962D3E4584D302EE /* Pods-Sample.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Sample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.AsyncDisplayKit.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 05E212A619D4DB510098F589 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = A950870A2154F92D5DC91F1A /* Pods-Sample.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Sample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.AsyncDisplayKit.$(PRODUCT_NAME:rfc1034identifier)"; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 05E2127C19D4DB510098F589 /* Build configuration list for PBXProject "Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 05E212A219D4DB510098F589 /* Debug */, + 05E212A319D4DB510098F589 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 05E212A419D4DB510098F589 /* Build configuration list for PBXNativeTarget "Sample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 05E212A519D4DB510098F589 /* Debug */, + 05E212A619D4DB510098F589 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 05E2127919D4DB510098F589 /* Project object */; +} diff --git a/examples_extra/TextStressTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples_extra/TextStressTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme new file mode 100644 index 0000000000..d41d58c5d8 --- /dev/null +++ b/examples_extra/TextStressTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples_extra/TextStressTest/Sample/AppDelegate.h b/examples_extra/TextStressTest/Sample/AppDelegate.h new file mode 100644 index 0000000000..2aa29369b4 --- /dev/null +++ b/examples_extra/TextStressTest/Sample/AppDelegate.h @@ -0,0 +1,18 @@ +/* This file provided by Facebook is for non-commercial testing and evaluation + * purposes only. Facebook reserves all rights not expressly granted. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end diff --git a/examples_extra/TextStressTest/Sample/AppDelegate.m b/examples_extra/TextStressTest/Sample/AppDelegate.m new file mode 100644 index 0000000000..a8e5594780 --- /dev/null +++ b/examples_extra/TextStressTest/Sample/AppDelegate.m @@ -0,0 +1,27 @@ +/* This file provided by Facebook is for non-commercial testing and evaluation + * purposes only. Facebook reserves all rights not expressly granted. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "AppDelegate.h" + +#import "ViewController.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + self.window.backgroundColor = [UIColor whiteColor]; + self.window.rootViewController = [[ViewController alloc] init]; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/examples_extra/TextStressTest/Sample/Info.plist b/examples_extra/TextStressTest/Sample/Info.plist new file mode 100644 index 0000000000..fb4115c84c --- /dev/null +++ b/examples_extra/TextStressTest/Sample/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/examples_extra/TextStressTest/Sample/ViewController.h b/examples_extra/TextStressTest/Sample/ViewController.h new file mode 100644 index 0000000000..d0e9200d88 --- /dev/null +++ b/examples_extra/TextStressTest/Sample/ViewController.h @@ -0,0 +1,16 @@ +/* This file provided by Facebook is for non-commercial testing and evaluation + * purposes only. Facebook reserves all rights not expressly granted. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +@interface ViewController : UIViewController + +@end diff --git a/examples_extra/TextStressTest/Sample/ViewController.m b/examples_extra/TextStressTest/Sample/ViewController.m new file mode 100644 index 0000000000..3c21c64b8a --- /dev/null +++ b/examples_extra/TextStressTest/Sample/ViewController.m @@ -0,0 +1,165 @@ +/* This file provided by Facebook is for non-commercial testing and evaluation + * purposes only. Facebook reserves all rights not expressly granted. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#import "ViewController.h" +#import + +#define NUMBER_ELEMENTS 2 + +@interface ViewController () +{ + NSMutableArray *_textNodes; + NSMutableArray *_textLabels; + UIScrollView *_scrollView; +} + +@end + + +@implementation ViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + + _textNodes = [NSMutableArray array]; + _textLabels = [NSMutableArray array]; + + _scrollView = [[UIScrollView alloc] init]; + [self.view addSubview:_scrollView]; + + for (int i = 0; i < NUMBER_ELEMENTS; i++) { + + ASTextNode *node = [self createNodeForIndex:i]; + [_textNodes addObject:node]; + [_scrollView addSubnode:node]; + + UILabel *label = [self createLabelForIndex:i]; + [_textLabels addObject:label]; + [_scrollView addSubview:label]; + } +} + +- (void)viewWillLayoutSubviews +{ + [super viewWillLayoutSubviews]; + + CGFloat maxWidth = 0; + CGFloat maxHeight = 0; + + CGRect frame = CGRectMake(50, 50, 0, 0); + + for (int i = 0; i < NUMBER_ELEMENTS; i++) { + frame.size = [self sizeForIndex:i]; + [[_textNodes objectAtIndex:i] setFrame:frame]; + + frame.origin.x += frame.size.width + 50; + + [[_textLabels objectAtIndex:i] setFrame:frame]; + + if (frame.size.width > maxWidth) { + maxWidth = frame.size.width; + } + if ((frame.size.height + frame.origin.y) > maxHeight) { + maxHeight = frame.size.height + frame.origin.y; + } + + frame.origin.x -= frame.size.width + 50; + frame.origin.y += frame.size.height + 20; + } + + _scrollView.frame = self.view.bounds; + _scrollView.contentSize = CGSizeMake(maxWidth, maxHeight); +} + +- (ASTextNode *)createNodeForIndex:(NSUInteger)index +{ + ASTextNode *node = [[ASTextNode alloc] init]; + node.attributedText = [self textForIndex:index]; + node.backgroundColor = [UIColor orangeColor]; + + NSMutableAttributedString *string = [node.attributedText mutableCopy]; + + switch (index) { + case 0: // top justification (ASDK) vs. center justification (UILabel) + node.maximumNumberOfLines = 3; + return node; + + case 1: // default truncation attributed string color shouldn't match attributed text color (ASDK) vs. match (UIKit) + node.maximumNumberOfLines = 3; + [string addAttribute:NSForegroundColorAttributeName + value:[UIColor redColor] + range:NSMakeRange(0, [string length])]; + node.attributedText = string; + return node; + + default: + return nil; + } +} + +- (UILabel *)createLabelForIndex:(NSUInteger)index +{ + UILabel *label = [[UILabel alloc] init]; + label.attributedText = [self textForIndex:index]; + label.backgroundColor = [UIColor greenColor]; + + NSMutableAttributedString *string = [label.attributedText mutableCopy]; + + switch (index) { + case 0: + label.numberOfLines = 3; + return label; + + case 1: + label.numberOfLines = 3; + [string addAttribute:NSForegroundColorAttributeName + value:[UIColor redColor] + range:NSMakeRange(0, [string length])]; + label.attributedText = string; + return label; + + default: + return nil; + } +} + +- (NSAttributedString *)textForIndex:(NSUInteger)index +{ + NSDictionary *attrs = @{ NSFontAttributeName: [UIFont fontWithName:@"HelveticaNeue" size:12.0f] }; + + switch (index) { + case 0: + return [[NSAttributedString alloc] initWithString:@"1\n2\n3\n4\n5" attributes:attrs]; + + case 1: + return [[NSAttributedString alloc] initWithString:@"1\n2\n3\n4\n5" attributes:attrs]; + + default: + return nil; + } +} + +- (CGSize)sizeForIndex:(NSUInteger)index +{ + switch (index) { + case 0: + return CGSizeMake(40, 100); + + case 1: + return CGSizeMake(40, 100); + + default: + return CGSizeZero; + } +} + +@end diff --git a/examples_extra/TextStressTest/Sample/main.m b/examples_extra/TextStressTest/Sample/main.m new file mode 100644 index 0000000000..ae9488711c --- /dev/null +++ b/examples_extra/TextStressTest/Sample/main.m @@ -0,0 +1,20 @@ +/* This file provided by Facebook is for non-commercial testing and evaluation + * purposes only. Facebook reserves all rights not expressly granted. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} From 682ddcfe5113b64dd235339b68cda613ffafce50 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 4 Jul 2016 16:34:16 -0700 Subject: [PATCH 066/247] [AsyncDisplayKit+Utilities.h] Convenience methods for creating resizable circles & rounded rects. (#1811) * [AsyncDisplayKit+Utilities.h] UIImage category for performant (optionally rounded) flat color stretchable images * treat clear background color as no background color (D99117) * add borderWidth * add several shorter methods per Scott's comment * rename files and add to AsyncDisplayKit.h * fix xcode project file * update commentse --- AsyncDisplayKit.xcodeproj/project.pbxproj | 12 ++ AsyncDisplayKit/AsyncDisplayKit.h | 10 +- AsyncDisplayKit/UIImage+ASConvenience.h | 71 ++++++++++++ AsyncDisplayKit/UIImage+ASConvenience.m | 131 ++++++++++++++++++++++ 4 files changed, 220 insertions(+), 4 deletions(-) create mode 100644 AsyncDisplayKit/UIImage+ASConvenience.h create mode 100644 AsyncDisplayKit/UIImage+ASConvenience.m diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 47111722cc..16d2cb2efd 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -314,6 +314,10 @@ 7AB338661C55B3420055FDE8 /* ASRelativeLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A06A7381C35F08800FE8DAA /* ASRelativeLayoutSpec.mm */; }; 7AB338671C55B3460055FDE8 /* ASRelativeLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A06A7391C35F08800FE8DAA /* ASRelativeLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7AB338691C55B97B0055FDE8 /* ASRelativeLayoutSpecSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7AB338681C55B97B0055FDE8 /* ASRelativeLayoutSpecSnapshotTests.mm */; }; + 8021EC1C1D2B00B100799119 /* UIImage+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 8021EC1A1D2B00B100799119 /* UIImage+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8021EC1D1D2B00B100799119 /* UIImage+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 8021EC1A1D2B00B100799119 /* UIImage+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8021EC1E1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */; }; + 8021EC1F1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */; }; 81EE384F1C8E94F000456208 /* ASRunLoopQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EE384D1C8E94F000456208 /* ASRunLoopQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; 81EE38501C8E94F000456208 /* ASRunLoopQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */; }; 8B0768B31CE752EC002E1453 /* ASDefaultPlaybackButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */; }; @@ -840,6 +844,8 @@ 7A06A7381C35F08800FE8DAA /* ASRelativeLayoutSpec.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASRelativeLayoutSpec.mm; path = AsyncDisplayKit/Layout/ASRelativeLayoutSpec.mm; sourceTree = ""; }; 7A06A7391C35F08800FE8DAA /* ASRelativeLayoutSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASRelativeLayoutSpec.h; path = AsyncDisplayKit/Layout/ASRelativeLayoutSpec.h; sourceTree = ""; }; 7AB338681C55B97B0055FDE8 /* ASRelativeLayoutSpecSnapshotTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASRelativeLayoutSpecSnapshotTests.mm; sourceTree = ""; }; + 8021EC1A1D2B00B100799119 /* UIImage+ASConvenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ASConvenience.h"; sourceTree = ""; }; + 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ASConvenience.m"; sourceTree = ""; }; 81EE384D1C8E94F000456208 /* ASRunLoopQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASRunLoopQueue.h; path = ../ASRunLoopQueue.h; sourceTree = ""; }; 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASRunLoopQueue.mm; path = ../ASRunLoopQueue.mm; sourceTree = ""; }; 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASDefaultPlaybackButton.h; sourceTree = ""; }; @@ -1124,6 +1130,8 @@ 058D09DD195D050800B7D73C /* ASImageNode.h */, 058D09DE195D050800B7D73C /* ASImageNode.mm */, 68355B2E1CB5799E001D4E68 /* ASImageNode+AnimatedImage.mm */, + 8021EC1A1D2B00B100799119 /* UIImage+ASConvenience.h */, + 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */, 0516FA3E1A1563D200B4EBED /* ASMultiplexImageNode.h */, 0516FA3F1A1563D200B4EBED /* ASMultiplexImageNode.mm */, 68FC85DC1CE29AB700EDD713 /* ASNavigationController.h */, @@ -1594,6 +1602,7 @@ AC7A2C171BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */, 058D0A4D195D05CB00B7D73C /* ASDisplayNodeExtras.h in Headers */, 92074A671CC8BADA00918F75 /* ASControlNode+tvOS.h in Headers */, + 8021EC1C1D2B00B100799119 /* UIImage+ASConvenience.h in Headers */, 697C0DE31CF38F28001DE0D4 /* ASLayoutValidation.h in Headers */, 68355B3B1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h in Headers */, 68B0277A1C1A79CC0041016B /* ASDisplayNode+Beta.h in Headers */, @@ -1753,6 +1762,7 @@ A37320101C571B740011FC94 /* ASTextNode+Beta.h in Headers */, DBABFAFC1C6A8D2F0039EA4A /* _ASTransitionContext.h in Headers */, 9C70F2061CDA4F0C007D6C76 /* ASTraitCollection.h in Headers */, + 8021EC1D1D2B00B100799119 /* UIImage+ASConvenience.h in Headers */, 254C6B801BF94DF4003EC431 /* ASEqualityHashHelpers.h in Headers */, B350624F1B010EFD0018CF92 /* ASDisplayNode+DebugTiming.h in Headers */, B35061FD1B010EFD0018CF92 /* ASDisplayNode+Subclasses.h in Headers */, @@ -2093,6 +2103,7 @@ B30BF6531C5964B0004FCD53 /* ASLayoutManager.m in Sources */, 05A6D05B19D0EB64002DD95E /* ASDealloc2MainObject.m in Sources */, ACF6ED211B17843500DA7C62 /* ASDimension.mm in Sources */, + 8021EC1E1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */, 058D0A28195D050800B7D73C /* ASDisplayNode+AsyncDisplay.mm in Sources */, 058D0A29195D050800B7D73C /* ASDisplayNode+DebugTiming.mm in Sources */, 764D83D61C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m in Sources */, @@ -2260,6 +2271,7 @@ B35061F61B010EFD0018CF92 /* ASCollectionView.mm in Sources */, 509E68641B3AEDB7009B9150 /* ASCollectionViewLayoutController.mm in Sources */, B35061F91B010EFD0018CF92 /* ASControlNode.mm in Sources */, + 8021EC1F1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */, B35062181B010EFD0018CF92 /* ASDataController.mm in Sources */, B350621A1B010EFD0018CF92 /* ASDealloc2MainObject.m in Sources */, 767E7F8E1C90191D0066C000 /* AsyncDisplayKit+Debug.m in Sources */, diff --git a/AsyncDisplayKit/AsyncDisplayKit.h b/AsyncDisplayKit/AsyncDisplayKit.h index 0064993276..88547b0694 100644 --- a/AsyncDisplayKit/AsyncDisplayKit.h +++ b/AsyncDisplayKit/AsyncDisplayKit.h @@ -75,15 +75,17 @@ #import #import #import -#import -#import -#import -#import #import #import #import #import +#import +#import +#import +#import +#import + #import #import diff --git a/AsyncDisplayKit/UIImage+ASConvenience.h b/AsyncDisplayKit/UIImage+ASConvenience.h new file mode 100644 index 0000000000..092bdbcd55 --- /dev/null +++ b/AsyncDisplayKit/UIImage+ASConvenience.h @@ -0,0 +1,71 @@ +// +// UIImage+ASConvenience.h +// AsyncDisplayKit +// +// Created by Hannah Troisi on 6/24/16. +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// + +#import +#import + +// High-performance flat-colored, rounded-corner resizable images +// +// For "Baked-in Opaque" corners, set cornerColor equal to the color behind the rounded image object, e.g. the background color. +// For "Baked-in Alpha" corners, set cornerColor = [UIColor clearColor] +// +// See http://asyncdisplaykit.org/docs/corner-rounding.html for an explanation. + +@interface UIImage (ASDKAdditions) + +/** + * This generates a flat-color, rounded-corner resizeable image + * + * @param cornerRadius The radius of the rounded-corner + * @param cornerColor The fill color of the corners (For Alpha corners use clearColor) + * @param fillColor The fill color of the rounded-corner image + */ ++ (UIImage *)as_resizableRoundedImageWithCornerRadius:(CGFloat)cornerRadius + cornerColor:(UIColor *)cornerColor + fillColor:(UIColor *)fillColor; + +/** + * This generates a flat-color, rounded-corner resizeable image with a border + * + * @param cornerRadius The radius of the rounded-corner + * @param cornerColor The fill color of the corners (For Alpha corners use clearColor) + * @param fillColor The fill color of the rounded-corner image + * @param borderColor The border color. Set to nil for no border. + * @param borderWidth The border width. Dummy value if borderColor = nil. + */ ++ (UIImage *)as_resizableRoundedImageWithCornerRadius:(CGFloat)cornerRadius + cornerColor:(UIColor *)cornerColor + fillColor:(UIColor *)fillColor + borderColor:(UIColor *)borderColor + borderWidth:(CGFloat)borderWidth; + +/** + * This generates a flat-color, rounded-corner resizeable image with a border + * + * @param cornerRadius The radius of the rounded-corner + * @param cornerColor The fill color of the corners (For Alpha corners use clearColor) + * @param fillColor The fill color of the rounded-corner image + * @param borderColor The border color. Set to nil for no border. + * @param borderWidth The border width. Dummy value if borderColor = nil. + * @param roundedCorners Select individual or multiple corners to round. Set to UIRectCornerAllCorners to round all 4 corners. + * @param scale The number of pixels per point. Provide 0.0 to use the screen scale. + */ ++ (UIImage *)as_resizableRoundedImageWithCornerRadius:(CGFloat)cornerRadius + cornerColor:(UIColor *)cornerColor + fillColor:(UIColor *)fillColor + borderColor:(UIColor *)borderColor + borderWidth:(CGFloat)borderWidth + roundedCorners:(UIRectCorner)roundedCorners + scale:(CGFloat)scale; + +@end + diff --git a/AsyncDisplayKit/UIImage+ASConvenience.m b/AsyncDisplayKit/UIImage+ASConvenience.m new file mode 100644 index 0000000000..4b3ce606ec --- /dev/null +++ b/AsyncDisplayKit/UIImage+ASConvenience.m @@ -0,0 +1,131 @@ +// +// UIImage+ASConvenience.m +// AsyncDisplayKit +// +// Created by Hannah Troisi on 6/24/16. +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// + +#import "UIImage+ASConvenience.h" +#import + +@implementation UIImage (ASDKAdditions) + + + + ++ (UIImage *)as_resizableRoundedImageWithCornerRadius:(CGFloat)cornerRadius + cornerColor:(UIColor *)cornerColor + fillColor:(UIColor *)fillColor +{ + return [self as_resizableRoundedImageWithCornerRadius:cornerRadius + cornerColor:cornerColor + fillColor:fillColor + borderColor:nil + borderWidth:1.0 + roundedCorners:UIRectCornerAllCorners + scale:0.0]; +} + ++ (UIImage *)as_resizableRoundedImageWithCornerRadius:(CGFloat)cornerRadius + cornerColor:(UIColor *)cornerColor + fillColor:(UIColor *)fillColor + borderColor:(UIColor *)borderColor + borderWidth:(CGFloat)borderWidth +{ + return [self as_resizableRoundedImageWithCornerRadius:cornerRadius + cornerColor:cornerColor + fillColor:fillColor + borderColor:borderColor + borderWidth:borderWidth + roundedCorners:UIRectCornerAllCorners + scale:0.0]; +} + ++ (UIImage *)as_resizableRoundedImageWithCornerRadius:(CGFloat)cornerRadius + cornerColor:(UIColor *)cornerColor + fillColor:(UIColor *)fillColor + borderColor:(UIColor *)borderColor + borderWidth:(CGFloat)borderWidth + roundedCorners:(UIRectCorner)roundedCorners + scale:(CGFloat)scale +{ + static NSCache *__pathCache = nil; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + __pathCache = [[NSCache alloc] init]; + // UIBezierPath objects are fairly small and these are equally sized. 20 should be plenty for many different parameters. + __pathCache.countLimit = 20; + }); + + // Treat clear background color as no background color + if ([cornerColor isEqual:[UIColor clearColor]]) { + cornerColor = nil; + } + + CGFloat dimension = (cornerRadius * 2) + 1; + CGRect bounds = CGRectMake(0, 0, dimension, dimension); + + // This is a hack to make one NSNumber key out of the corners and cornerRadius + if (roundedCorners == UIRectCornerAllCorners) { + // UIRectCornerAllCorners is ~0, but below is equivalent and we can pack it into half an NSUInteger + roundedCorners = UIRectCornerTopLeft | UIRectCornerTopRight | UIRectCornerBottomLeft | UIRectCornerBottomRight; + } + // Left half of NSUInteger is roundedCorners, right half is cornerRadius + UInt64 pathKeyNSUInteger = (UInt64)roundedCorners << sizeof(Float32) * 8; + Float32 floatCornerRadius = cornerRadius; + pathKeyNSUInteger |= (NSUInteger)floatCornerRadius; + + NSNumber *pathKey = [NSNumber numberWithUnsignedLongLong:pathKeyNSUInteger]; + + UIBezierPath *path = nil; + CGSize cornerRadii = CGSizeMake(cornerRadius, cornerRadius); + + @synchronized(__pathCache) { + path = [__pathCache objectForKey:pathKey]; + if (!path) { + path = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:roundedCorners cornerRadii:cornerRadii]; + [__pathCache setObject:path forKey:pathKey]; + } + } + + // We should probably check if the background color has any alpha component but that + // might be expensive due to needing to check mulitple color spaces. + UIGraphicsBeginImageContextWithOptions(bounds.size, cornerColor != nil, scale); + + if (cornerColor) { + [cornerColor setFill]; + // Copy "blend" mode is extra fast because it disregards any value currently in the buffer and overwrites directly. + UIRectFillUsingBlendMode(bounds, kCGBlendModeCopy); + } + + [fillColor setFill]; + [path fill]; + + if (borderColor) { + [borderColor setStroke]; + + // Inset border fully inside filled path (not halfway on each side of path) + CGRect strokeRect = CGRectInset(bounds, borderWidth / 2.0, borderWidth / 2.0); + + // It is rarer to have a stroke path, and our cache key only handles rounded rects for the exact-stretchable + // size calculated by cornerRadius, so we won't bother caching this path. Profiling validates this decision. + UIBezierPath *strokePath = [UIBezierPath bezierPathWithRoundedRect:strokeRect cornerRadius:cornerRadius]; + [strokePath setLineWidth:borderWidth]; + [strokePath stroke]; + } + + UIImage *result = UIGraphicsGetImageFromCurrentImageContext(); + UIGraphicsEndImageContext(); + + UIEdgeInsets capInsets = UIEdgeInsetsMake(cornerRadius, cornerRadius, cornerRadius, cornerRadius); + result = [result resizableImageWithCapInsets:capInsets resizingMode:UIImageResizingModeStretch]; + + return result; +} + +@end \ No newline at end of file From b9b002354a3a668f2555966e91e91933c7d5b5fc Mon Sep 17 00:00:00 2001 From: Gareth Reese Date: Tue, 5 Jul 2016 13:27:53 +0100 Subject: [PATCH 067/247] [ASVideoNode] Only seek to beginning when auto repeating --- AsyncDisplayKit/ASVideoNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 1248f8f9e2..85ae4534d2 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -595,9 +595,9 @@ static NSString * const kStatus = @"status"; [_delegate videoPlaybackDidFinish:self]; #pragma clang diagnostic pop } - [_player seekToTime:kCMTimeZero]; if (_shouldAutorepeat) { + [_player seekToTime:kCMTimeZero]; [self play]; } else { [self pause]; From 3994f2089c0ef7e8881522e5baf77fa103488e08 Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Tue, 5 Jul 2016 17:47:00 -0700 Subject: [PATCH 068/247] [ASCellNode] Final revisions to behavior of setSelected: & setHighlighted: --- AsyncDisplayKit/ASCellNode+Internal.h | 3 +++ AsyncDisplayKit/ASCellNode.mm | 27 ++++++++++++++++++-- AsyncDisplayKit/ASCollectionView.mm | 20 +++++---------- AsyncDisplayKit/ASTableView.mm | 20 +++++---------- AsyncDisplayKitTests/ASCollectionViewTests.m | 7 +++-- 5 files changed, 43 insertions(+), 34 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode+Internal.h b/AsyncDisplayKit/ASCellNode+Internal.h index b185d4ed01..58c099f2ab 100644 --- a/AsyncDisplayKit/ASCellNode+Internal.h +++ b/AsyncDisplayKit/ASCellNode+Internal.h @@ -46,4 +46,7 @@ */ @property (nonatomic, weak) UIScrollView *scrollView; +- (void)__setSelectedFromUIKit:(BOOL)selected; +- (void)__setHighlightedFromUIKit:(BOOL)highlighted; + @end diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index 851521a857..1b9c69de5b 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -31,6 +31,7 @@ ASDisplayNodeDidLoadBlock _viewControllerDidLoadBlock; ASDisplayNode *_viewControllerNode; UIViewController *_viewController; + BOOL _suspendInteractionDelegate; } @end @@ -182,16 +183,38 @@ { if (_selected != selected) { _selected = selected; - [_interactionDelegate nodeSelectedStateDidChange:self]; + if (!_suspendInteractionDelegate) { + [_interactionDelegate nodeSelectedStateDidChange:self]; + } } } - (void)setHighlighted:(BOOL)highlighted { if (_highlighted != highlighted) { - _highlighted = highlighted; + _highlighted = highlighted; + if (!_suspendInteractionDelegate) { [_interactionDelegate nodeHighlightedStateDidChange:self]; } + } +} + +- (void)__setSelectedFromUIKit:(BOOL)selected; +{ + if (selected != _selected) { + _suspendInteractionDelegate = YES; + self.selected = selected; + _suspendInteractionDelegate = NO; + } +} + +- (void)__setHighlightedFromUIKit:(BOOL)highlighted; +{ + if (highlighted != _highlighted) { + _suspendInteractionDelegate = YES; + self.highlighted = highlighted; + _suspendInteractionDelegate = NO; + } } - (BOOL)selected diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index e5546436ac..c81450e267 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -43,31 +43,23 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; { _node = node; if (node.selected != self.selected) { - node.selected = self.selected; + [node __setSelectedFromUIKit:self.selected]; } if (node.highlighted != self.highlighted) { - node.highlighted = self.highlighted; + [node __setHighlightedFromUIKit:self.highlighted]; } } - (void)setSelected:(BOOL)selected { - if (selected != self.selected) { - [super setSelected:selected]; - } - if (selected != _node.selected) { - _node.selected = selected; - } + [super setSelected:selected]; + [_node __setSelectedFromUIKit:selected]; } - (void)setHighlighted:(BOOL)highlighted { - if (highlighted != self.highlighted) { - [super setHighlighted:highlighted]; - } - if (highlighted != _node.highlighted) { - _node.highlighted = highlighted; - } + [super setHighlighted:highlighted]; + [_node __setHighlightedFromUIKit:highlighted]; } - (void)prepareForReuse diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index db73c8049c..4f04ede236 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -68,31 +68,23 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; { _node = node; if (node.selected != self.selected) { - node.selected = self.selected; + [node __setSelectedFromUIKit:self.selected]; } if (node.highlighted != self.highlighted) { - node.highlighted = self.highlighted; + [node __setHighlightedFromUIKit:self.highlighted]; } } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { - if (selected != self.selected) { - [super setSelected:selected animated:animated]; - } - if (selected != _node.selected) { - _node.selected = selected; - } + [super setSelected:selected animated:animated]; + [_node __setSelectedFromUIKit:selected]; } - (void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated { - if (highlighted != self.highlighted) { - [super setHighlighted:highlighted animated:animated]; - } - if (highlighted != _node.highlighted) { - _node.highlighted = highlighted; - } + [super setHighlighted:highlighted animated:animated]; + [_node __setHighlightedFromUIKit:highlighted]; } - (void)prepareForReuse diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 5253562d6d..914b884bcb 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -179,9 +179,8 @@ [testController.collectionView deselectItemAtIndexPath:indexPath animated:NO]; XCTAssertTrue(node.isSelected == NO, @"Deselecting cell should update node selection."); - // selecting cell should select node - UICollectionViewCell *cell = [testController.collectionView cellForItemAtIndexPath:indexPath]; - cell.selected = YES; + // select the cell again, scroll down and back up, and check that the state persisted + [testController.collectionView selectItemAtIndexPath:indexPath animated:NO scrollPosition:UICollectionViewScrollPositionNone]; XCTAssertTrue(node.isSelected == YES, @"Selecting cell should update node selection."); // reload cell (-prepareForReuse is called) & check that selected state is preserved @@ -192,7 +191,7 @@ XCTAssertTrue(node.isSelected == YES, @"Reloaded cell should preserve state."); // deselecting cell should deselect node - cell = [testController.collectionView cellForItemAtIndexPath:indexPath]; + UICollectionViewCell *cell = [testController.collectionView cellForItemAtIndexPath:indexPath]; cell.selected = NO; XCTAssertTrue(node.isSelected == NO, @"Deselecting cell should update node selection."); From edd656f321a50169755bc4da220dedf9127f3a7e Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Tue, 5 Jul 2016 18:48:15 -0700 Subject: [PATCH 069/247] update cocoapod stats --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 812826197f..4185ee20e2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![AsyncDisplayKit](https://github.com/facebook/AsyncDisplayKit/blob/master/docs/assets/logo.png) -[![Apps Using](https://img.shields.io/badge/Apps%20Using%20ASDK-%3E3,658-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) -[![Downloads](https://img.shields.io/badge/Total%20Downloads-%3E377,749-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) +[![Apps Using](https://img.shields.io/badge/Apps%20Using%20ASDK-%3E4,646-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) +[![Downloads](https://img.shields.io/badge/Total%20Downloads-%3E475,500-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) [![Platform](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS-orange.svg)](http://AsyncDisplayKit.org) [![Languages](https://img.shields.io/badge/languages-ObjC%20%7C%20Swift-orange.svg)](http://AsyncDisplayKit.org) From f6d30b668d930dc3cd99723d418493f53b4e2f7e Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Tue, 5 Jul 2016 21:30:09 -0700 Subject: [PATCH 070/247] add comments to deprecated getter methods, remove extraneous if statements --- AsyncDisplayKit/ASCellNode.h | 4 ++++ AsyncDisplayKit/ASCollectionView.mm | 8 ++------ AsyncDisplayKit/ASTableView.mm | 8 ++------ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index 1d642b9b66..fe919c23d5 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -126,6 +126,10 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { @interface ASCellNode (Deprecated) +/** + * Previous versions of ASDK did not include "is" in the name of the getter for these properties. + * These older accessor methods don't match UIKit naming, and will be removed in a future version. + */ - (BOOL)selected ASDISPLAYNODE_DEPRECATED; - (BOOL)highlighted ASDISPLAYNODE_DEPRECATED; diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index c81450e267..59616f563a 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -42,12 +42,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)setNode:(ASCellNode *)node { _node = node; - if (node.selected != self.selected) { - [node __setSelectedFromUIKit:self.selected]; - } - if (node.highlighted != self.highlighted) { - [node __setHighlightedFromUIKit:self.highlighted]; - } + [node __setSelectedFromUIKit:self.selected]; + [node __setHighlightedFromUIKit:self.highlighted]; } - (void)setSelected:(BOOL)selected diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 4f04ede236..6528874e03 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -67,12 +67,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)setNode:(ASCellNode *)node { _node = node; - if (node.selected != self.selected) { - [node __setSelectedFromUIKit:self.selected]; - } - if (node.highlighted != self.highlighted) { - [node __setHighlightedFromUIKit:self.highlighted]; - } + [node __setSelectedFromUIKit:self.selected]; + [node __setHighlightedFromUIKit:self.highlighted]; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated From 9eed54491ea35d3c13d089d1e8c3b12ff4f38357 Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Wed, 6 Jul 2016 16:26:01 +1000 Subject: [PATCH 071/247] Copy header files using the Copy Files phase rather than the Headers phase since this is how static libraries are expected to expose their headers to clients. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 606 +++++++++++----------- 1 file changed, 292 insertions(+), 314 deletions(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 16d2cb2efd..218c4d3fb7 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -10,38 +10,26 @@ 044284FD1BAA365100D16268 /* UICollectionViewLayout+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E0E1B371875007741D0 /* UICollectionViewLayout+ASConvenience.m */; }; 044284FE1BAA387800D16268 /* ASStackLayoutSpecUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED461B17847A00DA7C62 /* ASStackLayoutSpecUtilities.h */; }; 044284FF1BAA3BD600D16268 /* UICollectionViewLayout+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 205F0E0D1B371875007741D0 /* UICollectionViewLayout+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 044285071BAA63FE00D16268 /* ASBatchFetching.h in Headers */ = {isa = PBXBuildFile; fileRef = 044285051BAA63FE00D16268 /* ASBatchFetching.h */; }; 044285081BAA63FE00D16268 /* ASBatchFetching.h in Headers */ = {isa = PBXBuildFile; fileRef = 044285051BAA63FE00D16268 /* ASBatchFetching.h */; }; 044285091BAA63FE00D16268 /* ASBatchFetching.m in Sources */ = {isa = PBXBuildFile; fileRef = 044285061BAA63FE00D16268 /* ASBatchFetching.m */; }; 0442850A1BAA63FE00D16268 /* ASBatchFetching.m in Sources */ = {isa = PBXBuildFile; fileRef = 044285061BAA63FE00D16268 /* ASBatchFetching.m */; }; - 0442850D1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */; }; 0442850E1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */; }; 0442850F1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0442850C1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm */; }; 044285101BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0442850C1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm */; }; 0515EA211A15769900BA8B9A /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 051943141A1575670030A7D0 /* Photos.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 0515EA221A1576A100BA8B9A /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 051943121A1575630030A7D0 /* AssetsLibrary.framework */; }; - 0516FA3C1A15563400B4EBED /* ASAvailability.h in Headers */ = {isa = PBXBuildFile; fileRef = 0516FA3A1A15563400B4EBED /* ASAvailability.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0516FA3D1A15563400B4EBED /* ASLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 0516FA3B1A15563400B4EBED /* ASLog.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0516FA401A1563D200B4EBED /* ASMultiplexImageNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0516FA3E1A1563D200B4EBED /* ASMultiplexImageNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0516FA411A1563D200B4EBED /* ASMultiplexImageNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0516FA3F1A1563D200B4EBED /* ASMultiplexImageNode.mm */; }; 051943131A1575630030A7D0 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 051943121A1575630030A7D0 /* AssetsLibrary.framework */; }; 051943151A1575670030A7D0 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 051943141A1575670030A7D0 /* Photos.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 052EE0661A159FEF002C6279 /* ASMultiplexImageNodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 052EE0651A159FEF002C6279 /* ASMultiplexImageNodeTests.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 052EE06B1A15A0D8002C6279 /* TestResources in Resources */ = {isa = PBXBuildFile; fileRef = 052EE06A1A15A0D8002C6279 /* TestResources */; }; - 054963491A1EA066000F8E56 /* ASBasicImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 054963471A1EA066000F8E56 /* ASBasicImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0549634A1A1EA066000F8E56 /* ASBasicImageDownloader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 054963481A1EA066000F8E56 /* ASBasicImageDownloader.mm */; }; - 055B9FA81A1C154B00035D6D /* ASNetworkImageNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 055B9FA61A1C154B00035D6D /* ASNetworkImageNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 055B9FA91A1C154B00035D6D /* ASNetworkImageNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 055B9FA71A1C154B00035D6D /* ASNetworkImageNode.mm */; }; - 055F1A3419ABD3E3004DAFF1 /* ASTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 055F1A3219ABD3E3004DAFF1 /* ASTableView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 055F1A3519ABD3E3004DAFF1 /* ASTableView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 055F1A3319ABD3E3004DAFF1 /* ASTableView.mm */; }; - 055F1A3819ABD413004DAFF1 /* ASRangeController.h in Headers */ = {isa = PBXBuildFile; fileRef = 055F1A3619ABD413004DAFF1 /* ASRangeController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 055F1A3919ABD413004DAFF1 /* ASRangeController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 055F1A3719ABD413004DAFF1 /* ASRangeController.mm */; }; - 055F1A3C19ABD43F004DAFF1 /* ASCellNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 055F1A3A19ABD43F004DAFF1 /* ASCellNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 056D21551ABCEF50001107EF /* ASImageNodeSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 056D21541ABCEF50001107EF /* ASImageNodeSnapshotTests.m */; }; - 0574D5E219C110940097DC25 /* ASTableViewProtocols.h in Headers */ = {isa = PBXBuildFile; fileRef = 0574D5E119C110610097DC25 /* ASTableViewProtocols.h */; settings = {ATTRIBUTES = (Public, ); }; }; 057D02C41AC0A66700C7AC3C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 057D02C31AC0A66700C7AC3C /* main.m */; }; 057D02C71AC0A66700C7AC3C /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 057D02C61AC0A66700C7AC3C /* AppDelegate.mm */; }; - 0587F9BD1A7309ED00AFF0BA /* ASEditableTextNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 0587F9BB1A7309ED00AFF0BA /* ASEditableTextNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0587F9BE1A7309ED00AFF0BA /* ASEditableTextNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0587F9BC1A7309ED00AFF0BA /* ASEditableTextNode.mm */; }; 058D09B0195D04C000B7D73C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 058D09AF195D04C000B7D73C /* Foundation.framework */; }; 058D09BE195D04C000B7D73C /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 058D09BD195D04C000B7D73C /* XCTest.framework */; }; @@ -77,59 +65,20 @@ 058D0A3D195D057000B7D73C /* ASTextKitCoreTextAdditionsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 058D0A33195D057000B7D73C /* ASTextKitCoreTextAdditionsTests.m */; }; 058D0A40195D057000B7D73C /* ASTextNodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 058D0A36195D057000B7D73C /* ASTextNodeTests.m */; }; 058D0A41195D057000B7D73C /* ASTextNodeWordKernerTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 058D0A37195D057000B7D73C /* ASTextNodeWordKernerTests.mm */; }; - 058D0A47195D05CB00B7D73C /* ASControlNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09D5195D050800B7D73C /* ASControlNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A49195D05CB00B7D73C /* ASControlNode+Subclasses.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09D7195D050800B7D73C /* ASControlNode+Subclasses.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A4A195D05CB00B7D73C /* ASDisplayNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09D8195D050800B7D73C /* ASDisplayNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A4C195D05CB00B7D73C /* ASDisplayNode+Subclasses.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09DA195D050800B7D73C /* ASDisplayNode+Subclasses.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A4D195D05CB00B7D73C /* ASDisplayNodeExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09DB195D050800B7D73C /* ASDisplayNodeExtras.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A4F195D05CB00B7D73C /* ASImageNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09DD195D050800B7D73C /* ASImageNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A51195D05CB00B7D73C /* ASTextNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09DF195D050800B7D73C /* ASTextNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A53195D05DC00B7D73C /* _ASDisplayLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09E2195D050800B7D73C /* _ASDisplayLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A55195D05DC00B7D73C /* _ASDisplayView.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09E4195D050800B7D73C /* _ASDisplayView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A57195D05DC00B7D73C /* ASHighlightOverlayLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09E6195D050800B7D73C /* ASHighlightOverlayLayer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A59195D05DC00B7D73C /* ASMutableAttributedStringBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09E8195D050800B7D73C /* ASMutableAttributedStringBuilder.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A66195D05DC00B7D73C /* NSMutableAttributedString+TextKitAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09F5195D050800B7D73C /* NSMutableAttributedString+TextKitAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A68195D05EC00B7D73C /* _ASAsyncTransaction.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09F8195D050800B7D73C /* _ASAsyncTransaction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A6A195D05EC00B7D73C /* _ASAsyncTransactionContainer+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09FA195D050800B7D73C /* _ASAsyncTransactionContainer+Private.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A6B195D05EC00B7D73C /* _ASAsyncTransactionContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09FB195D050800B7D73C /* _ASAsyncTransactionContainer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A6D195D05EC00B7D73C /* _ASAsyncTransactionGroup.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09FD195D050800B7D73C /* _ASAsyncTransactionGroup.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A6F195D05EC00B7D73C /* UIView+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D09FF195D050800B7D73C /* UIView+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A71195D05F800B7D73C /* _AS-objc-internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A02195D050800B7D73C /* _AS-objc-internal.h */; }; - 058D0A72195D05F800B7D73C /* _ASCoreAnimationExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A03195D050800B7D73C /* _ASCoreAnimationExtras.h */; }; - 058D0A74195D05F800B7D73C /* _ASPendingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A05195D050800B7D73C /* _ASPendingState.h */; }; - 058D0A76195D05F900B7D73C /* _ASScopeTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A07195D050800B7D73C /* _ASScopeTimer.h */; }; - 058D0A78195D05F900B7D73C /* ASDisplayNode+DebugTiming.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A09195D050800B7D73C /* ASDisplayNode+DebugTiming.h */; }; - 058D0A7B195D05F900B7D73C /* ASDisplayNodeInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */; }; - 058D0A7C195D05F900B7D73C /* ASImageNode+CGExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */; }; - 058D0A7F195D05F900B7D73C /* ASSentinel.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A10195D050800B7D73C /* ASSentinel.h */; }; - 058D0A81195D05F900B7D73C /* ASThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A12195D050800B7D73C /* ASThread.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A82195D060300B7D73C /* ASAssert.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A43195D058D00B7D73C /* ASAssert.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 058D0A83195D060300B7D73C /* ASBaseDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 058D0A44195D058D00B7D73C /* ASBaseDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 05A6D05A19D0EB64002DD95E /* ASDealloc2MainObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 05A6D05819D0EB64002DD95E /* ASDealloc2MainObject.h */; settings = {ATTRIBUTES = (Public, ); }; }; 05A6D05B19D0EB64002DD95E /* ASDealloc2MainObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 05A6D05919D0EB64002DD95E /* ASDealloc2MainObject.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 05EA6FE71AC0966E00E35788 /* ASSnapshotTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 05EA6FE61AC0966E00E35788 /* ASSnapshotTestCase.mm */; }; - 05F20AA41A15733C00DCA68A /* ASImageProtocols.h in Headers */ = {isa = PBXBuildFile; fileRef = 05F20AA31A15733C00DCA68A /* ASImageProtocols.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 18C2ED7E1B9B7DE800F627B3 /* ASCollectionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 18C2ED7C1B9B7DE800F627B3 /* ASCollectionNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18C2ED7F1B9B7DE800F627B3 /* ASCollectionNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 18C2ED7C1B9B7DE800F627B3 /* ASCollectionNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18C2ED801B9B7DE800F627B3 /* ASCollectionNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 18C2ED7D1B9B7DE800F627B3 /* ASCollectionNode.mm */; }; 18C2ED831B9B7DE800F627B3 /* ASCollectionNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 18C2ED7D1B9B7DE800F627B3 /* ASCollectionNode.mm */; }; - 1950C4491A3BB5C1005C8279 /* ASEqualityHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1950C4481A3BB5C1005C8279 /* ASEqualityHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; 204C979E1B362CB3002B1083 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 204C979D1B362CB3002B1083 /* Default-568h@2x.png */; }; - 205F0E0F1B371875007741D0 /* UICollectionViewLayout+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 205F0E0D1B371875007741D0 /* UICollectionViewLayout+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; 205F0E101B371875007741D0 /* UICollectionViewLayout+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E0E1B371875007741D0 /* UICollectionViewLayout+ASConvenience.m */; }; 205F0E121B371BD7007741D0 /* ASScrollDirection.m in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E111B371BD7007741D0 /* ASScrollDirection.m */; }; - 205F0E191B37339C007741D0 /* ASAbstractLayoutController.h in Headers */ = {isa = PBXBuildFile; fileRef = 205F0E171B37339C007741D0 /* ASAbstractLayoutController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 205F0E1A1B37339C007741D0 /* ASAbstractLayoutController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E181B37339C007741D0 /* ASAbstractLayoutController.mm */; }; - 205F0E1D1B373A2C007741D0 /* ASCollectionViewLayoutController.h in Headers */ = {isa = PBXBuildFile; fileRef = 205F0E1B1B373A2C007741D0 /* ASCollectionViewLayoutController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 205F0E1E1B373A2C007741D0 /* ASCollectionViewLayoutController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E1C1B373A2C007741D0 /* ASCollectionViewLayoutController.mm */; }; - 205F0E211B376416007741D0 /* CGRect+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 205F0E1F1B376416007741D0 /* CGRect+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; 205F0E221B376416007741D0 /* CGRect+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E201B376416007741D0 /* CGRect+ASConvenience.m */; }; 242995D31B29743C00090100 /* ASBasicImageDownloaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 242995D21B29743C00090100 /* ASBasicImageDownloaderTests.m */; }; - 251B8EF71BBB3D690087C538 /* ASCollectionDataController.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF21BBB3D690087C538 /* ASCollectionDataController.h */; }; 251B8EF81BBB3D690087C538 /* ASCollectionDataController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 251B8EF31BBB3D690087C538 /* ASCollectionDataController.mm */; }; - 251B8EF91BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF41BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h */; settings = {ATTRIBUTES = (Public, ); }; }; 251B8EFA1BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 251B8EF51BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m */; }; - 251B8EFB1BBB3D690087C538 /* ASDataController+Subclasses.h in Headers */ = {isa = PBXBuildFile; fileRef = 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */; }; 2538B6F31BC5D2A2003CA0B4 /* ASCollectionViewFlowLayoutInspectorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2538B6F21BC5D2A2003CA0B4 /* ASCollectionViewFlowLayoutInspectorTests.m */; }; 254C6B521BF8FE6D003EC431 /* ASTextKitTruncationTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 254C6B511BF8FE6D003EC431 /* ASTextKitTruncationTests.mm */; }; 254C6B541BF8FF2A003EC431 /* ASTextKitTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 254C6B531BF8FF2A003EC431 /* ASTextKitTests.mm */; }; @@ -160,42 +109,23 @@ 254C6B8C1BF94F8A003EC431 /* ASTextKitTailTruncater.mm in Sources */ = {isa = PBXBuildFile; fileRef = 257754A21BEE44CD00737CA5 /* ASTextKitTailTruncater.mm */; }; 254C6B8D1BF94F8A003EC431 /* ASEqualityHashHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2577548F1BED289A00737CA5 /* ASEqualityHashHelpers.mm */; }; 257754921BED28F300737CA5 /* ASEqualityHashHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2577548F1BED289A00737CA5 /* ASEqualityHashHelpers.mm */; }; - 257754A51BEE44CD00737CA5 /* ASTextKitRenderer.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754931BEE44CD00737CA5 /* ASTextKitRenderer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754A61BEE44CD00737CA5 /* ASTextKitAttributes.mm in Sources */ = {isa = PBXBuildFile; fileRef = 257754941BEE44CD00737CA5 /* ASTextKitAttributes.mm */; }; - 257754A71BEE44CD00737CA5 /* ASTextKitAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754951BEE44CD00737CA5 /* ASTextKitAttributes.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 257754A81BEE44CD00737CA5 /* ASTextKitContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754961BEE44CD00737CA5 /* ASTextKitContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754A91BEE44CD00737CA5 /* ASTextKitContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 257754971BEE44CD00737CA5 /* ASTextKitContext.mm */; }; - 257754AA1BEE44CD00737CA5 /* ASTextKitEntityAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754981BEE44CD00737CA5 /* ASTextKitEntityAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754AB1BEE44CD00737CA5 /* ASTextKitEntityAttribute.m in Sources */ = {isa = PBXBuildFile; fileRef = 257754991BEE44CD00737CA5 /* ASTextKitEntityAttribute.m */; }; 257754AC1BEE44CD00737CA5 /* ASTextKitRenderer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2577549A1BEE44CD00737CA5 /* ASTextKitRenderer.mm */; }; - 257754AD1BEE44CD00737CA5 /* ASTextKitRenderer+Positioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 2577549B1BEE44CD00737CA5 /* ASTextKitRenderer+Positioning.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754AE1BEE44CD00737CA5 /* ASTextKitRenderer+Positioning.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2577549C1BEE44CD00737CA5 /* ASTextKitRenderer+Positioning.mm */; }; - 257754AF1BEE44CD00737CA5 /* ASTextKitRenderer+TextChecking.h in Headers */ = {isa = PBXBuildFile; fileRef = 2577549D1BEE44CD00737CA5 /* ASTextKitRenderer+TextChecking.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754B01BEE44CD00737CA5 /* ASTextKitRenderer+TextChecking.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2577549E1BEE44CD00737CA5 /* ASTextKitRenderer+TextChecking.mm */; }; - 257754B11BEE44CD00737CA5 /* ASTextKitShadower.h in Headers */ = {isa = PBXBuildFile; fileRef = 2577549F1BEE44CD00737CA5 /* ASTextKitShadower.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754B21BEE44CD00737CA5 /* ASTextKitShadower.mm in Sources */ = {isa = PBXBuildFile; fileRef = 257754A01BEE44CD00737CA5 /* ASTextKitShadower.mm */; }; - 257754B31BEE44CD00737CA5 /* ASTextKitTailTruncater.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754A11BEE44CD00737CA5 /* ASTextKitTailTruncater.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754B41BEE44CD00737CA5 /* ASTextKitTailTruncater.mm in Sources */ = {isa = PBXBuildFile; fileRef = 257754A21BEE44CD00737CA5 /* ASTextKitTailTruncater.mm */; }; - 257754B51BEE44CD00737CA5 /* ASTextKitTruncating.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754A31BEE44CD00737CA5 /* ASTextKitTruncating.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 257754B61BEE44CD00737CA5 /* ASEqualityHashHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754A41BEE44CD00737CA5 /* ASEqualityHashHelpers.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754BE1BEE458E00737CA5 /* ASTextKitComponents.m in Sources */ = {isa = PBXBuildFile; fileRef = 257754B71BEE458D00737CA5 /* ASTextKitComponents.m */; }; 257754BF1BEE458E00737CA5 /* ASTextKitCoreTextAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 257754B81BEE458E00737CA5 /* ASTextKitCoreTextAdditions.m */; }; - 257754C01BEE458E00737CA5 /* ASTextNodeWordKerner.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754B91BEE458E00737CA5 /* ASTextNodeWordKerner.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 257754C11BEE458E00737CA5 /* ASTextKitComponents.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754BA1BEE458E00737CA5 /* ASTextKitComponents.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 257754C21BEE458E00737CA5 /* ASTextKitCoreTextAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754BB1BEE458E00737CA5 /* ASTextKitCoreTextAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 257754C31BEE458E00737CA5 /* ASTextNodeTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 257754BC1BEE458E00737CA5 /* ASTextNodeTypes.h */; settings = {ATTRIBUTES = (Public, ); }; }; 257754C41BEE458E00737CA5 /* ASTextNodeWordKerner.m in Sources */ = {isa = PBXBuildFile; fileRef = 257754BD1BEE458E00737CA5 /* ASTextNodeWordKerner.m */; }; - 25E327561C16819500A2170C /* ASPagerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 25E327541C16819500A2170C /* ASPagerNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25E327571C16819500A2170C /* ASPagerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 25E327541C16819500A2170C /* ASPagerNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25E327581C16819500A2170C /* ASPagerNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 25E327551C16819500A2170C /* ASPagerNode.m */; }; 25E327591C16819500A2170C /* ASPagerNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 25E327551C16819500A2170C /* ASPagerNode.m */; }; 2767E9411BB19BD600EA9B77 /* ASViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = ACC945A81BA9E7A0005E1FB8 /* ASViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 2911485C1A77147A005D0878 /* ASControlNodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2911485B1A77147A005D0878 /* ASControlNodeTests.m */; }; - 291B63FB1AA53A7A000A71B3 /* ASScrollDirection.h in Headers */ = {isa = PBXBuildFile; fileRef = 296A0A311A951715005ACEAA /* ASScrollDirection.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 292C599F1A956527007E5DD6 /* ASLayoutRangeType.h in Headers */ = {isa = PBXBuildFile; fileRef = 292C59991A956527007E5DD6 /* ASLayoutRangeType.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2967F9E21AB0A5190072E4AB /* ASBasicImageDownloaderInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 2967F9E11AB0A4CF0072E4AB /* ASBasicImageDownloaderInternal.h */; }; 296A0A351A951ABF005ACEAA /* ASBatchFetchingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 296A0A341A951ABF005ACEAA /* ASBatchFetchingTests.m */; }; - 299DA1A91A828D2900162D41 /* ASBatchContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 299DA1A71A828D2900162D41 /* ASBatchContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; 299DA1AA1A828D2900162D41 /* ASBatchContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = 299DA1A81A828D2900162D41 /* ASBatchContext.mm */; }; 29CDC2E21AAE70D000833CA4 /* ASBasicImageDownloaderContextTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 29CDC2E11AAE70D000833CA4 /* ASBasicImageDownloaderContextTests.m */; }; 2C107F5B1BA9F54500F13DE5 /* AsyncDisplayKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -232,15 +162,11 @@ 34EFC7781B701D3100AD841F /* ASStackUnpositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED4A1B17847A00DA7C62 /* ASStackUnpositionedLayout.mm */; }; 34EFC7791B701D3600AD841F /* ASLayoutSpecUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */; }; 3C9C128519E616EF00E942A0 /* ASTableViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3C9C128419E616EF00E942A0 /* ASTableViewTests.m */; }; - 430E7C8F1B4C23F100697A4C /* ASIndexPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 430E7C8D1B4C23F100697A4C /* ASIndexPath.h */; settings = {ATTRIBUTES = (Public, ); }; }; 430E7C901B4C23F100697A4C /* ASIndexPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 430E7C8D1B4C23F100697A4C /* ASIndexPath.h */; settings = {ATTRIBUTES = (Public, ); }; }; 430E7C911B4C23F100697A4C /* ASIndexPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 430E7C8E1B4C23F100697A4C /* ASIndexPath.m */; }; 430E7C921B4C23F100697A4C /* ASIndexPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 430E7C8E1B4C23F100697A4C /* ASIndexPath.m */; }; - 464052201A3F83C40061C0BA /* ASDataController.h in Headers */ = {isa = PBXBuildFile; fileRef = 464052191A3F83C40061C0BA /* ASDataController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 464052211A3F83C40061C0BA /* ASDataController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4640521A1A3F83C40061C0BA /* ASDataController.mm */; }; - 464052221A3F83C40061C0BA /* ASFlowLayoutController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4640521B1A3F83C40061C0BA /* ASFlowLayoutController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 464052231A3F83C40061C0BA /* ASFlowLayoutController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4640521C1A3F83C40061C0BA /* ASFlowLayoutController.mm */; }; - 464052241A3F83C40061C0BA /* ASLayoutController.h in Headers */ = {isa = PBXBuildFile; fileRef = 4640521D1A3F83C40061C0BA /* ASLayoutController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 509E68601B3AED8E009B9150 /* ASScrollDirection.m in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E111B371BD7007741D0 /* ASScrollDirection.m */; }; 509E68611B3AEDA0009B9150 /* ASAbstractLayoutController.h in Headers */ = {isa = PBXBuildFile; fileRef = 205F0E171B37339C007741D0 /* ASAbstractLayoutController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 509E68621B3AEDA5009B9150 /* ASAbstractLayoutController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 205F0E181B37339C007741D0 /* ASAbstractLayoutController.mm */; }; @@ -254,89 +180,64 @@ 68355B311CB5799E001D4E68 /* ASImageNode+AnimatedImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 68355B2E1CB5799E001D4E68 /* ASImageNode+AnimatedImage.mm */; }; 68355B341CB579B9001D4E68 /* ASImageNode+AnimatedImage.mm in Sources */ = {isa = PBXBuildFile; fileRef = 68355B2E1CB5799E001D4E68 /* ASImageNode+AnimatedImage.mm */; }; 68355B3A1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; - 68355B3B1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B3C1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; - 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B3E1CB57A60001D4E68 /* ASPINRemoteImageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B361CB57A5A001D4E68 /* ASPINRemoteImageDownloader.m */; }; 68355B3F1CB57A64001D4E68 /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68355B401CB57A69001D4E68 /* ASImageContainerProtocolCategories.m in Sources */ = {isa = PBXBuildFile; fileRef = 68355B381CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m */; }; 68355B411CB57A6C001D4E68 /* ASImageContainerProtocolCategories.h in Headers */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68AF37DB1CBEF4D80077BF76 /* ASImageNode+AnimatedImagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */; }; - 68B0277A1C1A79CC0041016B /* ASDisplayNode+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B027791C1A79CC0041016B /* ASDisplayNode+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68B0277B1C1A79D60041016B /* ASDisplayNode+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B027791C1A79CC0041016B /* ASDisplayNode+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 68B8A4DC1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */; }; - 68B8A4E11CBDB958007E4543 /* ASWeakProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B8A4DF1CBDB958007E4543 /* ASWeakProxy.h */; }; 68B8A4E21CBDB958007E4543 /* ASWeakProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 68B8A4DF1CBDB958007E4543 /* ASWeakProxy.h */; }; 68B8A4E31CBDB958007E4543 /* ASWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B8A4E01CBDB958007E4543 /* ASWeakProxy.m */; }; 68B8A4E41CBDB958007E4543 /* ASWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B8A4E01CBDB958007E4543 /* ASWeakProxy.m */; }; - 68EE0DBD1C1B4ED300BA1B99 /* ASMainSerialQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 68EE0DBB1C1B4ED300BA1B99 /* ASMainSerialQueue.h */; }; 68EE0DBE1C1B4ED300BA1B99 /* ASMainSerialQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 68EE0DBB1C1B4ED300BA1B99 /* ASMainSerialQueue.h */; }; 68EE0DBF1C1B4ED300BA1B99 /* ASMainSerialQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 68EE0DBC1C1B4ED300BA1B99 /* ASMainSerialQueue.mm */; }; 68EE0DC01C1B4ED300BA1B99 /* ASMainSerialQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 68EE0DBC1C1B4ED300BA1B99 /* ASMainSerialQueue.mm */; }; - 68FC85DE1CE29AB700EDD713 /* ASNavigationController.h in Headers */ = {isa = PBXBuildFile; fileRef = 68FC85DC1CE29AB700EDD713 /* ASNavigationController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68FC85DF1CE29AB700EDD713 /* ASNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FC85DD1CE29AB700EDD713 /* ASNavigationController.m */; }; - 68FC85E21CE29B7E00EDD713 /* ASTabBarController.h in Headers */ = {isa = PBXBuildFile; fileRef = 68FC85E01CE29B7E00EDD713 /* ASTabBarController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68FC85E31CE29B7E00EDD713 /* ASTabBarController.h in Headers */ = {isa = PBXBuildFile; fileRef = 68FC85E01CE29B7E00EDD713 /* ASTabBarController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68FC85E41CE29B7E00EDD713 /* ASTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FC85E11CE29B7E00EDD713 /* ASTabBarController.m */; }; 68FC85E51CE29B7E00EDD713 /* ASTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FC85E11CE29B7E00EDD713 /* ASTabBarController.m */; }; 68FC85E61CE29B9400EDD713 /* ASNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FC85DD1CE29AB700EDD713 /* ASNavigationController.m */; }; - 68FC85E91CE29C7D00EDD713 /* ASVisibilityProtocols.h in Headers */ = {isa = PBXBuildFile; fileRef = 68FC85E71CE29C7D00EDD713 /* ASVisibilityProtocols.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68FC85EA1CE29C7D00EDD713 /* ASVisibilityProtocols.h in Headers */ = {isa = PBXBuildFile; fileRef = 68FC85E71CE29C7D00EDD713 /* ASVisibilityProtocols.h */; settings = {ATTRIBUTES = (Public, ); }; }; 68FC85EB1CE29C7D00EDD713 /* ASVisibilityProtocols.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FC85E81CE29C7D00EDD713 /* ASVisibilityProtocols.m */; }; 68FC85EC1CE29C7D00EDD713 /* ASVisibilityProtocols.m in Sources */ = {isa = PBXBuildFile; fileRef = 68FC85E81CE29C7D00EDD713 /* ASVisibilityProtocols.m */; }; 697B315A1CFE4B410049936F /* ASEditableTextNodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 697B31591CFE4B410049936F /* ASEditableTextNodeTests.m */; }; - 697C0DE31CF38F28001DE0D4 /* ASLayoutValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 697C0DE11CF38F28001DE0D4 /* ASLayoutValidation.h */; }; 697C0DE41CF38F28001DE0D4 /* ASLayoutValidation.h in Headers */ = {isa = PBXBuildFile; fileRef = 697C0DE11CF38F28001DE0D4 /* ASLayoutValidation.h */; }; 697C0DE51CF38F28001DE0D4 /* ASLayoutValidation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 697C0DE21CF38F28001DE0D4 /* ASLayoutValidation.mm */; }; 697C0DE61CF38F28001DE0D4 /* ASLayoutValidation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 697C0DE21CF38F28001DE0D4 /* ASLayoutValidation.mm */; }; - 698548631CA9E025008A345F /* ASEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = 698548611CA9E025008A345F /* ASEnvironment.h */; settings = {ATTRIBUTES = (Public, ); }; }; 698548641CA9E025008A345F /* ASEnvironment.h in Headers */ = {isa = PBXBuildFile; fileRef = 698548611CA9E025008A345F /* ASEnvironment.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 698C8B611CAB49FC0052DC3F /* ASLayoutableExtensibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 698C8B601CAB49FC0052DC3F /* ASLayoutableExtensibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; 698C8B621CAB49FC0052DC3F /* ASLayoutableExtensibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 698C8B601CAB49FC0052DC3F /* ASLayoutableExtensibility.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 69CB62AB1CB8165900024920 /* _ASDisplayViewAccessiblity.h in Headers */ = {isa = PBXBuildFile; fileRef = 69CB62A91CB8165900024920 /* _ASDisplayViewAccessiblity.h */; }; 69CB62AC1CB8165900024920 /* _ASDisplayViewAccessiblity.h in Headers */ = {isa = PBXBuildFile; fileRef = 69CB62A91CB8165900024920 /* _ASDisplayViewAccessiblity.h */; }; 69CB62AD1CB8165900024920 /* _ASDisplayViewAccessiblity.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69CB62AA1CB8165900024920 /* _ASDisplayViewAccessiblity.mm */; }; 69CB62AE1CB8165900024920 /* _ASDisplayViewAccessiblity.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69CB62AA1CB8165900024920 /* _ASDisplayViewAccessiblity.mm */; }; - 69E1006D1CA89CB600D88C1B /* ASEnvironmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */; }; 69E1006E1CA89CB600D88C1B /* ASEnvironmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */; }; 69E1006F1CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69E100701CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; - 69F10C861C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; 69F10C871C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6BDC61F61979037800E50D21 /* AsyncDisplayKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7630FFA81C9E267E007A7C0E /* ASVideoNode.h in Headers */ = {isa = PBXBuildFile; fileRef = AEEC47DF1C20C2DD00EC1693 /* ASVideoNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D51C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D61C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m in Sources */ = {isa = PBXBuildFile; fileRef = 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */; }; - 767E7F8D1C9019130066C000 /* AsyncDisplayKit+Debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */; settings = {ATTRIBUTES = (Public, ); }; }; 767E7F8E1C90191D0066C000 /* AsyncDisplayKit+Debug.m in Sources */ = {isa = PBXBuildFile; fileRef = 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */; }; 7A06A73A1C35F08800FE8DAA /* ASRelativeLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A06A7381C35F08800FE8DAA /* ASRelativeLayoutSpec.mm */; }; - 7A06A73B1C35F08800FE8DAA /* ASRelativeLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A06A7391C35F08800FE8DAA /* ASRelativeLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7AB338661C55B3420055FDE8 /* ASRelativeLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7A06A7381C35F08800FE8DAA /* ASRelativeLayoutSpec.mm */; }; 7AB338671C55B3460055FDE8 /* ASRelativeLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A06A7391C35F08800FE8DAA /* ASRelativeLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7AB338691C55B97B0055FDE8 /* ASRelativeLayoutSpecSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 7AB338681C55B97B0055FDE8 /* ASRelativeLayoutSpecSnapshotTests.mm */; }; - 8021EC1C1D2B00B100799119 /* UIImage+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 8021EC1A1D2B00B100799119 /* UIImage+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8021EC1D1D2B00B100799119 /* UIImage+ASConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = 8021EC1A1D2B00B100799119 /* UIImage+ASConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8021EC1E1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */; }; 8021EC1F1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */; }; - 81EE384F1C8E94F000456208 /* ASRunLoopQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EE384D1C8E94F000456208 /* ASRunLoopQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; 81EE38501C8E94F000456208 /* ASRunLoopQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */; }; - 8B0768B31CE752EC002E1453 /* ASDefaultPlaybackButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */; }; 8B0768B41CE752EC002E1453 /* ASDefaultPlaybackButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */; }; 8BBBAB8C1CEBAF1700107FC6 /* ASDefaultPlaybackButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */; }; 8BBBAB8D1CEBAF1E00107FC6 /* ASDefaultPlaybackButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */; }; - 8BDA5FC51CDBDDE1007D13B2 /* ASVideoPlayerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BDA5FC31CDBDDE1007D13B2 /* ASVideoPlayerNode.h */; }; 8BDA5FC61CDBDDE1007D13B2 /* ASVideoPlayerNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8BDA5FC41CDBDDE1007D13B2 /* ASVideoPlayerNode.mm */; }; 8BDA5FC71CDBDF91007D13B2 /* ASVideoPlayerNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BDA5FC31CDBDDE1007D13B2 /* ASVideoPlayerNode.h */; }; 8BDA5FC81CDBDF95007D13B2 /* ASVideoPlayerNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8BDA5FC41CDBDDE1007D13B2 /* ASVideoPlayerNode.mm */; }; - 92074A611CC8BA1900918F75 /* ASImageNode+tvOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 92074A5F1CC8BA1900918F75 /* ASImageNode+tvOS.h */; }; 92074A621CC8BA1900918F75 /* ASImageNode+tvOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 92074A5F1CC8BA1900918F75 /* ASImageNode+tvOS.h */; }; 92074A631CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 92074A601CC8BA1900918F75 /* ASImageNode+tvOS.m */; }; 92074A641CC8BA1900918F75 /* ASImageNode+tvOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 92074A601CC8BA1900918F75 /* ASImageNode+tvOS.m */; }; - 92074A671CC8BADA00918F75 /* ASControlNode+tvOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 92074A651CC8BADA00918F75 /* ASControlNode+tvOS.h */; }; 92074A681CC8BADA00918F75 /* ASControlNode+tvOS.h in Headers */ = {isa = PBXBuildFile; fileRef = 92074A651CC8BADA00918F75 /* ASControlNode+tvOS.h */; }; 92074A691CC8BADA00918F75 /* ASControlNode+tvOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 92074A661CC8BADA00918F75 /* ASControlNode+tvOS.m */; }; 92074A6A1CC8BADA00918F75 /* ASControlNode+tvOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 92074A661CC8BADA00918F75 /* ASControlNode+tvOS.m */; }; - 92DD2FE31BF4B97E0074C9DD /* ASMapNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 92DD2FE11BF4B97E0074C9DD /* ASMapNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92DD2FE41BF4B97E0074C9DD /* ASMapNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 92DD2FE21BF4B97E0074C9DD /* ASMapNode.mm */; }; 92DD2FE61BF4D05E0074C9DD /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92DD2FE51BF4D05E0074C9DD /* MapKit.framework */; }; 92DD2FE71BF4D0850074C9DD /* ASMapNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 92DD2FE21BF4B97E0074C9DD /* ASMapNode.mm */; }; @@ -345,15 +246,11 @@ 92DD2FEA1BF4D49B0074C9DD /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92DD2FE51BF4D05E0074C9DD /* MapKit.framework */; }; 9B92C8851BC2EB6E00EE46B2 /* ASCollectionDataController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 251B8EF31BBB3D690087C538 /* ASCollectionDataController.mm */; }; 9B92C8861BC2EB7600EE46B2 /* ASCollectionViewFlowLayoutInspector.m in Sources */ = {isa = PBXBuildFile; fileRef = 251B8EF51BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m */; }; - 9C49C36F1B853957000B0DD5 /* ASStackLayoutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C49C36E1B853957000B0DD5 /* ASStackLayoutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9C49C3701B853961000B0DD5 /* ASStackLayoutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C49C36E1B853957000B0DD5 /* ASStackLayoutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C5586691BD549CB00B50E3A /* ASAsciiArtBoxCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C5586671BD549CB00B50E3A /* ASAsciiArtBoxCreator.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9C55866A1BD549CB00B50E3A /* ASAsciiArtBoxCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C5586681BD549CB00B50E3A /* ASAsciiArtBoxCreator.m */; }; 9C55866B1BD54A1900B50E3A /* ASAsciiArtBoxCreator.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C5586681BD549CB00B50E3A /* ASAsciiArtBoxCreator.m */; }; 9C55866C1BD54A3000B50E3A /* ASAsciiArtBoxCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C5586671BD549CB00B50E3A /* ASAsciiArtBoxCreator.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C6BB3B21B8CC9C200F13F52 /* ASStaticLayoutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C6BB3B01B8CC9C200F13F52 /* ASStaticLayoutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9C6BB3B31B8CC9C200F13F52 /* ASStaticLayoutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C6BB3B01B8CC9C200F13F52 /* ASStaticLayoutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9C70F2031CDA4EFA007D6C76 /* ASTraitCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C70F2011CDA4EFA007D6C76 /* ASTraitCollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9C70F2041CDA4EFA007D6C76 /* ASTraitCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C70F2021CDA4EFA007D6C76 /* ASTraitCollection.m */; }; 9C70F2051CDA4F06007D6C76 /* ASTraitCollection.m in Sources */ = {isa = PBXBuildFile; fileRef = 9C70F2021CDA4EFA007D6C76 /* ASTraitCollection.m */; }; 9C70F2061CDA4F0C007D6C76 /* ASTraitCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C70F2011CDA4EFA007D6C76 /* ASTraitCollection.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -365,7 +262,6 @@ 9C70F20D1CDBE9CB007D6C76 /* ASDefaultPlayButton.h in Headers */ = {isa = PBXBuildFile; fileRef = AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */; }; 9C70F20E1CDBE9E5007D6C76 /* NSArray+Diffing.h in Headers */ = {isa = PBXBuildFile; fileRef = DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */; }; 9C70F20F1CDBE9FF007D6C76 /* ASLayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B30BF6501C5964B0004FCD53 /* ASLayoutManager.h */; }; - 9C8221951BA237B80037F19A /* ASStackBaselinePositionedLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C8221931BA237B80037F19A /* ASStackBaselinePositionedLayout.h */; }; 9C8221961BA237B80037F19A /* ASStackBaselinePositionedLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 9C8221931BA237B80037F19A /* ASStackBaselinePositionedLayout.h */; }; 9C8221971BA237B80037F19A /* ASStackBaselinePositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8221941BA237B80037F19A /* ASStackBaselinePositionedLayout.mm */; }; 9C8221981BA237B80037F19A /* ASStackBaselinePositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8221941BA237B80037F19A /* ASStackBaselinePositionedLayout.mm */; }; @@ -373,65 +269,37 @@ 9C8898BC1C738BA800D6B02E /* ASTextKitFontSizeAdjuster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9C8898BA1C738B9800D6B02E /* ASTextKitFontSizeAdjuster.mm */; }; 9C8898BD1C738BB800D6B02E /* ASTextKitFontSizeAdjuster.h in Headers */ = {isa = PBXBuildFile; fileRef = A32FEDD31C501B6A004F642A /* ASTextKitFontSizeAdjuster.h */; }; 9CC606651D24DF9E006581A0 /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; - 9CDC18CC1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CDC18CD1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9CFFC6BE1CCAC52B006A6476 /* ASEnvironment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */; }; 9CFFC6C01CCAC73C006A6476 /* ASViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BF1CCAC73C006A6476 /* ASViewController.mm */; }; 9CFFC6C21CCAC768006A6476 /* ASTableNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6C11CCAC768006A6476 /* ASTableNode.mm */; }; 9F06E5CD1B4CAF4200F015D8 /* ASCollectionViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F06E5CC1B4CAF4200F015D8 /* ASCollectionViewTests.m */; }; - A2763D791CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = A2763D771CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h */; }; A2763D7A1CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = A2763D771CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h */; }; - A32FEDD51C501B6A004F642A /* ASTextKitFontSizeAdjuster.h in Headers */ = {isa = PBXBuildFile; fileRef = A32FEDD31C501B6A004F642A /* ASTextKitFontSizeAdjuster.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A373200F1C571B730011FC94 /* ASTextNode+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = A373200E1C571B050011FC94 /* ASTextNode+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; A37320101C571B740011FC94 /* ASTextNode+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = A373200E1C571B050011FC94 /* ASTextNode+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; AC026B581BD3F61800BBC17E /* ASStaticLayoutSpecSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B571BD3F61800BBC17E /* ASStaticLayoutSpecSnapshotTests.m */; }; - AC026B691BD57D6F00BBC17E /* ASChangeSetDataController.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */; settings = {ATTRIBUTES = (Public, ); }; }; AC026B6A1BD57D6F00BBC17E /* ASChangeSetDataController.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */; settings = {ATTRIBUTES = (Public, ); }; }; AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; }; AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; }; - AC026B6F1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */; }; AC026B701BD57DBF00BBC17E /* _ASHierarchyChangeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */; }; AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */; }; AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */; }; - AC21EC101B3D0BF600C8B19A /* ASStackLayoutDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = AC21EC0F1B3D0BF600C8B19A /* ASStackLayoutDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AC3C4A511A1139C100143C57 /* ASCollectionView.h in Headers */ = {isa = PBXBuildFile; fileRef = AC3C4A4F1A1139C100143C57 /* ASCollectionView.h */; settings = {ATTRIBUTES = (Public, ); }; }; AC3C4A521A1139C100143C57 /* ASCollectionView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A501A1139C100143C57 /* ASCollectionView.mm */; }; - AC3C4A541A113EEC00143C57 /* ASCollectionViewProtocols.h in Headers */ = {isa = PBXBuildFile; fileRef = AC3C4A531A113EEC00143C57 /* ASCollectionViewProtocols.h */; settings = {ATTRIBUTES = (Public, ); }; }; AC47D9421B3B891B00AAEE9D /* ASCellNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC6456071B0A335000CF11B8 /* ASCellNode.mm */; }; - AC47D9451B3BB41900AAEE9D /* ASRelativeSize.h in Headers */ = {isa = PBXBuildFile; fileRef = AC47D9431B3BB41900AAEE9D /* ASRelativeSize.h */; settings = {ATTRIBUTES = (Public, ); }; }; AC47D9461B3BB41900AAEE9D /* ASRelativeSize.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC47D9441B3BB41900AAEE9D /* ASRelativeSize.mm */; }; AC6456091B0A335000CF11B8 /* ASCellNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC6456071B0A335000CF11B8 /* ASCellNode.mm */; }; - AC7A2C171BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = AC7A2C161BDE11DF0093FE1A /* ASTableViewInternal.h */; }; AC7A2C181BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = AC7A2C161BDE11DF0093FE1A /* ASTableViewInternal.h */; }; - ACC945A91BA9E7A0005E1FB8 /* ASViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = ACC945A81BA9E7A0005E1FB8 /* ASViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - ACF6ED1A1B17843500DA7C62 /* ASBackgroundLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED011B17843500DA7C62 /* ASBackgroundLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED1B1B17843500DA7C62 /* ASBackgroundLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED021B17843500DA7C62 /* ASBackgroundLayoutSpec.mm */; }; - ACF6ED1C1B17843500DA7C62 /* ASCenterLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED031B17843500DA7C62 /* ASCenterLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED1D1B17843500DA7C62 /* ASCenterLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED041B17843500DA7C62 /* ASCenterLayoutSpec.mm */; }; - ACF6ED201B17843500DA7C62 /* ASDimension.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED071B17843500DA7C62 /* ASDimension.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED211B17843500DA7C62 /* ASDimension.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED081B17843500DA7C62 /* ASDimension.mm */; }; - ACF6ED221B17843500DA7C62 /* ASInsetLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED091B17843500DA7C62 /* ASInsetLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED231B17843500DA7C62 /* ASInsetLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED0A1B17843500DA7C62 /* ASInsetLayoutSpec.mm */; }; - ACF6ED241B17843500DA7C62 /* ASLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED0B1B17843500DA7C62 /* ASLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED251B17843500DA7C62 /* ASLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED0C1B17843500DA7C62 /* ASLayout.mm */; }; - ACF6ED261B17843500DA7C62 /* ASLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED0D1B17843500DA7C62 /* ASLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED271B17843500DA7C62 /* ASLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED0E1B17843500DA7C62 /* ASLayoutSpec.mm */; }; - ACF6ED2A1B17843500DA7C62 /* ASLayoutable.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED111B17843500DA7C62 /* ASLayoutable.h */; settings = {ATTRIBUTES = (Public, ); }; }; - ACF6ED2B1B17843500DA7C62 /* ASOverlayLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED121B17843500DA7C62 /* ASOverlayLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED2C1B17843500DA7C62 /* ASOverlayLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED131B17843500DA7C62 /* ASOverlayLayoutSpec.mm */; }; - ACF6ED2D1B17843500DA7C62 /* ASRatioLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED141B17843500DA7C62 /* ASRatioLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED2E1B17843500DA7C62 /* ASRatioLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED151B17843500DA7C62 /* ASRatioLayoutSpec.mm */; }; - ACF6ED2F1B17843500DA7C62 /* ASStackLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED161B17843500DA7C62 /* ASStackLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED301B17843500DA7C62 /* ASStackLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED171B17843500DA7C62 /* ASStackLayoutSpec.mm */; }; - ACF6ED311B17843500DA7C62 /* ASStaticLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED181B17843500DA7C62 /* ASStaticLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; ACF6ED321B17843500DA7C62 /* ASStaticLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED191B17843500DA7C62 /* ASStaticLayoutSpec.mm */; }; - ACF6ED4B1B17847A00DA7C62 /* ASInternalHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */; }; ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.mm */; }; - ACF6ED4D1B17847A00DA7C62 /* ASLayoutSpecUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */; }; - ACF6ED4E1B17847A00DA7C62 /* ASStackLayoutSpecUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED461B17847A00DA7C62 /* ASStackLayoutSpecUtilities.h */; }; - ACF6ED4F1B17847A00DA7C62 /* ASStackPositionedLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED471B17847A00DA7C62 /* ASStackPositionedLayout.h */; }; ACF6ED501B17847A00DA7C62 /* ASStackPositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED481B17847A00DA7C62 /* ASStackPositionedLayout.mm */; }; - ACF6ED511B17847A00DA7C62 /* ASStackUnpositionedLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED491B17847A00DA7C62 /* ASStackUnpositionedLayout.h */; }; ACF6ED521B17847A00DA7C62 /* ASStackUnpositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED4A1B17847A00DA7C62 /* ASStackUnpositionedLayout.mm */; }; ACF6ED5C1B178DC700DA7C62 /* ASCenterLayoutSpecSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED531B178DC700DA7C62 /* ASCenterLayoutSpecSnapshotTests.mm */; }; ACF6ED5D1B178DC700DA7C62 /* ASDimensionTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED541B178DC700DA7C62 /* ASDimensionTests.mm */; }; @@ -440,17 +308,11 @@ ACF6ED611B178DC700DA7C62 /* ASOverlayLayoutSpecSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED591B178DC700DA7C62 /* ASOverlayLayoutSpecSnapshotTests.mm */; }; ACF6ED621B178DC700DA7C62 /* ASRatioLayoutSpecSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED5A1B178DC700DA7C62 /* ASRatioLayoutSpecSnapshotTests.mm */; }; ACF6ED631B178DC700DA7C62 /* ASStackLayoutSpecSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED5B1B178DC700DA7C62 /* ASStackLayoutSpecSnapshotTests.mm */; }; - AEB7B01A1C5962EA00662EF4 /* ASDefaultPlayButton.h in Headers */ = {isa = PBXBuildFile; fileRef = AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */; }; AEB7B01B1C5962EA00662EF4 /* ASDefaultPlayButton.m in Sources */ = {isa = PBXBuildFile; fileRef = AEB7B0191C5962EA00662EF4 /* ASDefaultPlayButton.m */; }; - AEEC47E11C20C2DD00EC1693 /* ASVideoNode.h in Headers */ = {isa = PBXBuildFile; fileRef = AEEC47DF1C20C2DD00EC1693 /* ASVideoNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; AEEC47E21C20C2DD00EC1693 /* ASVideoNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = AEEC47E01C20C2DD00EC1693 /* ASVideoNode.mm */; }; AEEC47E41C21D3D200EC1693 /* ASVideoNodeTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AEEC47E31C21D3D200EC1693 /* ASVideoNodeTests.m */; }; - B0F8805A1BEAEC7500D17647 /* ASTableNode.h in Headers */ = {isa = PBXBuildFile; fileRef = B0F880581BEAEC7500D17647 /* ASTableNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B13CA0F71C519E9400E031AB /* ASCollectionViewLayoutFacilitatorProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = B13CA0F61C519E9400E031AB /* ASCollectionViewLayoutFacilitatorProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; B13CA0F81C519EBA00E031AB /* ASCollectionViewLayoutFacilitatorProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = B13CA0F61C519E9400E031AB /* ASCollectionViewLayoutFacilitatorProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B13CA1001C52004900E031AB /* ASCollectionNode+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = B13CA0FF1C52004900E031AB /* ASCollectionNode+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; B13CA1011C52004900E031AB /* ASCollectionNode+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = B13CA0FF1C52004900E031AB /* ASCollectionNode+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B30BF6521C5964B0004FCD53 /* ASLayoutManager.h in Headers */ = {isa = PBXBuildFile; fileRef = B30BF6501C5964B0004FCD53 /* ASLayoutManager.h */; }; B30BF6531C5964B0004FCD53 /* ASLayoutManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B30BF6511C5964B0004FCD53 /* ASLayoutManager.m */; }; B30BF6541C59D889004FCD53 /* ASLayoutManager.m in Sources */ = {isa = PBXBuildFile; fileRef = B30BF6511C5964B0004FCD53 /* ASLayoutManager.m */; }; B35061F31B010EFD0018CF92 /* ASCellNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 055F1A3A19ABD43F004DAFF1 /* ASCellNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -540,38 +402,29 @@ B350625E1B0111780018CF92 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 051943121A1575630030A7D0 /* AssetsLibrary.framework */; }; B350625F1B0111800018CF92 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 058D09AF195D04C000B7D73C /* Foundation.framework */; }; C78F7E2B1BF7809800CDEAFC /* ASTableNode.h in Headers */ = {isa = PBXBuildFile; fileRef = B0F880581BEAEC7500D17647 /* ASTableNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CC3B20831C3F76D600798563 /* ASPendingStateController.h in Headers */ = {isa = PBXBuildFile; fileRef = CC3B20811C3F76D600798563 /* ASPendingStateController.h */; }; CC3B20841C3F76D600798563 /* ASPendingStateController.h in Headers */ = {isa = PBXBuildFile; fileRef = CC3B20811C3F76D600798563 /* ASPendingStateController.h */; }; CC3B20851C3F76D600798563 /* ASPendingStateController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC3B20821C3F76D600798563 /* ASPendingStateController.mm */; }; CC3B20861C3F76D600798563 /* ASPendingStateController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC3B20821C3F76D600798563 /* ASPendingStateController.mm */; }; - CC3B20891C3F7A5400798563 /* ASWeakSet.h in Headers */ = {isa = PBXBuildFile; fileRef = CC3B20871C3F7A5400798563 /* ASWeakSet.h */; }; CC3B208A1C3F7A5400798563 /* ASWeakSet.h in Headers */ = {isa = PBXBuildFile; fileRef = CC3B20871C3F7A5400798563 /* ASWeakSet.h */; }; CC3B208B1C3F7A5400798563 /* ASWeakSet.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3B20881C3F7A5400798563 /* ASWeakSet.m */; }; CC3B208C1C3F7A5400798563 /* ASWeakSet.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3B20881C3F7A5400798563 /* ASWeakSet.m */; }; CC3B208E1C3F7D0A00798563 /* ASWeakSetTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208D1C3F7D0A00798563 /* ASWeakSetTests.m */; }; CC3B20901C3F892D00798563 /* ASBridgedPropertiesTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */; }; CC4981B31D1A02BE004E13CC /* ASTableViewThrashTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981B21D1A02BE004E13CC /* ASTableViewThrashTests.m */; }; - CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = CC4981BB1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m */; }; - CC7FD9DE1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; CC7FD9DF1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9DD1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.m */; }; CC7FD9E11BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */; }; CC7FD9E21BB603FF005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; settings = {ATTRIBUTES = (Public, ); }; }; CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; - D785F6621A74327E00291744 /* ASScrollNode.h in Headers */ = {isa = PBXBuildFile; fileRef = D785F6601A74327E00291744 /* ASScrollNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; D785F6631A74327E00291744 /* ASScrollNode.m in Sources */ = {isa = PBXBuildFile; fileRef = D785F6611A74327E00291744 /* ASScrollNode.m */; }; - DB55C2611C6408D6004EDCF5 /* _ASTransitionContext.h in Headers */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; DB55C2631C6408D6004EDCF5 /* _ASTransitionContext.m in Sources */ = {isa = PBXBuildFile; fileRef = DB55C2601C6408D6004EDCF5 /* _ASTransitionContext.m */; }; - DB55C2661C641AE4004EDCF5 /* ASContextTransitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = DB55C2651C641AE4004EDCF5 /* ASContextTransitioning.h */; settings = {ATTRIBUTES = (Public, ); }; }; DB55C2671C641AE4004EDCF5 /* ASContextTransitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = DB55C2651C641AE4004EDCF5 /* ASContextTransitioning.h */; settings = {ATTRIBUTES = (Public, ); }; }; DB7121BCD50849C498C886FB /* libPods-AsyncDisplayKitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EFA731F0396842FF8AB635EE /* libPods-AsyncDisplayKitTests.a */; }; DB78412E1C6BCE1600A9E2B4 /* _ASTransitionContext.m in Sources */ = {isa = PBXBuildFile; fileRef = DB55C2601C6408D6004EDCF5 /* _ASTransitionContext.m */; }; DBABFAFC1C6A8D2F0039EA4A /* _ASTransitionContext.h in Headers */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; - DBC452DB1C5BF64600B16017 /* NSArray+Diffing.h in Headers */ = {isa = PBXBuildFile; fileRef = DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */; }; DBC452DC1C5BF64600B16017 /* NSArray+Diffing.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC452DA1C5BF64600B16017 /* NSArray+Diffing.m */; }; DBC452DE1C5C6A6A00B16017 /* ArrayDiffingTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC452DD1C5C6A6A00B16017 /* ArrayDiffingTests.m */; }; DBC453221C5FD97200B16017 /* ASDisplayNodeImplicitHierarchyTests.m in Sources */ = {isa = PBXBuildFile; fileRef = DBC453211C5FD97200B16017 /* ASDisplayNodeImplicitHierarchyTests.m */; }; - DBDB83941C6E879900D0098C /* ASPagerFlowLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = DBDB83921C6E879900D0098C /* ASPagerFlowLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; DBDB83951C6E879900D0098C /* ASPagerFlowLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = DBDB83921C6E879900D0098C /* ASPagerFlowLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; DBDB83961C6E879900D0098C /* ASPagerFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDB83931C6E879900D0098C /* ASPagerFlowLayout.m */; }; DBDB83971C6E879900D0098C /* ASPagerFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = DBDB83931C6E879900D0098C /* ASPagerFlowLayout.m */; }; @@ -579,32 +432,172 @@ DE0702FC1C3671E900D7DE62 /* libAsyncDisplayKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 058D09AC195D04C000B7D73C /* libAsyncDisplayKit.a */; }; DE4843DB1C93EAB100A1F33B /* ASLayoutTransition.mm in Sources */ = {isa = PBXBuildFile; fileRef = E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */; }; DE4843DC1C93EAC100A1F33B /* ASLayoutTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */; }; - DE6EA3221C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */; }; DE6EA3231C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */; }; DE84918D1C8FFF2B003D89E9 /* ASRunLoopQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EE384D1C8E94F000456208 /* ASRunLoopQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; DE84918E1C8FFF9F003D89E9 /* ASRunLoopQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */; }; - DE8BEAC11C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DE8BEABF1C2DF3FC00D57C12 /* ASDelegateProxy.h */; }; DE8BEAC21C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DE8BEABF1C2DF3FC00D57C12 /* ASDelegateProxy.h */; }; DE8BEAC31C2DF3FC00D57C12 /* ASDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DE8BEAC01C2DF3FC00D57C12 /* ASDelegateProxy.m */; }; DE8BEAC41C2DF3FC00D57C12 /* ASDelegateProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = DE8BEAC01C2DF3FC00D57C12 /* ASDelegateProxy.m */; }; - DEC146B61C37A16A004A0EE7 /* ASCollectionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DEC146B41C37A16A004A0EE7 /* ASCollectionInternal.h */; }; DEC146B71C37A16A004A0EE7 /* ASCollectionInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = DEC146B41C37A16A004A0EE7 /* ASCollectionInternal.h */; }; DEC146B81C37A16A004A0EE7 /* ASCollectionInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = DEC146B51C37A16A004A0EE7 /* ASCollectionInternal.m */; }; DEC146B91C37A16A004A0EE7 /* ASCollectionInternal.m in Sources */ = {isa = PBXBuildFile; fileRef = DEC146B51C37A16A004A0EE7 /* ASCollectionInternal.m */; }; - DECBD6E71BE56E1900CF4905 /* ASButtonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DECBD6E51BE56E1900CF4905 /* ASButtonNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; DECBD6E81BE56E1900CF4905 /* ASButtonNode.h in Headers */ = {isa = PBXBuildFile; fileRef = DECBD6E51BE56E1900CF4905 /* ASButtonNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; DECBD6E91BE56E1900CF4905 /* ASButtonNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = DECBD6E61BE56E1900CF4905 /* ASButtonNode.mm */; }; DECBD6EA1BE56E1900CF4905 /* ASButtonNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = DECBD6E61BE56E1900CF4905 /* ASButtonNode.mm */; }; DEFAD8131CC48914000527C4 /* ASVideoNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = AEEC47E01C20C2DD00EC1693 /* ASVideoNode.mm */; }; E52405B31C8FEF03004DC8E7 /* ASLayoutTransition.mm in Sources */ = {isa = PBXBuildFile; fileRef = E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */; }; - E52405B51C8FEF16004DC8E7 /* ASLayoutTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */; }; E55D86321CA8A14000A0C26F /* ASLayoutable.mm in Sources */ = {isa = PBXBuildFile; fileRef = E55D86311CA8A14000A0C26F /* ASLayoutable.mm */; }; E55D86331CA8A14000A0C26F /* ASLayoutable.mm in Sources */ = {isa = PBXBuildFile; fileRef = E55D86311CA8A14000A0C26F /* ASLayoutable.mm */; }; - E5711A2B1C840C81009619D4 /* ASIndexedNodeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = E5711A2A1C840C81009619D4 /* ASIndexedNodeContext.h */; settings = {ATTRIBUTES = (Public, ); }; }; E5711A2C1C840C81009619D4 /* ASIndexedNodeContext.h in Headers */ = {isa = PBXBuildFile; fileRef = E5711A2A1C840C81009619D4 /* ASIndexedNodeContext.h */; }; E5711A2E1C840C96009619D4 /* ASIndexedNodeContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.mm */; }; E5711A301C840C96009619D4 /* ASIndexedNodeContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.mm */; }; F711994E1D20C21100568860 /* ASDisplayNodeExtrasTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F711994D1D20C21100568860 /* ASDisplayNodeExtrasTests.m */; }; + F7CE6C131D2CDB3E00BE4C15 /* ASPagerFlowLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DBDB83921C6E879900D0098C /* ASPagerFlowLayout.h */; }; + F7CE6C141D2CDB3E00BE4C15 /* ASMapNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 92DD2FE11BF4B97E0074C9DD /* ASMapNode.h */; }; + F7CE6C151D2CDB3E00BE4C15 /* ASVideoNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AEEC47DF1C20C2DD00EC1693 /* ASVideoNode.h */; }; + F7CE6C161D2CDB3E00BE4C15 /* ASCellNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 055F1A3A19ABD43F004DAFF1 /* ASCellNode.h */; }; + F7CE6C171D2CDB3E00BE4C15 /* ASCollectionNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 18C2ED7C1B9B7DE800F627B3 /* ASCollectionNode.h */; }; + F7CE6C181D2CDB3E00BE4C15 /* ASCollectionNode+Beta.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B13CA0FF1C52004900E031AB /* ASCollectionNode+Beta.h */; }; + F7CE6C191D2CDB3E00BE4C15 /* ASCollectionView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC3C4A4F1A1139C100143C57 /* ASCollectionView.h */; }; + F7CE6C1A1D2CDB3E00BE4C15 /* ASCollectionViewProtocols.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC3C4A531A113EEC00143C57 /* ASCollectionViewProtocols.h */; }; + F7CE6C1B1D2CDB3E00BE4C15 /* ASCollectionViewLayoutFacilitatorProtocol.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B13CA0F61C519E9400E031AB /* ASCollectionViewLayoutFacilitatorProtocol.h */; }; + F7CE6C1C1D2CDB3E00BE4C15 /* ASControlNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09D5195D050800B7D73C /* ASControlNode.h */; }; + F7CE6C1D1D2CDB3E00BE4C15 /* ASButtonNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DECBD6E51BE56E1900CF4905 /* ASButtonNode.h */; }; + F7CE6C1E1D2CDB3E00BE4C15 /* ASControlNode+Subclasses.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09D7195D050800B7D73C /* ASControlNode+Subclasses.h */; }; + F7CE6C1F1D2CDB3E00BE4C15 /* ASDisplayNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09D8195D050800B7D73C /* ASDisplayNode.h */; }; + F7CE6C201D2CDB3E00BE4C15 /* ASDisplayNode+Beta.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68B027791C1A79CC0041016B /* ASDisplayNode+Beta.h */; }; + F7CE6C211D2CDB3E00BE4C15 /* ASDisplayNode+Subclasses.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09DA195D050800B7D73C /* ASDisplayNode+Subclasses.h */; }; + F7CE6C221D2CDB3E00BE4C15 /* ASDisplayNodeExtras.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09DB195D050800B7D73C /* ASDisplayNodeExtras.h */; }; + F7CE6C231D2CDB3E00BE4C15 /* ASEditableTextNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0587F9BB1A7309ED00AFF0BA /* ASEditableTextNode.h */; }; + F7CE6C241D2CDB3E00BE4C15 /* ASImageNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09DD195D050800B7D73C /* ASImageNode.h */; }; + F7CE6C251D2CDB3E00BE4C15 /* UIImage+ASConvenience.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8021EC1A1D2B00B100799119 /* UIImage+ASConvenience.h */; }; + F7CE6C261D2CDB3E00BE4C15 /* ASMultiplexImageNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0516FA3E1A1563D200B4EBED /* ASMultiplexImageNode.h */; }; + F7CE6C271D2CDB3E00BE4C15 /* ASNavigationController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68FC85DC1CE29AB700EDD713 /* ASNavigationController.h */; }; + F7CE6C281D2CDB3E00BE4C15 /* ASNetworkImageNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 055B9FA61A1C154B00035D6D /* ASNetworkImageNode.h */; }; + F7CE6C291D2CDB3E00BE4C15 /* ASPagerNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 25E327541C16819500A2170C /* ASPagerNode.h */; }; + F7CE6C2A1D2CDB3E00BE4C15 /* ASScrollNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = D785F6601A74327E00291744 /* ASScrollNode.h */; }; + F7CE6C2B1D2CDB3E00BE4C15 /* ASTabBarController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68FC85E01CE29B7E00EDD713 /* ASTabBarController.h */; }; + F7CE6C2C1D2CDB3E00BE4C15 /* ASTableNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B0F880581BEAEC7500D17647 /* ASTableNode.h */; }; + F7CE6C2D1D2CDB3E00BE4C15 /* ASTableView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 055F1A3219ABD3E3004DAFF1 /* ASTableView.h */; }; + F7CE6C2E1D2CDB3E00BE4C15 /* ASTableViewProtocols.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0574D5E119C110610097DC25 /* ASTableViewProtocols.h */; }; + F7CE6C2F1D2CDB3E00BE4C15 /* ASTextNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09DF195D050800B7D73C /* ASTextNode.h */; }; + F7CE6C301D2CDB3E00BE4C15 /* ASTextNode+Beta.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A373200E1C571B050011FC94 /* ASTextNode+Beta.h */; }; + F7CE6C311D2CDB3E00BE4C15 /* ASViewController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACC945A81BA9E7A0005E1FB8 /* ASViewController.h */; }; + F7CE6C321D2CDB3E00BE4C15 /* AsyncDisplayKit.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */; }; + F7CE6C331D2CDB3E00BE4C15 /* AsyncDisplayKit+Debug.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */; }; + F7CE6C341D2CDB3E00BE4C15 /* ASContextTransitioning.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB55C2651C641AE4004EDCF5 /* ASContextTransitioning.h */; }; + F7CE6C351D2CDB3E00BE4C15 /* ASVisibilityProtocols.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68FC85E71CE29C7D00EDD713 /* ASVisibilityProtocols.h */; }; + F7CE6C361D2CDB3E00BE4C15 /* _ASDisplayLayer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09E2195D050800B7D73C /* _ASDisplayLayer.h */; }; + F7CE6C371D2CDB3E00BE4C15 /* _ASDisplayView.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09E4195D050800B7D73C /* _ASDisplayView.h */; }; + F7CE6C381D2CDB3E00BE4C15 /* ASAbstractLayoutController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 205F0E171B37339C007741D0 /* ASAbstractLayoutController.h */; }; + F7CE6C391D2CDB3E00BE4C15 /* ASBasicImageDownloader.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 054963471A1EA066000F8E56 /* ASBasicImageDownloader.h */; }; + F7CE6C3A1D2CDB3E00BE4C15 /* ASBatchContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 299DA1A71A828D2900162D41 /* ASBatchContext.h */; }; + F7CE6C3B1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF41BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h */; }; + F7CE6C3C1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF51BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m */; }; + F7CE6C3D1D2CDB3E00BE4C15 /* ASCollectionViewLayoutController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 205F0E1B1B373A2C007741D0 /* ASCollectionViewLayoutController.h */; }; + F7CE6C3E1D2CDB3E00BE4C15 /* ASDealloc2MainObject.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 05A6D05819D0EB64002DD95E /* ASDealloc2MainObject.h */; }; + F7CE6C3F1D2CDB3E00BE4C15 /* ASEnvironment.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 698548611CA9E025008A345F /* ASEnvironment.h */; }; + F7CE6C401D2CDB3E00BE4C15 /* ASFlowLayoutController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4640521B1A3F83C40061C0BA /* ASFlowLayoutController.h */; }; + F7CE6C411D2CDB3E00BE4C15 /* ASHighlightOverlayLayer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09E6195D050800B7D73C /* ASHighlightOverlayLayer.h */; }; + F7CE6C421D2CDB3E00BE4C15 /* ASIndexPath.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 430E7C8D1B4C23F100697A4C /* ASIndexPath.h */; }; + F7CE6C431D2CDB3E00BE4C15 /* ASImageProtocols.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 05F20AA31A15733C00DCA68A /* ASImageProtocols.h */; }; + F7CE6C441D2CDB3E00BE4C15 /* ASImageContainerProtocolCategories.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68355B371CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h */; }; + F7CE6C451D2CDB3E00BE4C15 /* ASPINRemoteImageDownloader.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68355B391CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h */; }; + F7CE6C461D2CDB3E00BE4C15 /* ASLayoutController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4640521D1A3F83C40061C0BA /* ASLayoutController.h */; }; + F7CE6C471D2CDB3E00BE4C15 /* ASLayoutRangeType.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 292C59991A956527007E5DD6 /* ASLayoutRangeType.h */; }; + F7CE6C481D2CDB3E00BE4C15 /* ASMutableAttributedStringBuilder.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09E8195D050800B7D73C /* ASMutableAttributedStringBuilder.h */; }; + F7CE6C491D2CDB3E00BE4C15 /* ASPhotosFrameworkImageRequest.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CC7FD9DC1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h */; }; + F7CE6C4A1D2CDB3E00BE4C15 /* ASRangeController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 055F1A3619ABD413004DAFF1 /* ASRangeController.h */; }; + F7CE6C4B1D2CDB3E00BE4C15 /* ASRangeControllerUpdateRangeProtocol+Beta.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */; }; + F7CE6C4C1D2CDB3E00BE4C15 /* ASRunLoopQueue.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 81EE384D1C8E94F000456208 /* ASRunLoopQueue.h */; }; + F7CE6C4D1D2CDB3E00BE4C15 /* ASScrollDirection.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 296A0A311A951715005ACEAA /* ASScrollDirection.h */; }; + F7CE6C4E1D2CDB3E00BE4C15 /* ASThread.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A12195D050800B7D73C /* ASThread.h */; }; + F7CE6C4F1D2CDB3E00BE4C15 /* CGRect+ASConvenience.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 205F0E1F1B376416007741D0 /* CGRect+ASConvenience.h */; }; + F7CE6C501D2CDB3E00BE4C15 /* ASDataController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 464052191A3F83C40061C0BA /* ASDataController.h */; }; + F7CE6C511D2CDB3E00BE4C15 /* ASChangeSetDataController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */; }; + F7CE6C521D2CDB3E00BE4C15 /* ASIndexedNodeContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = E5711A2A1C840C81009619D4 /* ASIndexedNodeContext.h */; }; + F7CE6C531D2CDB3E00BE4C15 /* NSMutableAttributedString+TextKitAdditions.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09F5195D050800B7D73C /* NSMutableAttributedString+TextKitAdditions.h */; }; + F7CE6C541D2CDB3E00BE4C15 /* _ASAsyncTransaction.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09F8195D050800B7D73C /* _ASAsyncTransaction.h */; }; + F7CE6C551D2CDB3E00BE4C15 /* _ASAsyncTransactionContainer+Private.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09FA195D050800B7D73C /* _ASAsyncTransactionContainer+Private.h */; }; + F7CE6C561D2CDB3E00BE4C15 /* _ASAsyncTransactionContainer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09FB195D050800B7D73C /* _ASAsyncTransactionContainer.h */; }; + F7CE6C571D2CDB3E00BE4C15 /* _ASAsyncTransactionGroup.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09FD195D050800B7D73C /* _ASAsyncTransactionGroup.h */; }; + F7CE6C581D2CDB3E00BE4C15 /* UICollectionViewLayout+ASConvenience.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 205F0E0D1B371875007741D0 /* UICollectionViewLayout+ASConvenience.h */; }; + F7CE6C591D2CDB3E00BE4C15 /* UIView+ASConvenience.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D09FF195D050800B7D73C /* UIView+ASConvenience.h */; }; + F7CE6C5A1D2CDB3E00BE4C15 /* ASTraitCollection.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9C70F2011CDA4EFA007D6C76 /* ASTraitCollection.h */; }; + F7CE6C5B1D2CDB3E00BE4C15 /* ASAsciiArtBoxCreator.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9C5586671BD549CB00B50E3A /* ASAsciiArtBoxCreator.h */; }; + F7CE6C5C1D2CDB3E00BE4C15 /* ASBackgroundLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED011B17843500DA7C62 /* ASBackgroundLayoutSpec.h */; }; + F7CE6C5D1D2CDB3E00BE4C15 /* ASCenterLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED031B17843500DA7C62 /* ASCenterLayoutSpec.h */; }; + F7CE6C5E1D2CDB3E00BE4C15 /* ASDimension.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED071B17843500DA7C62 /* ASDimension.h */; }; + F7CE6C5F1D2CDB3E00BE4C15 /* ASInsetLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED091B17843500DA7C62 /* ASInsetLayoutSpec.h */; }; + F7CE6C601D2CDB3E00BE4C15 /* ASLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED0B1B17843500DA7C62 /* ASLayout.h */; }; + F7CE6C611D2CDB3E00BE4C15 /* ASLayoutable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED111B17843500DA7C62 /* ASLayoutable.h */; }; + F7CE6C621D2CDB3E00BE4C15 /* ASLayoutablePrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */; }; + F7CE6C631D2CDB3E00BE4C15 /* ASLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED0D1B17843500DA7C62 /* ASLayoutSpec.h */; }; + F7CE6C641D2CDB3E00BE4C15 /* ASOverlayLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED121B17843500DA7C62 /* ASOverlayLayoutSpec.h */; }; + F7CE6C651D2CDB3E00BE4C15 /* ASRatioLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED141B17843500DA7C62 /* ASRatioLayoutSpec.h */; }; + F7CE6C661D2CDB3E00BE4C15 /* ASRelativeLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 7A06A7391C35F08800FE8DAA /* ASRelativeLayoutSpec.h */; }; + F7CE6C671D2CDB3E00BE4C15 /* ASRelativeSize.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC47D9431B3BB41900AAEE9D /* ASRelativeSize.h */; }; + F7CE6C681D2CDB3E00BE4C15 /* ASStackLayoutable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9C49C36E1B853957000B0DD5 /* ASStackLayoutable.h */; }; + F7CE6C691D2CDB3E00BE4C15 /* ASStackLayoutDefines.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC21EC0F1B3D0BF600C8B19A /* ASStackLayoutDefines.h */; }; + F7CE6C6A1D2CDB3E00BE4C15 /* ASStackLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED161B17843500DA7C62 /* ASStackLayoutSpec.h */; }; + F7CE6C6B1D2CDB3E00BE4C15 /* ASStaticLayoutable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9C6BB3B01B8CC9C200F13F52 /* ASStaticLayoutable.h */; }; + F7CE6C6C1D2CDB3E00BE4C15 /* ASStaticLayoutSpec.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED181B17843500DA7C62 /* ASStaticLayoutSpec.h */; }; + F7CE6C6D1D2CDB3E00BE4C15 /* ASTextKitComponents.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754BA1BEE458E00737CA5 /* ASTextKitComponents.h */; }; + F7CE6C6E1D2CDB3E00BE4C15 /* ASTextNodeWordKerner.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754B91BEE458E00737CA5 /* ASTextNodeWordKerner.h */; }; + F7CE6C6F1D2CDB3E00BE4C15 /* ASTextNodeTypes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754BC1BEE458E00737CA5 /* ASTextNodeTypes.h */; }; + F7CE6C701D2CDB3E00BE4C15 /* ASTextKitAttributes.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754951BEE44CD00737CA5 /* ASTextKitAttributes.h */; }; + F7CE6C711D2CDB3F00BE4C15 /* ASTextKitContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754961BEE44CD00737CA5 /* ASTextKitContext.h */; }; + F7CE6C721D2CDB3F00BE4C15 /* ASTextKitEntityAttribute.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754981BEE44CD00737CA5 /* ASTextKitEntityAttribute.h */; }; + F7CE6C731D2CDB3F00BE4C15 /* ASTextKitRenderer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754931BEE44CD00737CA5 /* ASTextKitRenderer.h */; }; + F7CE6C741D2CDB3F00BE4C15 /* ASTextKitRenderer+Positioning.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2577549B1BEE44CD00737CA5 /* ASTextKitRenderer+Positioning.h */; }; + F7CE6C751D2CDB3F00BE4C15 /* ASTextKitRenderer+TextChecking.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2577549D1BEE44CD00737CA5 /* ASTextKitRenderer+TextChecking.h */; }; + F7CE6C761D2CDB3F00BE4C15 /* ASTextKitShadower.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2577549F1BEE44CD00737CA5 /* ASTextKitShadower.h */; }; + F7CE6C771D2CDB3F00BE4C15 /* ASTextKitTailTruncater.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754A11BEE44CD00737CA5 /* ASTextKitTailTruncater.h */; }; + F7CE6C781D2CDB3F00BE4C15 /* ASTextKitFontSizeAdjuster.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = A32FEDD31C501B6A004F642A /* ASTextKitFontSizeAdjuster.h */; }; + F7CE6C791D2CDB3F00BE4C15 /* ASTextKitTruncating.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754A31BEE44CD00737CA5 /* ASTextKitTruncating.h */; }; + F7CE6C7A1D2CDB3F00BE4C15 /* ASEqualityHashHelpers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 257754A41BEE44CD00737CA5 /* ASEqualityHashHelpers.h */; }; + F7CE6C7B1D2CDB3F00BE4C15 /* ASAssert.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A43195D058D00B7D73C /* ASAssert.h */; }; + F7CE6C7C1D2CDB3F00BE4C15 /* ASAvailability.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0516FA3A1A15563400B4EBED /* ASAvailability.h */; }; + F7CE6C7D1D2CDB3F00BE4C15 /* ASBaseDefines.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A44195D058D00B7D73C /* ASBaseDefines.h */; }; + F7CE6C7E1D2CDB3F00BE4C15 /* ASEqualityHelpers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 1950C4481A3BB5C1005C8279 /* ASEqualityHelpers.h */; }; + F7CE6C7F1D2CDB3F00BE4C15 /* ASLog.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0516FA3B1A15563400B4EBED /* ASLog.h */; }; + F7CE6C801D2CDB5800BE4C15 /* ASVideoPlayerNode.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8BDA5FC31CDBDDE1007D13B2 /* ASVideoPlayerNode.h */; }; + F7CE6C811D2CDB5800BE4C15 /* ASCollectionInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DEC146B41C37A16A004A0EE7 /* ASCollectionInternal.h */; }; + F7CE6C821D2CDB5800BE4C15 /* ASTableViewInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC7A2C161BDE11DF0093FE1A /* ASTableViewInternal.h */; }; + F7CE6C831D2CDB5800BE4C15 /* ASImageNode+tvOS.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 92074A5F1CC8BA1900918F75 /* ASImageNode+tvOS.h */; }; + F7CE6C841D2CDB5800BE4C15 /* ASControlNode+tvOS.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 92074A651CC8BADA00918F75 /* ASControlNode+tvOS.h */; }; + F7CE6C851D2CDB5800BE4C15 /* NSIndexSet+ASHelpers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; + F7CE6C861D2CDB5800BE4C15 /* _ASDisplayViewAccessiblity.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 69CB62A91CB8165900024920 /* _ASDisplayViewAccessiblity.h */; }; + F7CE6C871D2CDB5800BE4C15 /* ASDataController+Subclasses.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */; }; + F7CE6C881D2CDB5800BE4C15 /* ASIndexPath.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 430E7C8E1B4C23F100697A4C /* ASIndexPath.m */; }; + F7CE6C891D2CDB5800BE4C15 /* ASRunLoopQueue.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */; }; + F7CE6C8A1D2CDB5800BE4C15 /* ASWeakProxy.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68B8A4E01CBDB958007E4543 /* ASWeakProxy.m */; }; + F7CE6C8B1D2CDB5800BE4C15 /* ASCollectionDataController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF21BBB3D690087C538 /* ASCollectionDataController.h */; }; + F7CE6C8C1D2CDB5800BE4C15 /* _ASCoreAnimationExtras.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A03195D050800B7D73C /* _ASCoreAnimationExtras.h */; }; + F7CE6C8D1D2CDB5800BE4C15 /* _ASHierarchyChangeSet.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */; }; + F7CE6C8E1D2CDB5800BE4C15 /* _ASPendingState.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A06195D050800B7D73C /* _ASPendingState.mm */; }; + F7CE6C8F1D2CDB5800BE4C15 /* _ASScopeTimer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A07195D050800B7D73C /* _ASScopeTimer.h */; }; + F7CE6C901D2CDB5800BE4C15 /* _ASTransitionContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; + F7CE6C911D2CDB5800BE4C15 /* _ASTransitionContext.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB55C2601C6408D6004EDCF5 /* _ASTransitionContext.m */; }; + F7CE6C921D2CDB5800BE4C15 /* ASBatchFetching.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 044285061BAA63FE00D16268 /* ASBatchFetching.m */; }; + F7CE6C931D2CDB5800BE4C15 /* ASDisplayNode+FrameworkPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */; }; + F7CE6C941D2CDB5800BE4C15 /* ASDisplayNodeInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */; }; + F7CE6C951D2CDB5800BE4C15 /* ASLayoutTransition.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */; }; + F7CE6C961D2CDB5800BE4C15 /* ASEnvironmentInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */; }; + F7CE6C971D2CDB5800BE4C15 /* ASImageNode+CGExtras.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */; }; + F7CE6C981D2CDB5800BE4C15 /* ASInternalHelpers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */; }; + F7CE6C991D2CDB5800BE4C15 /* ASLayoutSpecUtilities.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */; }; + F7CE6C9A1D2CDB5800BE4C15 /* ASMultidimensionalArrayUtils.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */; }; + F7CE6C9B1D2CDB5800BE4C15 /* ASPendingStateController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CC3B20811C3F76D600798563 /* ASPendingStateController.h */; }; + F7CE6C9C1D2CDB5800BE4C15 /* ASSentinel.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A10195D050800B7D73C /* ASSentinel.h */; }; + F7CE6C9D1D2CDB5800BE4C15 /* ASStackBaselinePositionedLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 9C8221931BA237B80037F19A /* ASStackBaselinePositionedLayout.h */; }; + F7CE6C9E1D2CDB5800BE4C15 /* ASStackLayoutSpecUtilities.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED461B17847A00DA7C62 /* ASStackLayoutSpecUtilities.h */; }; + F7CE6C9F1D2CDB5800BE4C15 /* ASStackPositionedLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED471B17847A00DA7C62 /* ASStackPositionedLayout.h */; }; + F7CE6CA01D2CDB5800BE4C15 /* ASStackUnpositionedLayout.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = ACF6ED491B17847A00DA7C62 /* ASStackUnpositionedLayout.h */; }; + F7CE6CA11D2CDB5800BE4C15 /* ASWeakSet.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CC3B20871C3F7A5400798563 /* ASWeakSet.h */; }; + F7CE6CA21D2CDB5800BE4C15 /* ASDefaultPlaybackButton.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */; }; + F7CE6CA31D2CDB5800BE4C15 /* ASLayoutValidation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 697C0DE11CF38F28001DE0D4 /* ASLayoutValidation.h */; }; + F7CE6CA41D2CDB5800BE4C15 /* ASLayoutManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B30BF6501C5964B0004FCD53 /* ASLayoutManager.h */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -638,6 +631,152 @@ dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( + F7CE6C131D2CDB3E00BE4C15 /* ASPagerFlowLayout.h in CopyFiles */, + F7CE6C141D2CDB3E00BE4C15 /* ASMapNode.h in CopyFiles */, + F7CE6C151D2CDB3E00BE4C15 /* ASVideoNode.h in CopyFiles */, + F7CE6C161D2CDB3E00BE4C15 /* ASCellNode.h in CopyFiles */, + F7CE6C171D2CDB3E00BE4C15 /* ASCollectionNode.h in CopyFiles */, + F7CE6C181D2CDB3E00BE4C15 /* ASCollectionNode+Beta.h in CopyFiles */, + F7CE6C191D2CDB3E00BE4C15 /* ASCollectionView.h in CopyFiles */, + F7CE6C1A1D2CDB3E00BE4C15 /* ASCollectionViewProtocols.h in CopyFiles */, + F7CE6C1B1D2CDB3E00BE4C15 /* ASCollectionViewLayoutFacilitatorProtocol.h in CopyFiles */, + F7CE6C1C1D2CDB3E00BE4C15 /* ASControlNode.h in CopyFiles */, + F7CE6C1D1D2CDB3E00BE4C15 /* ASButtonNode.h in CopyFiles */, + F7CE6C1E1D2CDB3E00BE4C15 /* ASControlNode+Subclasses.h in CopyFiles */, + F7CE6C1F1D2CDB3E00BE4C15 /* ASDisplayNode.h in CopyFiles */, + F7CE6C201D2CDB3E00BE4C15 /* ASDisplayNode+Beta.h in CopyFiles */, + F7CE6C211D2CDB3E00BE4C15 /* ASDisplayNode+Subclasses.h in CopyFiles */, + F7CE6C221D2CDB3E00BE4C15 /* ASDisplayNodeExtras.h in CopyFiles */, + F7CE6C231D2CDB3E00BE4C15 /* ASEditableTextNode.h in CopyFiles */, + F7CE6C241D2CDB3E00BE4C15 /* ASImageNode.h in CopyFiles */, + F7CE6C251D2CDB3E00BE4C15 /* UIImage+ASConvenience.h in CopyFiles */, + F7CE6C261D2CDB3E00BE4C15 /* ASMultiplexImageNode.h in CopyFiles */, + F7CE6C271D2CDB3E00BE4C15 /* ASNavigationController.h in CopyFiles */, + F7CE6C281D2CDB3E00BE4C15 /* ASNetworkImageNode.h in CopyFiles */, + F7CE6C291D2CDB3E00BE4C15 /* ASPagerNode.h in CopyFiles */, + F7CE6C2A1D2CDB3E00BE4C15 /* ASScrollNode.h in CopyFiles */, + F7CE6C2B1D2CDB3E00BE4C15 /* ASTabBarController.h in CopyFiles */, + F7CE6C2C1D2CDB3E00BE4C15 /* ASTableNode.h in CopyFiles */, + F7CE6C2D1D2CDB3E00BE4C15 /* ASTableView.h in CopyFiles */, + F7CE6C2E1D2CDB3E00BE4C15 /* ASTableViewProtocols.h in CopyFiles */, + F7CE6C2F1D2CDB3E00BE4C15 /* ASTextNode.h in CopyFiles */, + F7CE6C301D2CDB3E00BE4C15 /* ASTextNode+Beta.h in CopyFiles */, + F7CE6C311D2CDB3E00BE4C15 /* ASViewController.h in CopyFiles */, + F7CE6C321D2CDB3E00BE4C15 /* AsyncDisplayKit.h in CopyFiles */, + F7CE6C331D2CDB3E00BE4C15 /* AsyncDisplayKit+Debug.h in CopyFiles */, + F7CE6C341D2CDB3E00BE4C15 /* ASContextTransitioning.h in CopyFiles */, + F7CE6C351D2CDB3E00BE4C15 /* ASVisibilityProtocols.h in CopyFiles */, + F7CE6C361D2CDB3E00BE4C15 /* _ASDisplayLayer.h in CopyFiles */, + F7CE6C371D2CDB3E00BE4C15 /* _ASDisplayView.h in CopyFiles */, + F7CE6C381D2CDB3E00BE4C15 /* ASAbstractLayoutController.h in CopyFiles */, + F7CE6C391D2CDB3E00BE4C15 /* ASBasicImageDownloader.h in CopyFiles */, + F7CE6C3A1D2CDB3E00BE4C15 /* ASBatchContext.h in CopyFiles */, + F7CE6C3B1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.h in CopyFiles */, + F7CE6C3C1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.m in CopyFiles */, + F7CE6C3D1D2CDB3E00BE4C15 /* ASCollectionViewLayoutController.h in CopyFiles */, + F7CE6C3E1D2CDB3E00BE4C15 /* ASDealloc2MainObject.h in CopyFiles */, + F7CE6C3F1D2CDB3E00BE4C15 /* ASEnvironment.h in CopyFiles */, + F7CE6C401D2CDB3E00BE4C15 /* ASFlowLayoutController.h in CopyFiles */, + F7CE6C411D2CDB3E00BE4C15 /* ASHighlightOverlayLayer.h in CopyFiles */, + F7CE6C421D2CDB3E00BE4C15 /* ASIndexPath.h in CopyFiles */, + F7CE6C431D2CDB3E00BE4C15 /* ASImageProtocols.h in CopyFiles */, + F7CE6C441D2CDB3E00BE4C15 /* ASImageContainerProtocolCategories.h in CopyFiles */, + F7CE6C461D2CDB3E00BE4C15 /* ASLayoutController.h in CopyFiles */, + F7CE6C471D2CDB3E00BE4C15 /* ASLayoutRangeType.h in CopyFiles */, + F7CE6C481D2CDB3E00BE4C15 /* ASMutableAttributedStringBuilder.h in CopyFiles */, + F7CE6C491D2CDB3E00BE4C15 /* ASPhotosFrameworkImageRequest.h in CopyFiles */, + F7CE6C4A1D2CDB3E00BE4C15 /* ASRangeController.h in CopyFiles */, + F7CE6C4B1D2CDB3E00BE4C15 /* ASRangeControllerUpdateRangeProtocol+Beta.h in CopyFiles */, + F7CE6C4C1D2CDB3E00BE4C15 /* ASRunLoopQueue.h in CopyFiles */, + F7CE6C4D1D2CDB3E00BE4C15 /* ASScrollDirection.h in CopyFiles */, + F7CE6C4E1D2CDB3E00BE4C15 /* ASThread.h in CopyFiles */, + F7CE6C4F1D2CDB3E00BE4C15 /* CGRect+ASConvenience.h in CopyFiles */, + F7CE6C501D2CDB3E00BE4C15 /* ASDataController.h in CopyFiles */, + F7CE6C511D2CDB3E00BE4C15 /* ASChangeSetDataController.h in CopyFiles */, + F7CE6C521D2CDB3E00BE4C15 /* ASIndexedNodeContext.h in CopyFiles */, + F7CE6C531D2CDB3E00BE4C15 /* NSMutableAttributedString+TextKitAdditions.h in CopyFiles */, + F7CE6C541D2CDB3E00BE4C15 /* _ASAsyncTransaction.h in CopyFiles */, + F7CE6C551D2CDB3E00BE4C15 /* _ASAsyncTransactionContainer+Private.h in CopyFiles */, + F7CE6C561D2CDB3E00BE4C15 /* _ASAsyncTransactionContainer.h in CopyFiles */, + F7CE6C571D2CDB3E00BE4C15 /* _ASAsyncTransactionGroup.h in CopyFiles */, + F7CE6C581D2CDB3E00BE4C15 /* UICollectionViewLayout+ASConvenience.h in CopyFiles */, + F7CE6C5B1D2CDB3E00BE4C15 /* ASAsciiArtBoxCreator.h in CopyFiles */, + F7CE6C5C1D2CDB3E00BE4C15 /* ASBackgroundLayoutSpec.h in CopyFiles */, + F7CE6C5D1D2CDB3E00BE4C15 /* ASCenterLayoutSpec.h in CopyFiles */, + F7CE6C5E1D2CDB3E00BE4C15 /* ASDimension.h in CopyFiles */, + F7CE6C5F1D2CDB3E00BE4C15 /* ASInsetLayoutSpec.h in CopyFiles */, + F7CE6C601D2CDB3E00BE4C15 /* ASLayout.h in CopyFiles */, + F7CE6C611D2CDB3E00BE4C15 /* ASLayoutable.h in CopyFiles */, + F7CE6C621D2CDB3E00BE4C15 /* ASLayoutablePrivate.h in CopyFiles */, + F7CE6C631D2CDB3E00BE4C15 /* ASLayoutSpec.h in CopyFiles */, + F7CE6C641D2CDB3E00BE4C15 /* ASOverlayLayoutSpec.h in CopyFiles */, + F7CE6C651D2CDB3E00BE4C15 /* ASRatioLayoutSpec.h in CopyFiles */, + F7CE6C661D2CDB3E00BE4C15 /* ASRelativeLayoutSpec.h in CopyFiles */, + F7CE6C671D2CDB3E00BE4C15 /* ASRelativeSize.h in CopyFiles */, + F7CE6C681D2CDB3E00BE4C15 /* ASStackLayoutable.h in CopyFiles */, + F7CE6C691D2CDB3E00BE4C15 /* ASStackLayoutDefines.h in CopyFiles */, + F7CE6C6A1D2CDB3E00BE4C15 /* ASStackLayoutSpec.h in CopyFiles */, + F7CE6C6B1D2CDB3E00BE4C15 /* ASStaticLayoutable.h in CopyFiles */, + F7CE6C6C1D2CDB3E00BE4C15 /* ASStaticLayoutSpec.h in CopyFiles */, + F7CE6C6D1D2CDB3E00BE4C15 /* ASTextKitComponents.h in CopyFiles */, + F7CE6C6E1D2CDB3E00BE4C15 /* ASTextNodeWordKerner.h in CopyFiles */, + F7CE6C6F1D2CDB3E00BE4C15 /* ASTextNodeTypes.h in CopyFiles */, + F7CE6C701D2CDB3E00BE4C15 /* ASTextKitAttributes.h in CopyFiles */, + F7CE6C711D2CDB3F00BE4C15 /* ASTextKitContext.h in CopyFiles */, + F7CE6C721D2CDB3F00BE4C15 /* ASTextKitEntityAttribute.h in CopyFiles */, + F7CE6C731D2CDB3F00BE4C15 /* ASTextKitRenderer.h in CopyFiles */, + F7CE6C741D2CDB3F00BE4C15 /* ASTextKitRenderer+Positioning.h in CopyFiles */, + F7CE6C751D2CDB3F00BE4C15 /* ASTextKitRenderer+TextChecking.h in CopyFiles */, + F7CE6C761D2CDB3F00BE4C15 /* ASTextKitShadower.h in CopyFiles */, + F7CE6C771D2CDB3F00BE4C15 /* ASTextKitTailTruncater.h in CopyFiles */, + F7CE6C781D2CDB3F00BE4C15 /* ASTextKitFontSizeAdjuster.h in CopyFiles */, + F7CE6C791D2CDB3F00BE4C15 /* ASTextKitTruncating.h in CopyFiles */, + F7CE6C7A1D2CDB3F00BE4C15 /* ASEqualityHashHelpers.h in CopyFiles */, + F7CE6C7B1D2CDB3F00BE4C15 /* ASAssert.h in CopyFiles */, + F7CE6C7C1D2CDB3F00BE4C15 /* ASAvailability.h in CopyFiles */, + F7CE6C7D1D2CDB3F00BE4C15 /* ASBaseDefines.h in CopyFiles */, + F7CE6C7E1D2CDB3F00BE4C15 /* ASEqualityHelpers.h in CopyFiles */, + F7CE6C7F1D2CDB3F00BE4C15 /* ASLog.h in CopyFiles */, + F7CE6C801D2CDB5800BE4C15 /* ASVideoPlayerNode.h in CopyFiles */, + F7CE6C811D2CDB5800BE4C15 /* ASCollectionInternal.h in CopyFiles */, + F7CE6C821D2CDB5800BE4C15 /* ASTableViewInternal.h in CopyFiles */, + F7CE6C831D2CDB5800BE4C15 /* ASImageNode+tvOS.h in CopyFiles */, + F7CE6C841D2CDB5800BE4C15 /* ASControlNode+tvOS.h in CopyFiles */, + F7CE6C851D2CDB5800BE4C15 /* NSIndexSet+ASHelpers.h in CopyFiles */, + F7CE6C861D2CDB5800BE4C15 /* _ASDisplayViewAccessiblity.h in CopyFiles */, + F7CE6C871D2CDB5800BE4C15 /* ASDataController+Subclasses.h in CopyFiles */, + F7CE6C881D2CDB5800BE4C15 /* ASIndexPath.m in CopyFiles */, + F7CE6C451D2CDB3E00BE4C15 /* ASPINRemoteImageDownloader.h in CopyFiles */, + F7CE6C891D2CDB5800BE4C15 /* ASRunLoopQueue.mm in CopyFiles */, + F7CE6C8A1D2CDB5800BE4C15 /* ASWeakProxy.m in CopyFiles */, + F7CE6C8B1D2CDB5800BE4C15 /* ASCollectionDataController.h in CopyFiles */, + F7CE6C591D2CDB3E00BE4C15 /* UIView+ASConvenience.h in CopyFiles */, + F7CE6C5A1D2CDB3E00BE4C15 /* ASTraitCollection.h in CopyFiles */, + F7CE6C8C1D2CDB5800BE4C15 /* _ASCoreAnimationExtras.h in CopyFiles */, + F7CE6C8D1D2CDB5800BE4C15 /* _ASHierarchyChangeSet.h in CopyFiles */, + F7CE6C8E1D2CDB5800BE4C15 /* _ASPendingState.mm in CopyFiles */, + F7CE6C8F1D2CDB5800BE4C15 /* _ASScopeTimer.h in CopyFiles */, + F7CE6C901D2CDB5800BE4C15 /* _ASTransitionContext.h in CopyFiles */, + F7CE6C911D2CDB5800BE4C15 /* _ASTransitionContext.m in CopyFiles */, + F7CE6C921D2CDB5800BE4C15 /* ASBatchFetching.m in CopyFiles */, + F7CE6C931D2CDB5800BE4C15 /* ASDisplayNode+FrameworkPrivate.h in CopyFiles */, + F7CE6C941D2CDB5800BE4C15 /* ASDisplayNodeInternal.h in CopyFiles */, + F7CE6C951D2CDB5800BE4C15 /* ASLayoutTransition.h in CopyFiles */, + F7CE6C961D2CDB5800BE4C15 /* ASEnvironmentInternal.h in CopyFiles */, + F7CE6C971D2CDB5800BE4C15 /* ASImageNode+CGExtras.h in CopyFiles */, + F7CE6C981D2CDB5800BE4C15 /* ASInternalHelpers.h in CopyFiles */, + F7CE6C991D2CDB5800BE4C15 /* ASLayoutSpecUtilities.h in CopyFiles */, + F7CE6C9A1D2CDB5800BE4C15 /* ASMultidimensionalArrayUtils.h in CopyFiles */, + F7CE6C9B1D2CDB5800BE4C15 /* ASPendingStateController.h in CopyFiles */, + F7CE6C9C1D2CDB5800BE4C15 /* ASSentinel.h in CopyFiles */, + F7CE6C9D1D2CDB5800BE4C15 /* ASStackBaselinePositionedLayout.h in CopyFiles */, + F7CE6C9E1D2CDB5800BE4C15 /* ASStackLayoutSpecUtilities.h in CopyFiles */, + F7CE6C9F1D2CDB5800BE4C15 /* ASStackPositionedLayout.h in CopyFiles */, + F7CE6CA01D2CDB5800BE4C15 /* ASStackUnpositionedLayout.h in CopyFiles */, + F7CE6CA11D2CDB5800BE4C15 /* ASWeakSet.h in CopyFiles */, + F7CE6CA21D2CDB5800BE4C15 /* ASDefaultPlaybackButton.h in CopyFiles */, + F7CE6CA31D2CDB5800BE4C15 /* ASLayoutValidation.h in CopyFiles */, + F7CE6CA41D2CDB5800BE4C15 /* ASLayoutManager.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1534,166 +1673,6 @@ /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 058D0A46195D05C300B7D73C /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 698C8B611CAB49FC0052DC3F /* ASLayoutableExtensibility.h in Headers */, - 698548631CA9E025008A345F /* ASEnvironment.h in Headers */, - E5711A2B1C840C81009619D4 /* ASIndexedNodeContext.h in Headers */, - 257754C21BEE458E00737CA5 /* ASTextKitCoreTextAdditions.h in Headers */, - A373200F1C571B730011FC94 /* ASTextNode+Beta.h in Headers */, - 69F10C861C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h in Headers */, - 92DD2FE31BF4B97E0074C9DD /* ASMapNode.h in Headers */, - AC026B691BD57D6F00BBC17E /* ASChangeSetDataController.h in Headers */, - 058D0A71195D05F800B7D73C /* _AS-objc-internal.h in Headers */, - 058D0A68195D05EC00B7D73C /* _ASAsyncTransaction.h in Headers */, - 058D0A6A195D05EC00B7D73C /* _ASAsyncTransactionContainer+Private.h in Headers */, - A32FEDD51C501B6A004F642A /* ASTextKitFontSizeAdjuster.h in Headers */, - 058D0A6B195D05EC00B7D73C /* _ASAsyncTransactionContainer.h in Headers */, - 058D0A6D195D05EC00B7D73C /* _ASAsyncTransactionGroup.h in Headers */, - 058D0A72195D05F800B7D73C /* _ASCoreAnimationExtras.h in Headers */, - 7A06A73B1C35F08800FE8DAA /* ASRelativeLayoutSpec.h in Headers */, - 68B8A4DC1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h in Headers */, - A2763D791CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h in Headers */, - 058D0A53195D05DC00B7D73C /* _ASDisplayLayer.h in Headers */, - 058D0A55195D05DC00B7D73C /* _ASDisplayView.h in Headers */, - B13CA0F71C519E9400E031AB /* ASCollectionViewLayoutFacilitatorProtocol.h in Headers */, - 058D0A74195D05F800B7D73C /* _ASPendingState.h in Headers */, - 9C5586691BD549CB00B50E3A /* ASAsciiArtBoxCreator.h in Headers */, - 058D0A76195D05F900B7D73C /* _ASScopeTimer.h in Headers */, - 68EE0DBD1C1B4ED300BA1B99 /* ASMainSerialQueue.h in Headers */, - 257754B31BEE44CD00737CA5 /* ASTextKitTailTruncater.h in Headers */, - 205F0E191B37339C007741D0 /* ASAbstractLayoutController.h in Headers */, - 058D0A82195D060300B7D73C /* ASAssert.h in Headers */, - 0516FA3C1A15563400B4EBED /* ASAvailability.h in Headers */, - AEB7B01A1C5962EA00662EF4 /* ASDefaultPlayButton.h in Headers */, - 68FC85E21CE29B7E00EDD713 /* ASTabBarController.h in Headers */, - ACF6ED1A1B17843500DA7C62 /* ASBackgroundLayoutSpec.h in Headers */, - 058D0A83195D060300B7D73C /* ASBaseDefines.h in Headers */, - 054963491A1EA066000F8E56 /* ASBasicImageDownloader.h in Headers */, - 2967F9E21AB0A5190072E4AB /* ASBasicImageDownloaderInternal.h in Headers */, - 25E327561C16819500A2170C /* ASPagerNode.h in Headers */, - 299DA1A91A828D2900162D41 /* ASBatchContext.h in Headers */, - 251B8EF91BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h in Headers */, - 044285071BAA63FE00D16268 /* ASBatchFetching.h in Headers */, - 055F1A3C19ABD43F004DAFF1 /* ASCellNode.h in Headers */, - ACF6ED1C1B17843500DA7C62 /* ASCenterLayoutSpec.h in Headers */, - 18C2ED7E1B9B7DE800F627B3 /* ASCollectionNode.h in Headers */, - 257754C01BEE458E00737CA5 /* ASTextNodeWordKerner.h in Headers */, - AC3C4A511A1139C100143C57 /* ASCollectionView.h in Headers */, - AEEC47E11C20C2DD00EC1693 /* ASVideoNode.h in Headers */, - DE8BEAC11C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */, - 68FC85DE1CE29AB700EDD713 /* ASNavigationController.h in Headers */, - 205F0E1D1B373A2C007741D0 /* ASCollectionViewLayoutController.h in Headers */, - AC3C4A541A113EEC00143C57 /* ASCollectionViewProtocols.h in Headers */, - 058D0A49195D05CB00B7D73C /* ASControlNode+Subclasses.h in Headers */, - 058D0A47195D05CB00B7D73C /* ASControlNode.h in Headers */, - 257754A51BEE44CD00737CA5 /* ASTextKitRenderer.h in Headers */, - 464052201A3F83C40061C0BA /* ASDataController.h in Headers */, - 05A6D05A19D0EB64002DD95E /* ASDealloc2MainObject.h in Headers */, - ACF6ED201B17843500DA7C62 /* ASDimension.h in Headers */, - 058D0A78195D05F900B7D73C /* ASDisplayNode+DebugTiming.h in Headers */, - DECBD6E71BE56E1900CF4905 /* ASButtonNode.h in Headers */, - 68B8A4E11CBDB958007E4543 /* ASWeakProxy.h in Headers */, - DBC452DB1C5BF64600B16017 /* NSArray+Diffing.h in Headers */, - 058D0A4C195D05CB00B7D73C /* ASDisplayNode+Subclasses.h in Headers */, - 058D0A4A195D05CB00B7D73C /* ASDisplayNode.h in Headers */, - AC7A2C171BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */, - 058D0A4D195D05CB00B7D73C /* ASDisplayNodeExtras.h in Headers */, - 92074A671CC8BADA00918F75 /* ASControlNode+tvOS.h in Headers */, - 8021EC1C1D2B00B100799119 /* UIImage+ASConvenience.h in Headers */, - 697C0DE31CF38F28001DE0D4 /* ASLayoutValidation.h in Headers */, - 68355B3B1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.h in Headers */, - 68B0277A1C1A79CC0041016B /* ASDisplayNode+Beta.h in Headers */, - 767E7F8D1C9019130066C000 /* AsyncDisplayKit+Debug.h in Headers */, - 257754B11BEE44CD00737CA5 /* ASTextKitShadower.h in Headers */, - 058D0A7B195D05F900B7D73C /* ASDisplayNodeInternal.h in Headers */, - 0587F9BD1A7309ED00AFF0BA /* ASEditableTextNode.h in Headers */, - DE6EA3221C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h in Headers */, - 1950C4491A3BB5C1005C8279 /* ASEqualityHelpers.h in Headers */, - 68FC85E91CE29C7D00EDD713 /* ASVisibilityProtocols.h in Headers */, - 257754A81BEE44CD00737CA5 /* ASTextKitContext.h in Headers */, - DB55C2611C6408D6004EDCF5 /* _ASTransitionContext.h in Headers */, - 464052221A3F83C40061C0BA /* ASFlowLayoutController.h in Headers */, - 9C70F2031CDA4EFA007D6C76 /* ASTraitCollection.h in Headers */, - 257754AF1BEE44CD00737CA5 /* ASTextKitRenderer+TextChecking.h in Headers */, - 058D0A57195D05DC00B7D73C /* ASHighlightOverlayLayer.h in Headers */, - 058D0A7C195D05F900B7D73C /* ASImageNode+CGExtras.h in Headers */, - DBDB83941C6E879900D0098C /* ASPagerFlowLayout.h in Headers */, - 058D0A4F195D05CB00B7D73C /* ASImageNode.h in Headers */, - 05F20AA41A15733C00DCA68A /* ASImageProtocols.h in Headers */, - 8BDA5FC51CDBDDE1007D13B2 /* ASVideoPlayerNode.h in Headers */, - 430E7C8F1B4C23F100697A4C /* ASIndexPath.h in Headers */, - ACF6ED221B17843500DA7C62 /* ASInsetLayoutSpec.h in Headers */, - ACF6ED4B1B17847A00DA7C62 /* ASInternalHelpers.h in Headers */, - DB55C2661C641AE4004EDCF5 /* ASContextTransitioning.h in Headers */, - 68355B3D1CB57A5A001D4E68 /* ASPINRemoteImageDownloader.h in Headers */, - ACF6ED241B17843500DA7C62 /* ASLayout.h in Headers */, - 251B8EFB1BBB3D690087C538 /* ASDataController+Subclasses.h in Headers */, - ACF6ED2A1B17843500DA7C62 /* ASLayoutable.h in Headers */, - 9CDC18CC1B910E12004965E2 /* ASLayoutablePrivate.h in Headers */, - B0F8805A1BEAEC7500D17647 /* ASTableNode.h in Headers */, - 464052241A3F83C40061C0BA /* ASLayoutController.h in Headers */, - 292C599F1A956527007E5DD6 /* ASLayoutRangeType.h in Headers */, - 257754B61BEE44CD00737CA5 /* ASEqualityHashHelpers.h in Headers */, - ACF6ED261B17843500DA7C62 /* ASLayoutSpec.h in Headers */, - ACF6ED4D1B17847A00DA7C62 /* ASLayoutSpecUtilities.h in Headers */, - AC026B6F1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h in Headers */, - 0516FA3D1A15563400B4EBED /* ASLog.h in Headers */, - 257754AA1BEE44CD00737CA5 /* ASTextKitEntityAttribute.h in Headers */, - B13CA1001C52004900E031AB /* ASCollectionNode+Beta.h in Headers */, - 0442850D1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h in Headers */, - 0516FA401A1563D200B4EBED /* ASMultiplexImageNode.h in Headers */, - 8B0768B31CE752EC002E1453 /* ASDefaultPlaybackButton.h in Headers */, - 058D0A59195D05DC00B7D73C /* ASMutableAttributedStringBuilder.h in Headers */, - 055B9FA81A1C154B00035D6D /* ASNetworkImageNode.h in Headers */, - ACF6ED2B1B17843500DA7C62 /* ASOverlayLayoutSpec.h in Headers */, - 055F1A3819ABD413004DAFF1 /* ASRangeController.h in Headers */, - E52405B51C8FEF16004DC8E7 /* ASLayoutTransition.h in Headers */, - ACF6ED2D1B17843500DA7C62 /* ASRatioLayoutSpec.h in Headers */, - AC47D9451B3BB41900AAEE9D /* ASRelativeSize.h in Headers */, - 291B63FB1AA53A7A000A71B3 /* ASScrollDirection.h in Headers */, - CC4981BC1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h in Headers */, - D785F6621A74327E00291744 /* ASScrollNode.h in Headers */, - 058D0A7F195D05F900B7D73C /* ASSentinel.h in Headers */, - 9C8221951BA237B80037F19A /* ASStackBaselinePositionedLayout.h in Headers */, - 257754C31BEE458E00737CA5 /* ASTextNodeTypes.h in Headers */, - 9C49C36F1B853957000B0DD5 /* ASStackLayoutable.h in Headers */, - 69E1006D1CA89CB600D88C1B /* ASEnvironmentInternal.h in Headers */, - AC21EC101B3D0BF600C8B19A /* ASStackLayoutDefines.h in Headers */, - CC7FD9DE1BB5E962005CCB2B /* ASPhotosFrameworkImageRequest.h in Headers */, - ACF6ED2F1B17843500DA7C62 /* ASStackLayoutSpec.h in Headers */, - ACF6ED4E1B17847A00DA7C62 /* ASStackLayoutSpecUtilities.h in Headers */, - 257754B51BEE44CD00737CA5 /* ASTextKitTruncating.h in Headers */, - ACF6ED4F1B17847A00DA7C62 /* ASStackPositionedLayout.h in Headers */, - 257754A71BEE44CD00737CA5 /* ASTextKitAttributes.h in Headers */, - CC3B20891C3F7A5400798563 /* ASWeakSet.h in Headers */, - ACF6ED511B17847A00DA7C62 /* ASStackUnpositionedLayout.h in Headers */, - 9C6BB3B21B8CC9C200F13F52 /* ASStaticLayoutable.h in Headers */, - ACF6ED311B17843500DA7C62 /* ASStaticLayoutSpec.h in Headers */, - 055F1A3419ABD3E3004DAFF1 /* ASTableView.h in Headers */, - 251B8EF71BBB3D690087C538 /* ASCollectionDataController.h in Headers */, - 257754C11BEE458E00737CA5 /* ASTextKitComponents.h in Headers */, - B30BF6521C5964B0004FCD53 /* ASLayoutManager.h in Headers */, - 0574D5E219C110940097DC25 /* ASTableViewProtocols.h in Headers */, - 81EE384F1C8E94F000456208 /* ASRunLoopQueue.h in Headers */, - CC3B20831C3F76D600798563 /* ASPendingStateController.h in Headers */, - 69CB62AB1CB8165900024920 /* _ASDisplayViewAccessiblity.h in Headers */, - 058D0A51195D05CB00B7D73C /* ASTextNode.h in Headers */, - 058D0A81195D05F900B7D73C /* ASThread.h in Headers */, - ACC945A91BA9E7A0005E1FB8 /* ASViewController.h in Headers */, - 6BDC61F61979037800E50D21 /* AsyncDisplayKit.h in Headers */, - 257754AD1BEE44CD00737CA5 /* ASTextKitRenderer+Positioning.h in Headers */, - DEC146B61C37A16A004A0EE7 /* ASCollectionInternal.h in Headers */, - 205F0E211B376416007741D0 /* CGRect+ASConvenience.h in Headers */, - 058D0A66195D05DC00B7D73C /* NSMutableAttributedString+TextKitAdditions.h in Headers */, - 205F0E0F1B371875007741D0 /* UICollectionViewLayout+ASConvenience.h in Headers */, - 058D0A6F195D05EC00B7D73C /* UIView+ASConvenience.h in Headers */, - 92074A611CC8BA1900918F75 /* ASImageNode+tvOS.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; B35061D71B010EDF0018CF92 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -1882,7 +1861,6 @@ 058D09A8195D04C000B7D73C /* Sources */, 058D09A9195D04C000B7D73C /* Frameworks */, 058D09AA195D04C000B7D73C /* CopyFiles */, - 058D0A46195D05C300B7D73C /* Headers */, ); buildRules = ( ); From f7b7bcebeb65edcfe7c8703420d94925b6af0865 Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Wed, 6 Jul 2016 16:58:13 +1000 Subject: [PATCH 072/247] * Make the "Life Without Cocoapods" sample build and run. * Properly reference headers within implementation files to avoid import cycles and redeclaration warnings. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 2 + AsyncDisplayKit/ASImageNode.mm | 18 +-- AsyncDisplayKit/ASTextNode.mm | 10 +- .../Private/_ASHierarchyChangeSet.h | 1 - .../project.pbxproj | 103 +++++++++++++++++- 5 files changed, 115 insertions(+), 19 deletions(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 218c4d3fb7..df81db181d 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -598,6 +598,7 @@ F7CE6CA21D2CDB5800BE4C15 /* ASDefaultPlaybackButton.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */; }; F7CE6CA31D2CDB5800BE4C15 /* ASLayoutValidation.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 697C0DE11CF38F28001DE0D4 /* ASLayoutValidation.h */; }; F7CE6CA41D2CDB5800BE4C15 /* ASLayoutManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B30BF6501C5964B0004FCD53 /* ASLayoutManager.h */; }; + F7CE6CB71D2CE2D000BE4C15 /* ASLayoutableExtensibility.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 698C8B601CAB49FC0052DC3F /* ASLayoutableExtensibility.h */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -631,6 +632,7 @@ dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( + F7CE6CB71D2CE2D000BE4C15 /* ASLayoutableExtensibility.h in CopyFiles */, F7CE6C131D2CDB3E00BE4C15 /* ASPagerFlowLayout.h in CopyFiles */, F7CE6C141D2CDB3E00BE4C15 /* ASMapNode.h in CopyFiles */, F7CE6C151D2CDB3E00BE4C15 /* ASVideoNode.h in CopyFiles */, diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index 024bf1370d..ea202e01e0 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -10,15 +10,15 @@ #import "ASImageNode.h" -#import -#import -#import -#import -#import -#import -#import -#import -#import +#import "_ASCoreAnimationExtras.h" +#import "_ASDisplayLayer.h" +#import "ASAssert.h" +#import "ASDisplayNode+Subclasses.h" +#import "ASDisplayNodeInternal.h" +#import "ASDisplayNodeExtras.h" +#import "ASDisplayNode+Beta.h" +#import "ASTextNode.h" +#import "ASImageNode+AnimatedImagePrivate.h" #import "ASImageNode+CGExtras.h" #import "AsyncDisplayKit+Debug.h" diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 3151437f55..e77b1b2bf2 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -13,11 +13,11 @@ #include -#import -#import -#import -#import -#import +#import "_ASDisplayLayer.h" +#import "ASDisplayNode+Subclasses.h" +#import "ASDisplayNodeInternal.h" +#import "ASHighlightOverlayLayer.h" +#import "ASDisplayNodeExtras.h" #import "ASTextKitCoreTextAdditions.h" #import "ASTextKitRenderer+Positioning.h" diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index 755d82004d..ebabc3e950 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -11,7 +11,6 @@ // #import -#import NS_ASSUME_NONNULL_BEGIN diff --git a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj index aaaa497852..9a0904bba1 100644 --- a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj +++ b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj @@ -13,12 +13,50 @@ 0589691B1ABCE0E80059CE2A /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 058969181ABCE0E80059CE2A /* Default-568h@2x.png */; }; 0589691C1ABCE0E80059CE2A /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 058969191ABCE0E80059CE2A /* Default-667h@2x.png */; }; 0589691D1ABCE0E80059CE2A /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0589691A1ABCE0E80059CE2A /* Default-736h@3x.png */; }; - 058969281ABCE1750059CE2A /* libAsyncDisplayKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 058969271ABCE1750059CE2A /* libAsyncDisplayKit.a */; }; 0589692A1ABCE17C0059CE2A /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 058969291ABCE17C0059CE2A /* AssetsLibrary.framework */; }; 0589692C1ABCE1820059CE2A /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0589692B1ABCE1820059CE2A /* Photos.framework */; }; 92DD2FEC1BF4D8BB0074C9DD /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92DD2FEB1BF4D8BB0074C9DD /* MapKit.framework */; }; + F7CE6CB61D2CE00800BE4C15 /* libAsyncDisplayKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F7CE6CAD1D2CDFFB00BE4C15 /* libAsyncDisplayKit.a */; }; /* End PBXBuildFile section */ +/* Begin PBXContainerItemProxy section */ + F7CE6CAC1D2CDFFB00BE4C15 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 058D09AC195D04C000B7D73C; + remoteInfo = AsyncDisplayKit; + }; + F7CE6CAE1D2CDFFB00BE4C15 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 058D09BC195D04C000B7D73C; + remoteInfo = AsyncDisplayKitTests; + }; + F7CE6CB01D2CDFFB00BE4C15 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 057D02BF1AC0A66700C7AC3C; + remoteInfo = AsyncDisplayKitTestHost; + }; + F7CE6CB21D2CDFFB00BE4C15 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = B35061DA1B010EDF0018CF92; + remoteInfo = "AsyncDisplayKit-iOS"; + }; + F7CE6CB41D2CE00300BE4C15 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 058D09AB195D04C000B7D73C; + remoteInfo = AsyncDisplayKit; + }; +/* End PBXContainerItemProxy section */ + /* Begin PBXFileReference section */ 058968EF1ABCE06E0059CE2A /* Life Without CocoaPods.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Life Without CocoaPods.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 058968F31ABCE06E0059CE2A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -30,10 +68,10 @@ 058969181ABCE0E80059CE2A /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 058969191ABCE0E80059CE2A /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; 0589691A1ABCE0E80059CE2A /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; - 058969271ABCE1750059CE2A /* libAsyncDisplayKit.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libAsyncDisplayKit.a; path = "../../build/Debug-iphoneos/libAsyncDisplayKit.a"; sourceTree = ""; }; 058969291ABCE17C0059CE2A /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; 0589692B1ABCE1820059CE2A /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; 92DD2FEB1BF4D8BB0074C9DD /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AsyncDisplayKit.xcodeproj; path = ../../AsyncDisplayKit.xcodeproj; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -41,10 +79,10 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + F7CE6CB61D2CE00800BE4C15 /* libAsyncDisplayKit.a in Frameworks */, 92DD2FEC1BF4D8BB0074C9DD /* MapKit.framework in Frameworks */, 0589692C1ABCE1820059CE2A /* Photos.framework in Frameworks */, 0589692A1ABCE17C0059CE2A /* AssetsLibrary.framework in Frameworks */, - 058969281ABCE1750059CE2A /* libAsyncDisplayKit.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -57,7 +95,7 @@ 92DD2FEB1BF4D8BB0074C9DD /* MapKit.framework */, 0589692B1ABCE1820059CE2A /* Photos.framework */, 058969291ABCE17C0059CE2A /* AssetsLibrary.framework */, - 058969271ABCE1750059CE2A /* libAsyncDisplayKit.a */, + F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */, 058968F11ABCE06E0059CE2A /* Life Without CocoaPods */, 058968F01ABCE06E0059CE2A /* Products */, ); @@ -98,6 +136,17 @@ name = "Supporting Files"; sourceTree = ""; }; + F7CE6CA61D2CDFFB00BE4C15 /* Products */ = { + isa = PBXGroup; + children = ( + F7CE6CAD1D2CDFFB00BE4C15 /* libAsyncDisplayKit.a */, + F7CE6CAF1D2CDFFB00BE4C15 /* AsyncDisplayKitTests.xctest */, + F7CE6CB11D2CDFFB00BE4C15 /* AsyncDisplayKitTestHost.app */, + F7CE6CB31D2CDFFB00BE4C15 /* AsyncDisplayKit.framework */, + ); + name = Products; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -112,6 +161,7 @@ buildRules = ( ); dependencies = ( + F7CE6CB51D2CE00300BE4C15 /* PBXTargetDependency */, ); name = "Life Without CocoaPods"; productName = "Life Without CocoaPods"; @@ -143,6 +193,12 @@ mainGroup = 058968E61ABCE06E0059CE2A; productRefGroup = 058968F01ABCE06E0059CE2A /* Products */; projectDirPath = ""; + projectReferences = ( + { + ProductGroup = F7CE6CA61D2CDFFB00BE4C15 /* Products */; + ProjectRef = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; + }, + ); projectRoot = ""; targets = ( 058968EE1ABCE06E0059CE2A /* Life Without CocoaPods */, @@ -150,6 +206,37 @@ }; /* End PBXProject section */ +/* Begin PBXReferenceProxy section */ + F7CE6CAD1D2CDFFB00BE4C15 /* libAsyncDisplayKit.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libAsyncDisplayKit.a; + remoteRef = F7CE6CAC1D2CDFFB00BE4C15 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F7CE6CAF1D2CDFFB00BE4C15 /* AsyncDisplayKitTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = AsyncDisplayKitTests.xctest; + remoteRef = F7CE6CAE1D2CDFFB00BE4C15 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F7CE6CB11D2CDFFB00BE4C15 /* AsyncDisplayKitTestHost.app */ = { + isa = PBXReferenceProxy; + fileType = wrapper.application; + path = AsyncDisplayKitTestHost.app; + remoteRef = F7CE6CB01D2CDFFB00BE4C15 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + F7CE6CB31D2CDFFB00BE4C15 /* AsyncDisplayKit.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = AsyncDisplayKit.framework; + remoteRef = F7CE6CB21D2CDFFB00BE4C15 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + /* Begin PBXResourcesBuildPhase section */ 058968ED1ABCE06E0059CE2A /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -176,6 +263,14 @@ }; /* End PBXSourcesBuildPhase section */ +/* Begin PBXTargetDependency section */ + F7CE6CB51D2CE00300BE4C15 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = AsyncDisplayKit; + targetProxy = F7CE6CB41D2CE00300BE4C15 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + /* Begin XCBuildConfiguration section */ 058969101ABCE06E0059CE2A /* Debug */ = { isa = XCBuildConfiguration; From c62a4d3e79e6a5cdaf4cf5ba14300ed3bdbf9fa9 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Wed, 6 Jul 2016 14:13:52 -0700 Subject: [PATCH 073/247] [ASCollectionView] Greatly Improve Cell Node Resizing (#1853) * [ASCollectionView] Initial pass at reducing double-sided animations * [ASCollectionView] Always suppress animation during node size requery * [ASCollectionView] Rejigger the invalidation logic to support animated size changes * [ASCollectionView] Remove unused header * [ASCollectionView] Change comment * [ASDataController] Remove unused variable * [ASCollectionView] When relayout animated due to cell size change, wait until next layout pass * [ASCollectionView] Invalidate layout synchronously * [ASCollectionView] Only read the layout object once * [ASCollectionView] When size changes, wait for requery before layout * [ASCollectionView] Sort of go back to using an empty update to handle node resizing * [ASCollectionView] Remove unused constant * [ASCollectionView] Address PR comments * [ASCollectionView] Prevent nested [super performBatchUpdates:] calls --- AsyncDisplayKit/ASCollectionView.mm | 159 ++++++++++---------- AsyncDisplayKit/Details/ASDataController.mm | 2 - 2 files changed, 78 insertions(+), 83 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index c3ebbbe0c6..fda250d18d 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -25,6 +25,16 @@ #import "ASRangeControllerUpdateRangeProtocol+Beta.h" #import "_ASDisplayLayer.h" +/// What, if any, invalidation should we perform during the next -layoutSubviews. +typedef NS_ENUM(NSUInteger, ASCollectionViewInvalidationStyle) { + /// Perform no invalidation. + ASCollectionViewInvalidationStyleNone, + /// Perform invalidation with animation (use an empty batch update). + ASCollectionViewInvalidationStyleWithoutAnimation, + /// Perform invalidation without animation (use -invalidateLayout). + ASCollectionViewInvalidationStyleWithAnimation, +}; + static const NSUInteger kASCollectionViewAnimationNone = UITableViewRowAnimationNone; static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; @@ -66,36 +76,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; @end -#pragma mark - -#pragma mark _ASCollectionViewNodeSizeUpdateContext - -/** - * This class contains all the nodes that have a new size and UICollectionView should requery them all at once. - * It is intended to be used strictly on main thread and is not thread safe. - */ -@interface _ASCollectionViewNodeSizeInvalidationContext : NSObject -/** - * It's possible that a node triggered multiple size changes before main thread has a chance to execute `requeryNodeSizes`. - * Therefore, a set is preferred here, to avoid asking ASDataController to search for index path of the same node multiple times. - */ -@property (nonatomic, strong) NSMutableSet *invalidatedNodes; -@property (nonatomic, assign) BOOL shouldAnimate; -@end - -@implementation _ASCollectionViewNodeSizeInvalidationContext - -- (instancetype)init -{ - self = [super init]; - if (self) { - _invalidatedNodes = [NSMutableSet set]; - _shouldAnimate = YES; - } - return self; -} - -@end - #pragma mark - #pragma mark ASCollectionView. @@ -111,9 +91,9 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; id _layoutFacilitator; BOOL _performingBatchUpdates; + BOOL _superPerformingBatchUpdates; NSMutableArray *_batchUpdateBlocks; - - _ASCollectionViewNodeSizeInvalidationContext *_queuedNodeSizeInvalidationContext; // Main thread only + BOOL _isDeallocating; ASBatchContext *_batchContext; @@ -125,6 +105,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; CGPoint _deceleratingVelocity; + ASCollectionViewInvalidationStyle _nextLayoutInvalidationStyle; + /** * If YES, the `UICollectionView` will reload its data on next layout pass so we should not forward any updates to it. @@ -466,6 +448,24 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; return visibleNodes; } +#pragma mark Internal + +/** + Performing nested batch updates with super (e.g. resizing a cell node & updating collection view during same frame) + can cause super to throw data integrity exceptions because it checks the data source counts before + the update is complete. + + Always call [self _superPerform:] rather than [super performBatch:] so that we can keep our `superPerformingBatchUpdates` flag updated. +*/ +- (void)_superPerformBatchUpdates:(void(^)())updates completion:(void(^)(BOOL finished))completion +{ + ASDisplayNodeAssertMainThread(); + ASDisplayNodeAssert(_superPerformingBatchUpdates == NO, @"Nested batch updates being sent to UICollectionView. This is not expected."); + + _superPerformingBatchUpdates = YES; + [super performBatchUpdates:updates completion:completion]; + _superPerformingBatchUpdates = NO; +} #pragma mark Assertions. @@ -793,9 +793,27 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; [self performBatchAnimated:YES updates:^{ [_dataController relayoutAllNodes]; } completion:nil]; + // We need to ensure the size requery is done before we update our layout. + [self waitUntilAllUpdatesAreCommitted]; } } + // Flush any pending invalidation action if needed. + ASCollectionViewInvalidationStyle invalidationStyle = _nextLayoutInvalidationStyle; + _nextLayoutInvalidationStyle = ASCollectionViewInvalidationStyleNone; + switch (invalidationStyle) { + case ASCollectionViewInvalidationStyleWithAnimation: + if (!_superPerformingBatchUpdates) { + [self _superPerformBatchUpdates:^{ } completion:nil]; + } + break; + case ASCollectionViewInvalidationStyleWithoutAnimation: + [self.collectionViewLayout invalidateLayout]; + break; + default: + break; + } + // To ensure _maxSizeForNodesConstrainedSize is up-to-date for every usage, this call to super must be done last [super layoutSubviews]; } @@ -1023,18 +1041,18 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)rangeController:(ASRangeController *)rangeController didEndUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion { ASDisplayNodeAssertMainThread(); - - if (!self.asyncDataSource || _superIsPendingDataLoad) { + NSUInteger numberOfUpdateBlocks = _batchUpdateBlocks.count; + if (numberOfUpdateBlocks == 0 || !self.asyncDataSource || _superIsPendingDataLoad) { if (completion) { completion(NO); } + _performingBatchUpdates = NO; return; // if the asyncDataSource has become invalid while we are processing, ignore this request to avoid crashes } - NSUInteger numberOfUpdateBlocks = _batchUpdateBlocks.count; ASPerformBlockWithoutAnimation(!animated, ^{ [_layoutFacilitator collectionViewWillPerformBatchUpdates]; - [super performBatchUpdates:^{ + [self _superPerformBatchUpdates:^{ for (dispatch_block_t block in _batchUpdateBlocks) { block(); } @@ -1143,57 +1161,36 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; return; } - BOOL queued = (_queuedNodeSizeInvalidationContext != nil); - if (!queued) { - _queuedNodeSizeInvalidationContext = [[_ASCollectionViewNodeSizeInvalidationContext alloc] init]; - - __weak __typeof__(self) weakSelf = self; - dispatch_async(dispatch_get_main_queue(), ^{ - __typeof__(self) strongSelf = weakSelf; - if (strongSelf) { - [strongSelf requeryNodeSizes]; - } - }); + NSIndexPath *indexPath = [self indexPathForNode:node]; + if (indexPath == nil) { + return; } - - [_queuedNodeSizeInvalidationContext.invalidatedNodes addObject:node]; - // Check if this node or one of its subnodes can be animated. - // If the context is already non-animated, don't bother checking this node. - if (_queuedNodeSizeInvalidationContext.shouldAnimate) { - BOOL (^shouldNotAnimateBlock)(ASDisplayNode *) = ^BOOL(ASDisplayNode * _Nonnull node) { - return node.shouldAnimateSizeChanges == NO; - }; + [_layoutFacilitator collectionViewWillEditCellsAtIndexPaths:@[ indexPath ] batched:NO]; + + ASCollectionViewInvalidationStyle invalidationStyle = _nextLayoutInvalidationStyle; + if (invalidationStyle == ASCollectionViewInvalidationStyleNone) { + [self setNeedsLayout]; + invalidationStyle = ASCollectionViewInvalidationStyleWithAnimation; + } + + // If we think we're going to animate, check if this node will prevent it. + if (invalidationStyle == ASCollectionViewInvalidationStyleWithAnimation) { + // TODO: Incorporate `shouldAnimateSizeChanges` into ASEnvironmentState for performance benefit. + static dispatch_once_t onceToken; + static BOOL (^shouldNotAnimateBlock)(ASDisplayNode *); + dispatch_once(&onceToken, ^{ + shouldNotAnimateBlock = ^(ASDisplayNode * _Nonnull node) { + return node.shouldAnimateSizeChanges == NO; + }; + }); if (ASDisplayNodeFindFirstNode(node, shouldNotAnimateBlock) != nil) { - // One single non-animated cell node causes the whole context to be non-animated - _queuedNodeSizeInvalidationContext.shouldAnimate = NO; - } - } -} - -// Cause UICollectionView to requery for the new size of all nodes -- (void)requeryNodeSizes -{ - ASDisplayNodeAssertMainThread(); - NSSet *nodes = _queuedNodeSizeInvalidationContext.invalidatedNodes; - NSMutableArray *indexPaths = [NSMutableArray arrayWithCapacity:nodes.count]; - for (ASCellNode *node in nodes) { - NSIndexPath *indexPath = [self indexPathForNode:node]; - if (indexPath != nil) { - [indexPaths addObject:indexPath]; + // One single non-animated node causes the whole layout update to be non-animated + invalidationStyle = ASCollectionViewInvalidationStyleWithoutAnimation; } } - if (indexPaths.count > 0) { - [_layoutFacilitator collectionViewWillEditCellsAtIndexPaths:indexPaths batched:NO]; - - ASPerformBlockWithoutAnimation(!_queuedNodeSizeInvalidationContext.shouldAnimate, ^{ - // Perform an empty update transaction here to trigger UICollectionView to requery row sizes and layout its subviews again - [super performBatchUpdates:^{} completion:nil]; - }); - } - - _queuedNodeSizeInvalidationContext = nil; + _nextLayoutInvalidationStyle = invalidationStyle; } #pragma mark - Memory Management diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index f9a890e609..46af3d39d8 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -32,8 +32,6 @@ const static NSUInteger kASDataControllerSizingCountPerProcessor = 5; NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; -static void *kASSizingQueueContext = &kASSizingQueueContext; - @interface ASDataController () { NSMutableArray *_externalCompletedNodes; // Main thread only. External data access can immediately query this if available. NSMutableDictionary *_completedNodes; // Main thread only. External data access can immediately query this if _externalCompletedNodes is unavailable. From 6a15ab613016f9128cb4b7fa54d799b06ccb06c7 Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Thu, 7 Jul 2016 15:12:19 +1000 Subject: [PATCH 074/247] * Tidy the header imports, forward declaring classes and protocols where appropriate to avoid import cycles and using the framework/system header notation for imports occuring in .h files. * Perhaps controversially, decomposing ASRangeControllerUpdateRangeProtocol+Beta.h such that the categories on various classes are defined in the classes themselves since that's where the implementation of those categories is provided. * Updating unit tests and import other headers the tests took for granted. The tests could probably import the umbrella header and not have to worry about this. * Updating the "Life without Cocoapods" sample to build and run dependent on ASDK as a static library. * Added a "Life With Frameworks" sample app to build and run dependent on ASDK as a framework, proving the framework targets work. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 4 +- .../xcschemes/AsyncDisplayKit-iOS.xcscheme | 2 +- .../xcschemes/AsyncDisplayKit.xcscheme | 2 +- AsyncDisplayKit/ASCollectionNode.h | 11 ++ AsyncDisplayKit/ASCollectionNode.mm | 3 +- AsyncDisplayKit/ASCollectionView.h | 3 +- AsyncDisplayKit/ASCollectionView.mm | 6 +- AsyncDisplayKit/ASMapNode.mm | 14 +- AsyncDisplayKit/ASPagerNode.h | 1 + AsyncDisplayKit/ASPagerNode.m | 2 + AsyncDisplayKit/ASTableNode.h | 12 +- AsyncDisplayKit/ASTableNode.mm | 2 + AsyncDisplayKit/ASTableView.mm | 1 + AsyncDisplayKit/ASTableViewInternal.h | 4 +- AsyncDisplayKit/ASVideoNode.mm | 6 + AsyncDisplayKit/ASViewController.h | 7 + AsyncDisplayKit/AsyncDisplayKit.h | 3 + .../Details/ASCollectionInternal.h | 10 +- AsyncDisplayKit/Details/ASEnvironment.h | 6 +- AsyncDisplayKit/Details/ASEnvironment.mm | 3 +- AsyncDisplayKit/Details/ASRangeController.h | 23 ++- AsyncDisplayKit/Details/ASRangeController.mm | 1 + ...SRangeControllerUpdateRangeProtocol+Beta.h | 37 +--- AsyncDisplayKit/Private/ASDefaultPlayButton.h | 2 +- AsyncDisplayKit/Private/ASDefaultPlayButton.m | 1 + .../Private/ASDisplayNode+FrameworkPrivate.h | 1 - .../Private/ASEnvironmentInternal.h | 2 +- AsyncDisplayKit/Private/ASInternalHelpers.h | 2 +- ...ASCollectionViewFlowLayoutInspectorTests.m | 1 + AsyncDisplayKitTests/ASCollectionViewTests.m | 1 + AsyncDisplayKitTests/ASTableViewTests.m | 1 + AsyncDisplayKitTests/ASTableViewThrashTests.m | 2 +- .../AppIcon.appiconset/Contents.json | 73 ++++++++ .../Base.lproj/LaunchScreen.storyboard | 27 +++ .../Life With Frameworks/Info.plist | 45 +++++ .../Life With Frameworks/main.m | 16 ++ .../project.pbxproj | 176 +++++++++++++++++- .../xcschemes/Life Without CocoaPods.xcscheme | 13 +- .../Life Without CocoaPods/Info.plist | 2 +- .../Life Without CocoaPods/ViewController.m | 16 +- 40 files changed, 450 insertions(+), 94 deletions(-) create mode 100644 smoke-tests/Life Without CocoaPods/Life With Frameworks/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 smoke-tests/Life Without CocoaPods/Life With Frameworks/Base.lproj/LaunchScreen.storyboard create mode 100644 smoke-tests/Life Without CocoaPods/Life With Frameworks/Info.plist create mode 100644 smoke-tests/Life Without CocoaPods/Life With Frameworks/main.m diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index df81db181d..f112662fd1 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -580,7 +580,6 @@ F7CE6C901D2CDB5800BE4C15 /* _ASTransitionContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; F7CE6C911D2CDB5800BE4C15 /* _ASTransitionContext.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB55C2601C6408D6004EDCF5 /* _ASTransitionContext.m */; }; F7CE6C921D2CDB5800BE4C15 /* ASBatchFetching.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 044285061BAA63FE00D16268 /* ASBatchFetching.m */; }; - F7CE6C931D2CDB5800BE4C15 /* ASDisplayNode+FrameworkPrivate.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */; }; F7CE6C941D2CDB5800BE4C15 /* ASDisplayNodeInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */; }; F7CE6C951D2CDB5800BE4C15 /* ASLayoutTransition.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */; }; F7CE6C961D2CDB5800BE4C15 /* ASEnvironmentInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */; }; @@ -632,6 +631,7 @@ dstPath = "include/$(PRODUCT_NAME)"; dstSubfolderSpec = 16; files = ( + F7CE6C981D2CDB5800BE4C15 /* ASInternalHelpers.h in CopyFiles */, F7CE6CB71D2CE2D000BE4C15 /* ASLayoutableExtensibility.h in CopyFiles */, F7CE6C131D2CDB3E00BE4C15 /* ASPagerFlowLayout.h in CopyFiles */, F7CE6C141D2CDB3E00BE4C15 /* ASMapNode.h in CopyFiles */, @@ -761,12 +761,10 @@ F7CE6C901D2CDB5800BE4C15 /* _ASTransitionContext.h in CopyFiles */, F7CE6C911D2CDB5800BE4C15 /* _ASTransitionContext.m in CopyFiles */, F7CE6C921D2CDB5800BE4C15 /* ASBatchFetching.m in CopyFiles */, - F7CE6C931D2CDB5800BE4C15 /* ASDisplayNode+FrameworkPrivate.h in CopyFiles */, F7CE6C941D2CDB5800BE4C15 /* ASDisplayNodeInternal.h in CopyFiles */, F7CE6C951D2CDB5800BE4C15 /* ASLayoutTransition.h in CopyFiles */, F7CE6C961D2CDB5800BE4C15 /* ASEnvironmentInternal.h in CopyFiles */, F7CE6C971D2CDB5800BE4C15 /* ASImageNode+CGExtras.h in CopyFiles */, - F7CE6C981D2CDB5800BE4C15 /* ASInternalHelpers.h in CopyFiles */, F7CE6C991D2CDB5800BE4C15 /* ASLayoutSpecUtilities.h in CopyFiles */, F7CE6C9A1D2CDB5800BE4C15 /* ASMultidimensionalArrayUtils.h in CopyFiles */, F7CE6C9B1D2CDB5800BE4C15 /* ASPendingStateController.h in CopyFiles */, diff --git a/AsyncDisplayKit.xcodeproj/xcshareddata/xcschemes/AsyncDisplayKit-iOS.xcscheme b/AsyncDisplayKit.xcodeproj/xcshareddata/xcschemes/AsyncDisplayKit-iOS.xcscheme index ae3c3d3a9d..193b302afe 100644 --- a/AsyncDisplayKit.xcodeproj/xcshareddata/xcschemes/AsyncDisplayKit-iOS.xcscheme +++ b/AsyncDisplayKit.xcodeproj/xcshareddata/xcschemes/AsyncDisplayKit-iOS.xcscheme @@ -1,6 +1,6 @@ +#import +#import +#import #import @protocol ASCollectionViewLayoutFacilitatorProtocol; +@protocol ASCollectionDelegate; +@protocol ASCollectionDataSource; +@class ASCollectionView; NS_ASSUME_NONNULL_BEGIN @@ -104,4 +111,8 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface ASCollectionNode (ASRangeControllerUpdateRangeProtocol) + +@end + NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/ASCollectionNode.mm b/AsyncDisplayKit/ASCollectionNode.mm index 2784c9a9d1..9f41145ed6 100644 --- a/AsyncDisplayKit/ASCollectionNode.mm +++ b/AsyncDisplayKit/ASCollectionNode.mm @@ -10,13 +10,14 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASCollectionNode.h" #import "ASCollectionInternal.h" #import "ASCollectionViewLayoutFacilitatorProtocol.h" +#import "ASCollectionNode.h" #import "ASDisplayNode+Subclasses.h" #import "ASEnvironmentInternal.h" #import "ASInternalHelpers.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" +#import "ASCellNode+Internal.h" #include @interface _ASCollectionPendingState : NSObject diff --git a/AsyncDisplayKit/ASCollectionView.h b/AsyncDisplayKit/ASCollectionView.h index 9b7fe864b5..062fe5c445 100644 --- a/AsyncDisplayKit/ASCollectionView.h +++ b/AsyncDisplayKit/ASCollectionView.h @@ -14,13 +14,12 @@ #import #import #import -#import -#import @class ASCellNode; @class ASCollectionNode; @protocol ASCollectionDataSource; @protocol ASCollectionDelegate; +@protocol ASCollectionViewLayoutInspecting; NS_ASSUME_NONNULL_BEGIN diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index c3ebbbe0c6..5b180ed2af 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -13,7 +13,6 @@ #import "ASBatchFetching.h" #import "ASDelegateProxy.h" #import "ASCellNode+Internal.h" -#import "ASCollectionNode.h" #import "ASCollectionDataController.h" #import "ASCollectionViewLayoutController.h" #import "ASCollectionViewFlowLayoutInspector.h" @@ -22,8 +21,13 @@ #import "ASDisplayNode+Beta.h" #import "ASInternalHelpers.h" #import "UICollectionViewLayout+ASConvenience.h" +#import "ASRangeController.h" +#import "ASCollectionNode.h" +#import "ASCollectionView.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" #import "_ASDisplayLayer.h" +#import "ASCollectionViewLayoutFacilitatorProtocol.h" + static const NSUInteger kASCollectionViewAnimationNone = UITableViewRowAnimationNone; static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index c8c2599b38..a0d1ec147a 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -10,13 +10,13 @@ #if TARGET_OS_IOS #import "ASMapNode.h" -#import -#import -#import -#import -#import -#import -#import +#import "ASDisplayNode+Subclasses.h" +#import "ASDisplayNodeExtras.h" +#import "ASInsetLayoutSpec.h" +#import "ASCenterLayoutSpec.h" +#import "ASThread.h" +#import "ASInternalHelpers.h" +#import "ASLayout.h" @interface ASMapNode() { diff --git a/AsyncDisplayKit/ASPagerNode.h b/AsyncDisplayKit/ASPagerNode.h index cbef217812..21b5d698e2 100644 --- a/AsyncDisplayKit/ASPagerNode.h +++ b/AsyncDisplayKit/ASPagerNode.h @@ -11,6 +11,7 @@ // #import +#import @class ASPagerNode; @class ASPagerFlowLayout; diff --git a/AsyncDisplayKit/ASPagerNode.m b/AsyncDisplayKit/ASPagerNode.m index c266ef18f3..b30cce61bb 100644 --- a/AsyncDisplayKit/ASPagerNode.m +++ b/AsyncDisplayKit/ASPagerNode.m @@ -14,6 +14,8 @@ #import "ASDelegateProxy.h" #import "ASDisplayNode+Subclasses.h" #import "ASPagerFlowLayout.h" +#import "ASCollectionView.h" +#import "ASCollectionViewProtocols.h" #import "UICollectionViewLayout+ASConvenience.h" @interface ASPagerNode () diff --git a/AsyncDisplayKit/ASTableNode.h b/AsyncDisplayKit/ASTableNode.h index 795e2ef95a..ece3386c2f 100644 --- a/AsyncDisplayKit/ASTableNode.h +++ b/AsyncDisplayKit/ASTableNode.h @@ -10,7 +10,13 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import +#import +#import +#import + +@protocol ASTableDataSource; +@protocol ASTableDelegate; +@class ASTableView; /** * ASTableNode is a node based class that wraps an ASTableView. It can be used @@ -28,3 +34,7 @@ @property (weak, nonatomic) id dataSource; @end + +@interface ASTableNode (ASRangeControllerUpdateRangeProtocol) + +@end diff --git a/AsyncDisplayKit/ASTableNode.mm b/AsyncDisplayKit/ASTableNode.mm index e5b09fea11..d64b7bb40a 100644 --- a/AsyncDisplayKit/ASTableNode.mm +++ b/AsyncDisplayKit/ASTableNode.mm @@ -16,6 +16,8 @@ #import "ASInternalHelpers.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" #import "ASTableViewInternal.h" +#import "ASCellNode+Internal.h" +#import "ASTableNode.h" @interface _ASTablePendingState : NSObject @property (weak, nonatomic) id delegate; diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 1244c2b893..b0154c3baa 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -25,6 +25,7 @@ #import "ASRangeController.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" #import "_ASDisplayLayer.h" +#import "ASTableNode.h" #import diff --git a/AsyncDisplayKit/ASTableViewInternal.h b/AsyncDisplayKit/ASTableViewInternal.h index 22ac11ff7e..6c24652ae8 100644 --- a/AsyncDisplayKit/ASTableViewInternal.h +++ b/AsyncDisplayKit/ASTableViewInternal.h @@ -10,9 +10,11 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASTableNode.h" +#import @class ASDataController; +@class ASTableNode; +@class ASRangeController; @interface ASTableView (Internal) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 1248f8f9e2..64a25a4c60 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -8,8 +8,14 @@ // of patent rights can be found in the PATENTS file in the same directory. // #if TARGET_OS_IOS +#import +#import "ASDisplayNode+Subclasses.h" #import "ASVideoNode.h" #import "ASDefaultPlayButton.h" +#import "ASEqualityHelpers.h" +#import "ASInternalHelpers.h" +#import "ASDisplayNodeExtras.h" +#import "ASThread.h" static BOOL ASAssetIsEqual(AVAsset *asset1, AVAsset *asset2) { return ASObjectIsEqual(asset1, asset2) diff --git a/AsyncDisplayKit/ASViewController.h b/AsyncDisplayKit/ASViewController.h index 6222af8140..bb7e5381a2 100644 --- a/AsyncDisplayKit/ASViewController.h +++ b/AsyncDisplayKit/ASViewController.h @@ -74,4 +74,11 @@ typedef ASTraitCollection * _Nonnull (^ASDisplayTraitsForTraitWindowSizeBlock)(C @end +@interface ASViewController (ASRangeControllerUpdateRangeProtocol) + +/// Automatically adjust range mode based on view events if the containing node confirms to the ASRangeControllerUpdateRangeProtocol +@property (nonatomic, assign) BOOL automaticallyAdjustRangeModeBasedOnViewEvents; + +@end + NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/AsyncDisplayKit/AsyncDisplayKit.h b/AsyncDisplayKit/AsyncDisplayKit.h index 88547b0694..bdb769ec43 100644 --- a/AsyncDisplayKit/AsyncDisplayKit.h +++ b/AsyncDisplayKit/AsyncDisplayKit.h @@ -20,6 +20,7 @@ #import #import +#import #import #import #import @@ -28,6 +29,8 @@ #import #import #import +#import +#import #import #import diff --git a/AsyncDisplayKit/Details/ASCollectionInternal.h b/AsyncDisplayKit/Details/ASCollectionInternal.h index d110b85634..703409b075 100644 --- a/AsyncDisplayKit/Details/ASCollectionInternal.h +++ b/AsyncDisplayKit/Details/ASCollectionInternal.h @@ -10,10 +10,12 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASCollectionView.h" -#import "ASCollectionNode.h" -#import "ASDataController.h" -#import "ASRangeController.h" +#import + +@protocol ASCollectionViewLayoutFacilitatorProtocol; +@class ASCollectionNode; +@class ASDataController; +@class ASRangeController; @interface ASCollectionView () - (instancetype)_initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout layoutFacilitator:(id)layoutFacilitator ownedByNode:(BOOL)ownedByNode; diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index dd95c2e107..87c5464040 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -10,9 +10,9 @@ #import -#import "ASDimension.h" -#import "ASStackLayoutDefines.h" -#import "ASRelativeSize.h" +#import +#import +#import @protocol ASEnvironment; @class UITraitCollection; diff --git a/AsyncDisplayKit/Details/ASEnvironment.mm b/AsyncDisplayKit/Details/ASEnvironment.mm index 77ffca7a0f..54a2049e19 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.mm +++ b/AsyncDisplayKit/Details/ASEnvironment.mm @@ -8,9 +8,8 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASEnvironment.h" #import "ASEnvironmentInternal.h" -#import +#import "ASAvailability.h" ASEnvironmentLayoutOptionsState _ASEnvironmentLayoutOptionsStateMakeDefault() { diff --git a/AsyncDisplayKit/Details/ASRangeController.h b/AsyncDisplayKit/Details/ASRangeController.h index c79124a961..6341e1dd17 100644 --- a/AsyncDisplayKit/Details/ASRangeController.h +++ b/AsyncDisplayKit/Details/ASRangeController.h @@ -9,11 +9,11 @@ // #import - -#import +#import #import #import #import +#import #define ASRangeControllerLoggingEnabled 0 @@ -203,4 +203,23 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface ASRangeController (ASRangeControllerUpdateRangeProtocol) + +/** + * Update the range mode for a range controller to a explicitly set mode until the node that contains the range + * controller becomes visible again + * + * Logic for the automatic range mode: + * 1. If there are no visible node paths available nothing is to be done and no range update will happen + * 2. The initial range update if the range controller is visible always will be ASLayoutRangeModeCount + * (ASLayoutRangeModeMinimum) as it's the initial fetch + * 3. The range mode set explicitly via updateCurrentRangeWithMode: will last at least one range update. After that it + the range controller will use the explicit set range mode until it becomes visible and a new range update was + triggered or a new range mode via updateCurrentRangeWithMode: is set + * 4. If range mode is not explicitly set the range mode is variying based if the range controller is visible or not + */ +- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode; + +@end + NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 6c84935540..270ae176f0 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -17,6 +17,7 @@ #import "ASMultiDimensionalArrayUtils.h" #import "ASInternalHelpers.h" #import "ASDisplayNode+FrameworkPrivate.h" +#import "ASCellNode.h" @interface ASRangeController () { diff --git a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h index 09b10cd478..831246f33f 100644 --- a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h +++ b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h @@ -8,12 +8,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASLayoutRangeType.h" -#import "ASViewController.h" -#import "ASRangeController.h" -#import "ASCollectionNode.h" -#import "ASTableNode.h" - +#import @protocol ASRangeControllerUpdateRangeProtocol @@ -34,39 +29,9 @@ @end -@interface ASRangeController (ASRangeControllerUpdateRangeProtocol) - -/** - * Update the range mode for a range controller to a explicitly set mode until the node that contains the range - * controller becomes visible again - * - * Logic for the automatic range mode: - * 1. If there are no visible node paths available nothing is to be done and no range update will happen - * 2. The initial range update if the range controller is visible always will be ASLayoutRangeModeCount - * (ASLayoutRangeModeMinimum) as it's the initial fetch - * 3. The range mode set explicitly via updateCurrentRangeWithMode: will last at least one range update. After that it - the range controller will use the explicit set range mode until it becomes visible and a new range update was - triggered or a new range mode via updateCurrentRangeWithMode: is set - * 4. If range mode is not explicitly set the range mode is variying based if the range controller is visible or not - */ -- (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode; - -@end -@interface ASCollectionNode (ASRangeControllerUpdateRangeProtocol) - -@end -@interface ASTableNode (ASRangeControllerUpdateRangeProtocol) - -@end -@interface ASViewController (ASRangeControllerUpdateRangeProtocol) - -/// Automatically adjust range mode based on view events if the containing node confirms to the ASRangeControllerUpdateRangeProtocol -@property (nonatomic, assign) BOOL automaticallyAdjustRangeModeBasedOnViewEvents; - -@end diff --git a/AsyncDisplayKit/Private/ASDefaultPlayButton.h b/AsyncDisplayKit/Private/ASDefaultPlayButton.h index 08939784f7..cab4ae4231 100644 --- a/AsyncDisplayKit/Private/ASDefaultPlayButton.h +++ b/AsyncDisplayKit/Private/ASDefaultPlayButton.h @@ -10,7 +10,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import +#import @interface ASDefaultPlayButton : ASButtonNode diff --git a/AsyncDisplayKit/Private/ASDefaultPlayButton.m b/AsyncDisplayKit/Private/ASDefaultPlayButton.m index b64650235b..37012d609e 100644 --- a/AsyncDisplayKit/Private/ASDefaultPlayButton.m +++ b/AsyncDisplayKit/Private/ASDefaultPlayButton.m @@ -11,6 +11,7 @@ // #import "ASDefaultPlayButton.h" +#import "_ASDisplayLayer.h" @implementation ASDefaultPlayButton diff --git a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h index 78ce6ce05e..b0f8f4bec8 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h +++ b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h @@ -17,7 +17,6 @@ #import "ASDisplayNode.h" #import "ASSentinel.h" #import "ASThread.h" -#import "_ASDisplayLayer.h" NS_ASSUME_NONNULL_BEGIN diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.h b/AsyncDisplayKit/Private/ASEnvironmentInternal.h index 26f0747b81..0f1bcf1919 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.h +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.h @@ -8,7 +8,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASEnvironment.h" +#import #pragma once diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.h b/AsyncDisplayKit/Private/ASInternalHelpers.h index f80f3c82e0..dac6ef6530 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.h +++ b/AsyncDisplayKit/Private/ASInternalHelpers.h @@ -11,7 +11,7 @@ #import #import -#import "ASBaseDefines.h" +#import ASDISPLAYNODE_EXTERN_C_BEGIN diff --git a/AsyncDisplayKitTests/ASCollectionViewFlowLayoutInspectorTests.m b/AsyncDisplayKitTests/ASCollectionViewFlowLayoutInspectorTests.m index 1e33f77cd6..ba02de42e7 100644 --- a/AsyncDisplayKitTests/ASCollectionViewFlowLayoutInspectorTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewFlowLayoutInspectorTests.m @@ -13,6 +13,7 @@ #import "ASCollectionView.h" #import "ASCollectionViewFlowLayoutInspector.h" +#import "ASCellNode.h" /** * Test Data Source diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 2ed3584149..dc093c9ec7 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -12,6 +12,7 @@ #import "ASCollectionView.h" #import "ASCollectionDataController.h" #import "ASCollectionViewFlowLayoutInspector.h" +#import "ASCellNode.h" @interface ASCollectionViewTestDelegate : NSObject diff --git a/AsyncDisplayKitTests/ASTableViewTests.m b/AsyncDisplayKitTests/ASTableViewTests.m index 98914d1bd4..42b7a870d2 100644 --- a/AsyncDisplayKitTests/ASTableViewTests.m +++ b/AsyncDisplayKitTests/ASTableViewTests.m @@ -14,6 +14,7 @@ #import "ASTableViewInternal.h" #import "ASDisplayNode+Subclasses.h" #import "ASChangeSetDataController.h" +#import "ASCellNode.h" #define NumberOfSections 10 #define NumberOfRowsPerSection 20 diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index 62ddffdd90..5edb5874b0 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -31,7 +31,7 @@ static NSString *ASThrashArrayDescription(NSArray *array) { NSMutableString *str = [NSMutableString stringWithString:@"(\n"]; NSInteger i = 0; for (id obj in array) { - [str appendFormat:@"\t[%ld]: \"%@\",\n", i, obj]; + [str appendFormat:@"\t[%ld]: \"%@\",\n", (long)i, obj]; i += 1; } [str appendString:@")"]; diff --git a/smoke-tests/Life Without CocoaPods/Life With Frameworks/Assets.xcassets/AppIcon.appiconset/Contents.json b/smoke-tests/Life Without CocoaPods/Life With Frameworks/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..eeea76c2db --- /dev/null +++ b/smoke-tests/Life Without CocoaPods/Life With Frameworks/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,73 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/smoke-tests/Life Without CocoaPods/Life With Frameworks/Base.lproj/LaunchScreen.storyboard b/smoke-tests/Life Without CocoaPods/Life With Frameworks/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..ebf48f6039 --- /dev/null +++ b/smoke-tests/Life Without CocoaPods/Life With Frameworks/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/smoke-tests/Life Without CocoaPods/Life With Frameworks/Info.plist b/smoke-tests/Life Without CocoaPods/Life With Frameworks/Info.plist new file mode 100644 index 0000000000..eabb3ae346 --- /dev/null +++ b/smoke-tests/Life Without CocoaPods/Life With Frameworks/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/smoke-tests/Life Without CocoaPods/Life With Frameworks/main.m b/smoke-tests/Life Without CocoaPods/Life With Frameworks/main.m new file mode 100644 index 0000000000..3f9d50d481 --- /dev/null +++ b/smoke-tests/Life Without CocoaPods/Life With Frameworks/main.m @@ -0,0 +1,16 @@ +// +// main.m +// Life With Frameworks +// +// Created by Kiel Gillard on 7/07/2016. +// Copyright © 2016 Facebook. All rights reserved. +// + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj index 9a0904bba1..21f17c4b12 100644 --- a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj +++ b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/project.pbxproj @@ -16,10 +16,24 @@ 0589692A1ABCE17C0059CE2A /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 058969291ABCE17C0059CE2A /* AssetsLibrary.framework */; }; 0589692C1ABCE1820059CE2A /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0589692B1ABCE1820059CE2A /* Photos.framework */; }; 92DD2FEC1BF4D8BB0074C9DD /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 92DD2FEB1BF4D8BB0074C9DD /* MapKit.framework */; }; + F729B8BB1D2E176700C9EDBC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F729B8BA1D2E176700C9EDBC /* main.m */; }; + F729B8C61D2E176700C9EDBC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F729B8C51D2E176700C9EDBC /* Assets.xcassets */; }; + F729B8C91D2E176700C9EDBC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F729B8C71D2E176700C9EDBC /* LaunchScreen.storyboard */; }; + F729B8D11D2E17A300C9EDBC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 058968F71ABCE06E0059CE2A /* AppDelegate.m */; }; + F729B8D21D2E17A300C9EDBC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 058968FA1ABCE06E0059CE2A /* ViewController.m */; }; + F729B8D31D2E17C800C9EDBC /* AsyncDisplayKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7CE6CB31D2CDFFB00BE4C15 /* AsyncDisplayKit.framework */; }; + F729B8D41D2E17C800C9EDBC /* AsyncDisplayKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F7CE6CB31D2CDFFB00BE4C15 /* AsyncDisplayKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; F7CE6CB61D2CE00800BE4C15 /* libAsyncDisplayKit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F7CE6CAD1D2CDFFB00BE4C15 /* libAsyncDisplayKit.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ + F729B8D51D2E17C800C9EDBC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = B35061D91B010EDF0018CF92; + remoteInfo = "AsyncDisplayKit-iOS"; + }; F7CE6CAC1D2CDFFB00BE4C15 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */; @@ -57,6 +71,20 @@ }; /* End PBXContainerItemProxy section */ +/* Begin PBXCopyFilesBuildPhase section */ + F729B8D71D2E17C800C9EDBC /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + F729B8D41D2E17C800C9EDBC /* AsyncDisplayKit.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 058968EF1ABCE06E0059CE2A /* Life Without CocoaPods.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Life Without CocoaPods.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 058968F31ABCE06E0059CE2A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -71,6 +99,11 @@ 058969291ABCE17C0059CE2A /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; }; 0589692B1ABCE1820059CE2A /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; 92DD2FEB1BF4D8BB0074C9DD /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; + F729B8B71D2E176700C9EDBC /* Life With Frameworks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Life With Frameworks.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + F729B8BA1D2E176700C9EDBC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + F729B8C51D2E176700C9EDBC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + F729B8C81D2E176700C9EDBC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + F729B8CA1D2E176700C9EDBC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = AsyncDisplayKit.xcodeproj; path = ../../AsyncDisplayKit.xcodeproj; sourceTree = ""; }; /* End PBXFileReference section */ @@ -86,6 +119,14 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F729B8B41D2E176700C9EDBC /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + F729B8D31D2E17C800C9EDBC /* AsyncDisplayKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -97,6 +138,7 @@ 058969291ABCE17C0059CE2A /* AssetsLibrary.framework */, F7CE6CA51D2CDFFB00BE4C15 /* AsyncDisplayKit.xcodeproj */, 058968F11ABCE06E0059CE2A /* Life Without CocoaPods */, + F729B8B81D2E176700C9EDBC /* Life With Frameworks */, 058968F01ABCE06E0059CE2A /* Products */, ); indentWidth = 2; @@ -108,6 +150,7 @@ isa = PBXGroup; children = ( 058968EF1ABCE06E0059CE2A /* Life Without CocoaPods.app */, + F729B8B71D2E176700C9EDBC /* Life With Frameworks.app */, ); name = Products; sourceTree = ""; @@ -136,6 +179,25 @@ name = "Supporting Files"; sourceTree = ""; }; + F729B8B81D2E176700C9EDBC /* Life With Frameworks */ = { + isa = PBXGroup; + children = ( + F729B8C51D2E176700C9EDBC /* Assets.xcassets */, + F729B8C71D2E176700C9EDBC /* LaunchScreen.storyboard */, + F729B8CA1D2E176700C9EDBC /* Info.plist */, + F729B8B91D2E176700C9EDBC /* Supporting Files */, + ); + path = "Life With Frameworks"; + sourceTree = ""; + }; + F729B8B91D2E176700C9EDBC /* Supporting Files */ = { + isa = PBXGroup; + children = ( + F729B8BA1D2E176700C9EDBC /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; F7CE6CA61D2CDFFB00BE4C15 /* Products */ = { isa = PBXGroup; children = ( @@ -168,18 +230,40 @@ productReference = 058968EF1ABCE06E0059CE2A /* Life Without CocoaPods.app */; productType = "com.apple.product-type.application"; }; + F729B8B61D2E176700C9EDBC /* Life With Frameworks */ = { + isa = PBXNativeTarget; + buildConfigurationList = F729B8D01D2E176700C9EDBC /* Build configuration list for PBXNativeTarget "Life With Frameworks" */; + buildPhases = ( + F729B8B31D2E176700C9EDBC /* Sources */, + F729B8B41D2E176700C9EDBC /* Frameworks */, + F729B8B51D2E176700C9EDBC /* Resources */, + F729B8D71D2E17C800C9EDBC /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + F729B8D61D2E17C800C9EDBC /* PBXTargetDependency */, + ); + name = "Life With Frameworks"; + productName = "Life With Frameworks"; + productReference = F729B8B71D2E176700C9EDBC /* Life With Frameworks.app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 058968E71ABCE06E0059CE2A /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0620; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = Facebook; TargetAttributes = { 058968EE1ABCE06E0059CE2A = { CreatedOnToolsVersion = 6.2; }; + F729B8B61D2E176700C9EDBC = { + CreatedOnToolsVersion = 7.3.1; + }; }; }; buildConfigurationList = 058968EA1ABCE06E0059CE2A /* Build configuration list for PBXProject "Life Without CocoaPods" */; @@ -202,6 +286,7 @@ projectRoot = ""; targets = ( 058968EE1ABCE06E0059CE2A /* Life Without CocoaPods */, + F729B8B61D2E176700C9EDBC /* Life With Frameworks */, ); }; /* End PBXProject section */ @@ -248,6 +333,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F729B8B51D2E176700C9EDBC /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F729B8C91D2E176700C9EDBC /* LaunchScreen.storyboard in Resources */, + F729B8C61D2E176700C9EDBC /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -261,9 +355,24 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + F729B8B31D2E176700C9EDBC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + F729B8D21D2E17A300C9EDBC /* ViewController.m in Sources */, + F729B8D11D2E17A300C9EDBC /* AppDelegate.m in Sources */, + F729B8BB1D2E176700C9EDBC /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + F729B8D61D2E17C800C9EDBC /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "AsyncDisplayKit-iOS"; + targetProxy = F729B8D51D2E17C800C9EDBC /* PBXContainerItemProxy */; + }; F7CE6CB51D2CE00300BE4C15 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = AsyncDisplayKit; @@ -271,6 +380,17 @@ }; /* End PBXTargetDependency section */ +/* Begin PBXVariantGroup section */ + F729B8C71D2E176700C9EDBC /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + F729B8C81D2E176700C9EDBC /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + /* Begin XCBuildConfiguration section */ 058969101ABCE06E0059CE2A /* Debug */ = { isa = XCBuildConfiguration; @@ -292,6 +412,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_GENERATE_TEST_COVERAGE_FILES = YES; @@ -359,14 +480,12 @@ INFOPLIST_FILE = "Life Without CocoaPods/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "/Users/nadi/src/AsyncDisplayKit/build/Debug-iphoneos", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -378,18 +497,49 @@ INFOPLIST_FILE = "Life Without CocoaPods/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "/Users/nadi/src/AsyncDisplayKit/build/Debug-iphoneos", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; OTHER_LDFLAGS = ( "-ObjC", "-lc++", ); + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; }; + F729B8CB1D2E176700C9EDBC /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Life With Frameworks/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.Life-With-Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + F729B8CC1D2E176700C9EDBC /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ANALYZER_NONNULL = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "Life With Frameworks/Info.plist"; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.Life-With-Frameworks"; + PRODUCT_NAME = "$(TARGET_NAME)"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -411,6 +561,14 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + F729B8D01D2E176700C9EDBC /* Build configuration list for PBXNativeTarget "Life With Frameworks" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + F729B8CB1D2E176700C9EDBC /* Debug */, + F729B8CC1D2E176700C9EDBC /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; /* End XCConfigurationList section */ }; rootObject = 058968E71ABCE06E0059CE2A /* Project object */; diff --git a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/xcshareddata/xcschemes/Life Without CocoaPods.xcscheme b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/xcshareddata/xcschemes/Life Without CocoaPods.xcscheme index 71e83345d7..2abacce743 100644 --- a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/xcshareddata/xcschemes/Life Without CocoaPods.xcscheme +++ b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods.xcodeproj/xcshareddata/xcschemes/Life Without CocoaPods.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -38,15 +38,18 @@ ReferencedContainer = "container:Life Without CocoaPods.xcodeproj"> + + @@ -62,10 +65,10 @@ diff --git a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/Info.plist b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/Info.plist index 20d72f5238..fb4115c84c 100644 --- a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/Info.plist +++ b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.facebook.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/ViewController.m b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/ViewController.m index 6fe33cada7..9d7af84d65 100644 --- a/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/ViewController.m +++ b/smoke-tests/Life Without CocoaPods/Life Without CocoaPods/ViewController.m @@ -12,21 +12,19 @@ #import -@interface ViewController () { - ASTextNode *_textNode; -} - +@interface ViewController () +@property (nonatomic, strong) ASTextNode *textNode; @end @implementation ViewController - (void)viewDidLoad { - _textNode = [[ASTextNode alloc] init]; - _textNode.attributedString = [[NSAttributedString alloc] initWithString:@"Testing, testing."]; - [_textNode measure:self.view.bounds.size]; - _textNode.frame = (CGRect){ .origin = CGPointZero, .size = _textNode.calculatedSize }; - [self.view addSubnode:_textNode]; + self.textNode = [[ASTextNode alloc] init]; + self.textNode.attributedString = [[NSAttributedString alloc] initWithString:@"Testing, testing." attributes:@{ NSForegroundColorAttributeName: [UIColor redColor] }]; + [self.textNode measure:self.view.bounds.size]; + self.textNode.frame = (CGRect){ .origin = CGPointZero, .size = self.textNode.calculatedSize }; + [self.view addSubnode:self.textNode]; } @end From 762e9832df16235d54d43630d725549329527d52 Mon Sep 17 00:00:00 2001 From: Kiel Gillard Date: Thu, 7 Jul 2016 15:41:21 +1000 Subject: [PATCH 075/247] Make ASViewController sample build and run. --- examples/ASViewController/Sample/ViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/ASViewController/Sample/ViewController.m b/examples/ASViewController/Sample/ViewController.m index 0ac2f56136..aa98294aa2 100644 --- a/examples/ASViewController/Sample/ViewController.m +++ b/examples/ASViewController/Sample/ViewController.m @@ -16,7 +16,7 @@ // #import "ViewController.h" -#import "ASTableNode.h" +#import #import "DetailViewController.h" From 94ca3639366d0b00197ab683d0a3536369df7aa7 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 7 Jul 2016 07:00:07 -0700 Subject: [PATCH 076/247] Add return type to the shouldNotAnimateBlock --- AsyncDisplayKit/ASCollectionView.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index fda250d18d..4353d24b62 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -1180,8 +1180,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; static dispatch_once_t onceToken; static BOOL (^shouldNotAnimateBlock)(ASDisplayNode *); dispatch_once(&onceToken, ^{ - shouldNotAnimateBlock = ^(ASDisplayNode * _Nonnull node) { - return node.shouldAnimateSizeChanges == NO; + shouldNotAnimateBlock = ^BOOL(ASDisplayNode * _Nonnull node) { + return (node.shouldAnimateSizeChanges == NO); }; }); if (ASDisplayNodeFindFirstNode(node, shouldNotAnimateBlock) != nil) { From 637c4f3a9ff52eb59623592ce5b20e7c48ee0c25 Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 7 Jul 2016 09:23:37 -0700 Subject: [PATCH 077/247] [ASTraitCollection] Remove traitCollectionContext from ASTraitCollection; add containerWindowSize Passing around a pointer was leading to crashes as the ASVC was the sole owner of the context. There are cases where the VC would dealloc while its subnodes were laying out. This could lead to the subnodes accessing a garbage pointer. --- AsyncDisplayKit/ASViewController.h | 12 ------ AsyncDisplayKit/ASViewController.mm | 39 +++---------------- AsyncDisplayKit/Details/ASEnvironment.h | 25 ++---------- AsyncDisplayKit/Details/ASEnvironment.mm | 16 +------- AsyncDisplayKit/Details/ASTraitCollection.h | 16 +------- AsyncDisplayKit/Details/ASTraitCollection.m | 30 +++++++------- .../Private/ASEnvironmentInternal.mm | 2 +- 7 files changed, 28 insertions(+), 112 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.h b/AsyncDisplayKit/ASViewController.h index 6222af8140..8ef9bc8029 100644 --- a/AsyncDisplayKit/ASViewController.h +++ b/AsyncDisplayKit/ASViewController.h @@ -27,18 +27,6 @@ typedef ASTraitCollection * _Nonnull (^ASDisplayTraitsForTraitWindowSizeBlock)(C @property (nonatomic, strong, readonly) DisplayNodeType node; -/** - * An optional context to pass along with an ASTraitCollection. - * This can be used to pass any internal state to all subnodes via the ASTraitCollection that is not - * included in UITraitCollection. This could range from more fine-tuned size classes to a class of - * constants that is based upon the new trait collection. - * - * Be aware that internally this context is held by a C struct which cannot retain the pointer. Therefore - * ASVC keeps a strong reference to the context to make sure that it stays alive. If you change this value - * it will propagate the change to the subnodes. - */ -@property (nonatomic, strong) id _Nullable traitCollectionContext; - /** * Set this block to customize the ASDisplayTraits returned when the VC transitions to the given traitCollection. */ diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index 86417d08aa..deffec60f5 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -58,17 +58,6 @@ return self; } -- (void)dealloc -{ - if (_traitCollectionContext != nil) { - // The setter will iterate through the VC's subnodes and replace the traitCollectionContext in their ASEnvironmentTraitCollection with nil. - // Since the VC holds the only strong reference to this context and we are in the process of destroying - // the VC, all the references in the subnodes will be unsafe unless we nil them out. More than likely all the subnodes will be dealloc'ed - // as part of the VC being dealloc'ed, but this is just to make extra sure. - self.traitCollectionContext = nil; - } -} - - (void)loadView { ASDisplayNodeAssertTrue(!_node.layerBacked); @@ -199,27 +188,15 @@ ASVisibilityDepthImplementation; #pragma mark - ASEnvironmentTraitCollection -- (void)setTraitCollectionContext:(id)traitCollectionContext -{ - if (_traitCollectionContext != traitCollectionContext) { - // nil out the displayContext in the subnodes so they aren't hanging around with a dealloc'ed pointer don't set - // the new context yet as this will cause ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection to fail - ASEnvironmentTraitCollectionUpdateDisplayContext(self.node, nil); - - _traitCollectionContext = traitCollectionContext; - } -} - - (ASEnvironmentTraitCollection)environmentTraitCollectionForUITraitCollection:(UITraitCollection *)traitCollection { if (self.overrideDisplayTraitsWithTraitCollection) { ASTraitCollection *asyncTraitCollection = self.overrideDisplayTraitsWithTraitCollection(traitCollection); - self.traitCollectionContext = asyncTraitCollection.traitCollectionContext; return [asyncTraitCollection environmentTraitCollection]; } ASEnvironmentTraitCollection asyncTraitCollection = ASEnvironmentTraitCollectionFromUITraitCollection(traitCollection); - asyncTraitCollection.displayContext = self.traitCollectionContext; + asyncTraitCollection.containerWindowSize = self.view.frame.size; return asyncTraitCollection; } @@ -227,9 +204,9 @@ ASVisibilityDepthImplementation; { if (self.overrideDisplayTraitsWithWindowSize) { ASTraitCollection *traitCollection = self.overrideDisplayTraitsWithWindowSize(windowSize); - self.traitCollectionContext = traitCollection.traitCollectionContext; return [traitCollection environmentTraitCollection]; } + self.node.environmentTraitCollection.containerWindowSize = windowSize; return self.node.environmentTraitCollection; } @@ -255,17 +232,13 @@ ASVisibilityDepthImplementation; [super traitCollectionDidChange:previousTraitCollection]; ASEnvironmentTraitCollection environmentTraitCollection = [self environmentTraitCollectionForUITraitCollection:self.traitCollection]; + environmentTraitCollection.containerWindowSize = self.view.bounds.size; [self progagateNewEnvironmentTraitCollection:environmentTraitCollection]; } -- (void)willTransitionToTraitCollection:(UITraitCollection *)newCollection withTransitionCoordinator:(id)coordinator -{ - [super willTransitionToTraitCollection:newCollection withTransitionCoordinator:coordinator]; - - ASEnvironmentTraitCollection environmentTraitCollection = [self environmentTraitCollectionForUITraitCollection:newCollection]; - [self progagateNewEnvironmentTraitCollection:environmentTraitCollection]; -} - +// Note: We don't override willTransitionToTraitCollection:withTransitionCoordinator: because viewWillTransitionToSize:withTransitionCoordinator: will also called +// called in all these cases. However, there are cases where viewWillTransitionToSize:withTransitionCoordinator: but willTransitionToTraitCollection:withTransitionCoordinator: +// is not. - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index dd95c2e107..de9902a68a 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -69,25 +69,9 @@ typedef struct ASEnvironmentTraitCollection { UIUserInterfaceIdiom userInterfaceIdiom; UIUserInterfaceSizeClass verticalSizeClass; UIForceTouchCapability forceTouchCapability; - - // WARNING: - // This pointer is in a C struct and therefore not managed by ARC. It is - // an unsafe unretained pointer, so when you dereference it you better be - // sure that it is valid. - // - // Use displayContext when you wish to pass view context specific data along with the - // display traits to subnodes. This should be a piece of data owned by an - // ASViewController, which will ensure that the data is still valid when laying out - // its subviews. When the VC is dealloc'ed, the displayContext it created will also - // be dealloced but any subnodes that are hanging around (why would they be?) will now - // have a displayContext that points to a bad pointer. - // - // As an added precaution ASDisplayTraitsClearDisplayContext is called from ASVC's desctructor - // which will propagate a nil displayContext to its subnodes. - id __unsafe_unretained displayContext; -} ASEnvironmentTraitCollection; -extern void ASEnvironmentTraitCollectionUpdateDisplayContext(id rootEnvironment, id _Nullable context); + CGSize containerWindowSize; +} ASEnvironmentTraitCollection; extern ASEnvironmentTraitCollection ASEnvironmentTraitCollectionFromUITraitCollection(UITraitCollection *traitCollection); extern BOOL ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(ASEnvironmentTraitCollection lhs, ASEnvironmentTraitCollection rhs); @@ -165,14 +149,11 @@ ASDISPLAYNODE_EXTERN_C_END if (ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(currentTraits, oldTraits) == NO) {\ /* Must dispatch to main for self.view && [self.view.dataController completedNodes]*/ \ ASPerformBlockOnMainThread(^{\ - BOOL needsLayout = (oldTraits.displayContext == currentTraits.displayContext) || currentTraits.displayContext != nil;\ NSArray *> *completedNodes = [self.view.dataController completedNodes];\ for (NSArray *sectionArray in completedNodes) {\ for (ASCellNode *cellNode in sectionArray) {\ ASEnvironmentStatePropagateDown(cellNode, currentTraits);\ - if (needsLayout) {\ - [cellNode setNeedsLayout];\ - }\ + [cellNode setNeedsLayout];\ }\ }\ });\ diff --git a/AsyncDisplayKit/Details/ASEnvironment.mm b/AsyncDisplayKit/Details/ASEnvironment.mm index 77ffca7a0f..1f7526d7b9 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.mm +++ b/AsyncDisplayKit/Details/ASEnvironment.mm @@ -26,23 +26,11 @@ ASEnvironmentHierarchyState _ASEnvironmentHierarchyStateMakeDefault() }; } -extern void ASEnvironmentTraitCollectionUpdateDisplayContext(id rootEnvironment, id context) -{ - ASEnvironmentState envState = [rootEnvironment environmentState]; - ASEnvironmentTraitCollection environmentTraitCollection = envState.environmentTraitCollection; - environmentTraitCollection.displayContext = context; - envState.environmentTraitCollection = environmentTraitCollection; - [rootEnvironment setEnvironmentState:envState]; - - for (id child in [rootEnvironment children]) { - ASEnvironmentStatePropagateDown(child, environmentTraitCollection); - } -} - ASEnvironmentTraitCollection _ASEnvironmentTraitCollectionMakeDefault() { return (ASEnvironmentTraitCollection) { // Default values can be defined in here + .containerWindowSize = CGSizeZero, }; } @@ -69,7 +57,7 @@ BOOL ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(ASEnviron lhs.displayScale == rhs.displayScale && lhs.userInterfaceIdiom == rhs.userInterfaceIdiom && lhs.forceTouchCapability == rhs.forceTouchCapability && - lhs.displayContext == rhs.displayContext; + CGSizeEqualToSize(lhs.containerWindowSize, rhs.containerWindowSize); } ASEnvironmentState ASEnvironmentStateMakeDefault() diff --git a/AsyncDisplayKit/Details/ASTraitCollection.h b/AsyncDisplayKit/Details/ASTraitCollection.h index 9524886d0f..c737b5d874 100644 --- a/AsyncDisplayKit/Details/ASTraitCollection.h +++ b/AsyncDisplayKit/Details/ASTraitCollection.h @@ -18,21 +18,7 @@ @property (nonatomic, assign, readonly) UIUserInterfaceIdiom userInterfaceIdiom; @property (nonatomic, assign, readonly) UIUserInterfaceSizeClass verticalSizeClass; @property (nonatomic, assign, readonly) UIForceTouchCapability forceTouchCapability; - -/** - * An optional context to pass along with an ASTraitCollection. - * This can be used to pass any internal state to all subnodes via the ASTraitCollection that is not - * included in UITraitCollection. This could range from more fine-tuned size classes to a class of - * constants that is based upon the new trait collection. - * - * Be aware that internally this context is held by a C struct which cannot retain the pointer. - * ASTraitCollection is generally a very short-lived class, existing only to provide a non-struct API - * to trait collections. When an ASTraitCollection is returned via one of ASViewController's 2 - * custom trait collection creation blocks, traitCollectionContext is assigned to the VC's traitCollectionContext. - * This makes sure that the VC is the owner of the context and ASEnvironmentTraitCollections will not - * have a reference to a dangling pointer. - */ -@property (nonatomic, strong, readonly) id traitCollectionContext; +@property (nonatomic, assign, readonly) CGSize containerWindowSize; + (ASTraitCollection *)traitCollectionWithASEnvironmentTraitCollection:(ASEnvironmentTraitCollection)traits; diff --git a/AsyncDisplayKit/Details/ASTraitCollection.m b/AsyncDisplayKit/Details/ASTraitCollection.m index 49fb94c780..f823fde8d6 100644 --- a/AsyncDisplayKit/Details/ASTraitCollection.m +++ b/AsyncDisplayKit/Details/ASTraitCollection.m @@ -21,7 +21,7 @@ horizontalSizeClass:(UIUserInterfaceSizeClass)horizontalSizeClass verticalSizeClass:(UIUserInterfaceSizeClass)verticalSizeClass forceTouchCapability:(UIForceTouchCapability)forceTouchCapability - traitCollectionContext:(id)traitCollectionContext + containerWindowSize:(CGSize)windowSize { self = [super init]; if (self) { @@ -30,7 +30,7 @@ _horizontalSizeClass = horizontalSizeClass; _verticalSizeClass = verticalSizeClass; _forceTouchCapability = forceTouchCapability; - _traitCollectionContext = traitCollectionContext; + _containerWindowSize = windowSize; } return self; } @@ -40,29 +40,29 @@ horizontalSizeClass:(UIUserInterfaceSizeClass)horizontalSizeClass verticalSizeClass:(UIUserInterfaceSizeClass)verticalSizeClass forceTouchCapability:(UIForceTouchCapability)forceTouchCapability - traitCollectionContext:(id)traitCollectionContext + containerWindowSize:(CGSize)windowSize { return [[[self class] alloc] initWithDisplayScale:displayScale userInterfaceIdiom:userInterfaceIdiom horizontalSizeClass:horizontalSizeClass verticalSizeClass:verticalSizeClass forceTouchCapability:forceTouchCapability - traitCollectionContext:traitCollectionContext]; + containerWindowSize:windowSize]; } + (ASTraitCollection *)traitCollectionWithASEnvironmentTraitCollection:(ASEnvironmentTraitCollection)traits { - return [[[self class] alloc] initWithDisplayScale:traits.displayScale - userInterfaceIdiom:traits.userInterfaceIdiom - horizontalSizeClass:traits.horizontalSizeClass - verticalSizeClass:traits.verticalSizeClass - forceTouchCapability:traits.forceTouchCapability - traitCollectionContext:traits.displayContext]; + return [[[self class] alloc] initWithDisplayScale:traits.displayScale + userInterfaceIdiom:traits.userInterfaceIdiom + horizontalSizeClass:traits.horizontalSizeClass + verticalSizeClass:traits.verticalSizeClass + forceTouchCapability:traits.forceTouchCapability + containerWindowSize:traits.containerWindowSize]; } + (ASTraitCollection *)traitCollectionWithUITraitCollection:(UITraitCollection *)traitCollection - traitCollectionContext:(id)traitCollectionContext + containerWindowSize:(CGSize)windowSize { ASTraitCollection *asyncTraitCollection = nil; if (AS_AT_LEAST_IOS9) { @@ -71,7 +71,7 @@ horizontalSizeClass:traitCollection.horizontalSizeClass verticalSizeClass:traitCollection.verticalSizeClass forceTouchCapability:traitCollection.forceTouchCapability - traitCollectionContext:traitCollectionContext]; + containerWindowSize:windowSize]; } else if (AS_AT_LEAST_IOS8) { asyncTraitCollection = [[[self class] alloc] initWithDisplayScale:traitCollection.displayScale @@ -79,7 +79,7 @@ horizontalSizeClass:traitCollection.horizontalSizeClass verticalSizeClass:traitCollection.verticalSizeClass forceTouchCapability:0 - traitCollectionContext:traitCollectionContext]; + containerWindowSize:windowSize]; } else { asyncTraitCollection = [[[self class] alloc] init]; } @@ -95,7 +95,7 @@ .userInterfaceIdiom = self.userInterfaceIdiom, .verticalSizeClass = self.verticalSizeClass, .forceTouchCapability = self.forceTouchCapability, - .displayContext = self.traitCollectionContext, + .containerWindowSize = self.containerWindowSize, }; } @@ -105,7 +105,7 @@ self.horizontalSizeClass == traitCollection.horizontalSizeClass && self.verticalSizeClass == traitCollection.verticalSizeClass && self.userInterfaceIdiom == traitCollection.userInterfaceIdiom && - self.traitCollectionContext == traitCollection.traitCollectionContext && + CGSizeEqualToSize(self.containerWindowSize, traitCollection.containerWindowSize) && self.forceTouchCapability == traitCollection.forceTouchCapability; } diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm index 727b073b01..9e80f609e0 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm @@ -207,7 +207,7 @@ ASEnvironmentState ASEnvironmentMergeObjectAndState(ASEnvironmentState childEnvi childTraitCollection.userInterfaceIdiom = parentTraitCollection.userInterfaceIdiom; childTraitCollection.forceTouchCapability = parentTraitCollection.forceTouchCapability; childTraitCollection.displayScale = parentTraitCollection.displayScale; - childTraitCollection.displayContext = parentTraitCollection.displayContext; + childTraitCollection.containerWindowSize = parentTraitCollection.containerWindowSize; childEnvironmentState.environmentTraitCollection = childTraitCollection; } From ec4b666bc54a2734ca86ea1f2cf612137c246010 Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 7 Jul 2016 09:54:03 -0700 Subject: [PATCH 078/247] update ASTraitCollection header --- AsyncDisplayKit/Details/ASTraitCollection.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/ASTraitCollection.h b/AsyncDisplayKit/Details/ASTraitCollection.h index c737b5d874..2f125c14a9 100644 --- a/AsyncDisplayKit/Details/ASTraitCollection.h +++ b/AsyncDisplayKit/Details/ASTraitCollection.h @@ -24,7 +24,7 @@ + (ASTraitCollection *)traitCollectionWithASEnvironmentTraitCollection:(ASEnvironmentTraitCollection)traits; + (ASTraitCollection *)traitCollectionWithUITraitCollection:(UITraitCollection *)traitCollection - traitCollectionContext:(id)traitCollectionContext; + containerWindowSize:(CGSize)windowSize; + (ASTraitCollection *)traitCollectionWithDisplayScale:(CGFloat)displayScale @@ -32,7 +32,7 @@ horizontalSizeClass:(UIUserInterfaceSizeClass)horizontalSizeClass verticalSizeClass:(UIUserInterfaceSizeClass)verticalSizeClass forceTouchCapability:(UIForceTouchCapability)forceTouchCapability - traitCollectionContext:(id)traitCollectionContext; + containerWindowSize:(CGSize)windowSize; - (ASEnvironmentTraitCollection)environmentTraitCollection; From 3512cf47aa9b9f509c26528173a85626dccfce7f Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 7 Jul 2016 10:21:16 -0700 Subject: [PATCH 079/247] assert we are on the main thread before accessing view. --- AsyncDisplayKit/ASViewController.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index deffec60f5..3b0af2d228 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -195,6 +195,7 @@ ASVisibilityDepthImplementation; return [asyncTraitCollection environmentTraitCollection]; } + ASDisplayNodeAssertMainThread(); ASEnvironmentTraitCollection asyncTraitCollection = ASEnvironmentTraitCollectionFromUITraitCollection(traitCollection); asyncTraitCollection.containerWindowSize = self.view.frame.size; return asyncTraitCollection; From 54ee62f0022496727953fc9413ebc729428c6a53 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 7 Jul 2016 10:36:41 -0700 Subject: [PATCH 080/247] [ASCollectionView] Add a strong pointer from ASCollectionView -> layer under iOS < 9 to workaround issue --- AsyncDisplayKit/ASCollectionView.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index fda250d18d..bdcbcd4e4a 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -107,6 +107,15 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; ASCollectionViewInvalidationStyle _nextLayoutInvalidationStyle; + /** + * Our layer, retained. Under iOS < 9, when collection views are removed from the hierarchy, + * their layers may be deallocated and become dangling pointers. This puts the collection view + * into a very dangerous state where pretty much any call will crash it. So we manually retain our layer. + * + * You should never access this, and it will be nil under iOS >= 9. + */ + CALayer *_retainedLayer; + /** * If YES, the `UICollectionView` will reload its data on next layout pass so we should not forward any updates to it. @@ -248,6 +257,10 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; [self registerClass:[_ASCollectionViewCell class] forCellWithReuseIdentifier:kCellReuseIdentifier]; + if (!AS_AT_LEAST_IOS9) { + _retainedLayer = self.layer; + } + return self; } From 7314a18ab4915147aa8c3f8a34c7655c1dec7df1 Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 7 Jul 2016 10:55:18 -0700 Subject: [PATCH 081/247] rename containerWindowSize to containerSize --- AsyncDisplayKit/ASViewController.mm | 6 +++--- AsyncDisplayKit/Details/ASEnvironment.h | 2 +- AsyncDisplayKit/Details/ASEnvironment.mm | 4 ++-- AsyncDisplayKit/Details/ASTraitCollection.h | 6 +++--- AsyncDisplayKit/Details/ASTraitCollection.m | 20 +++++++++---------- .../Private/ASEnvironmentInternal.mm | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index 3b0af2d228..4dc56942f3 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -197,7 +197,7 @@ ASVisibilityDepthImplementation; ASDisplayNodeAssertMainThread(); ASEnvironmentTraitCollection asyncTraitCollection = ASEnvironmentTraitCollectionFromUITraitCollection(traitCollection); - asyncTraitCollection.containerWindowSize = self.view.frame.size; + asyncTraitCollection.containerSize = self.view.frame.size; return asyncTraitCollection; } @@ -207,7 +207,7 @@ ASVisibilityDepthImplementation; ASTraitCollection *traitCollection = self.overrideDisplayTraitsWithWindowSize(windowSize); return [traitCollection environmentTraitCollection]; } - self.node.environmentTraitCollection.containerWindowSize = windowSize; + self.node.environmentTraitCollection.containerSize = windowSize; return self.node.environmentTraitCollection; } @@ -233,7 +233,7 @@ ASVisibilityDepthImplementation; [super traitCollectionDidChange:previousTraitCollection]; ASEnvironmentTraitCollection environmentTraitCollection = [self environmentTraitCollectionForUITraitCollection:self.traitCollection]; - environmentTraitCollection.containerWindowSize = self.view.bounds.size; + environmentTraitCollection.containerSize = self.view.bounds.size; [self progagateNewEnvironmentTraitCollection:environmentTraitCollection]; } diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index de9902a68a..5cb63315de 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -70,7 +70,7 @@ typedef struct ASEnvironmentTraitCollection { UIUserInterfaceSizeClass verticalSizeClass; UIForceTouchCapability forceTouchCapability; - CGSize containerWindowSize; + CGSize containerSize; } ASEnvironmentTraitCollection; extern ASEnvironmentTraitCollection ASEnvironmentTraitCollectionFromUITraitCollection(UITraitCollection *traitCollection); diff --git a/AsyncDisplayKit/Details/ASEnvironment.mm b/AsyncDisplayKit/Details/ASEnvironment.mm index 1f7526d7b9..7e2edb5b65 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.mm +++ b/AsyncDisplayKit/Details/ASEnvironment.mm @@ -30,7 +30,7 @@ ASEnvironmentTraitCollection _ASEnvironmentTraitCollectionMakeDefault() { return (ASEnvironmentTraitCollection) { // Default values can be defined in here - .containerWindowSize = CGSizeZero, + .containerSize = CGSizeZero, }; } @@ -57,7 +57,7 @@ BOOL ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(ASEnviron lhs.displayScale == rhs.displayScale && lhs.userInterfaceIdiom == rhs.userInterfaceIdiom && lhs.forceTouchCapability == rhs.forceTouchCapability && - CGSizeEqualToSize(lhs.containerWindowSize, rhs.containerWindowSize); + CGSizeEqualToSize(lhs.containerSize, rhs.containerSize); } ASEnvironmentState ASEnvironmentStateMakeDefault() diff --git a/AsyncDisplayKit/Details/ASTraitCollection.h b/AsyncDisplayKit/Details/ASTraitCollection.h index 2f125c14a9..19e23131cc 100644 --- a/AsyncDisplayKit/Details/ASTraitCollection.h +++ b/AsyncDisplayKit/Details/ASTraitCollection.h @@ -18,13 +18,13 @@ @property (nonatomic, assign, readonly) UIUserInterfaceIdiom userInterfaceIdiom; @property (nonatomic, assign, readonly) UIUserInterfaceSizeClass verticalSizeClass; @property (nonatomic, assign, readonly) UIForceTouchCapability forceTouchCapability; -@property (nonatomic, assign, readonly) CGSize containerWindowSize; +@property (nonatomic, assign, readonly) CGSize containerSize; + (ASTraitCollection *)traitCollectionWithASEnvironmentTraitCollection:(ASEnvironmentTraitCollection)traits; + (ASTraitCollection *)traitCollectionWithUITraitCollection:(UITraitCollection *)traitCollection - containerWindowSize:(CGSize)windowSize; + containerSize:(CGSize)windowSize; + (ASTraitCollection *)traitCollectionWithDisplayScale:(CGFloat)displayScale @@ -32,7 +32,7 @@ horizontalSizeClass:(UIUserInterfaceSizeClass)horizontalSizeClass verticalSizeClass:(UIUserInterfaceSizeClass)verticalSizeClass forceTouchCapability:(UIForceTouchCapability)forceTouchCapability - containerWindowSize:(CGSize)windowSize; + containerSize:(CGSize)windowSize; - (ASEnvironmentTraitCollection)environmentTraitCollection; diff --git a/AsyncDisplayKit/Details/ASTraitCollection.m b/AsyncDisplayKit/Details/ASTraitCollection.m index f823fde8d6..a087c84c3a 100644 --- a/AsyncDisplayKit/Details/ASTraitCollection.m +++ b/AsyncDisplayKit/Details/ASTraitCollection.m @@ -21,7 +21,7 @@ horizontalSizeClass:(UIUserInterfaceSizeClass)horizontalSizeClass verticalSizeClass:(UIUserInterfaceSizeClass)verticalSizeClass forceTouchCapability:(UIForceTouchCapability)forceTouchCapability - containerWindowSize:(CGSize)windowSize + containerSize:(CGSize)windowSize { self = [super init]; if (self) { @@ -30,7 +30,7 @@ _horizontalSizeClass = horizontalSizeClass; _verticalSizeClass = verticalSizeClass; _forceTouchCapability = forceTouchCapability; - _containerWindowSize = windowSize; + _containerSize = windowSize; } return self; } @@ -40,14 +40,14 @@ horizontalSizeClass:(UIUserInterfaceSizeClass)horizontalSizeClass verticalSizeClass:(UIUserInterfaceSizeClass)verticalSizeClass forceTouchCapability:(UIForceTouchCapability)forceTouchCapability - containerWindowSize:(CGSize)windowSize + containerSize:(CGSize)windowSize { return [[[self class] alloc] initWithDisplayScale:displayScale userInterfaceIdiom:userInterfaceIdiom horizontalSizeClass:horizontalSizeClass verticalSizeClass:verticalSizeClass forceTouchCapability:forceTouchCapability - containerWindowSize:windowSize]; + containerSize:windowSize]; } + (ASTraitCollection *)traitCollectionWithASEnvironmentTraitCollection:(ASEnvironmentTraitCollection)traits @@ -57,12 +57,12 @@ horizontalSizeClass:traits.horizontalSizeClass verticalSizeClass:traits.verticalSizeClass forceTouchCapability:traits.forceTouchCapability - containerWindowSize:traits.containerWindowSize]; + containerSize:traits.containerSize]; } + (ASTraitCollection *)traitCollectionWithUITraitCollection:(UITraitCollection *)traitCollection - containerWindowSize:(CGSize)windowSize + containerSize:(CGSize)windowSize { ASTraitCollection *asyncTraitCollection = nil; if (AS_AT_LEAST_IOS9) { @@ -71,7 +71,7 @@ horizontalSizeClass:traitCollection.horizontalSizeClass verticalSizeClass:traitCollection.verticalSizeClass forceTouchCapability:traitCollection.forceTouchCapability - containerWindowSize:windowSize]; + containerSize:windowSize]; } else if (AS_AT_LEAST_IOS8) { asyncTraitCollection = [[[self class] alloc] initWithDisplayScale:traitCollection.displayScale @@ -79,7 +79,7 @@ horizontalSizeClass:traitCollection.horizontalSizeClass verticalSizeClass:traitCollection.verticalSizeClass forceTouchCapability:0 - containerWindowSize:windowSize]; + containerSize:windowSize]; } else { asyncTraitCollection = [[[self class] alloc] init]; } @@ -95,7 +95,7 @@ .userInterfaceIdiom = self.userInterfaceIdiom, .verticalSizeClass = self.verticalSizeClass, .forceTouchCapability = self.forceTouchCapability, - .containerWindowSize = self.containerWindowSize, + .containerSize = self.containerSize, }; } @@ -105,7 +105,7 @@ self.horizontalSizeClass == traitCollection.horizontalSizeClass && self.verticalSizeClass == traitCollection.verticalSizeClass && self.userInterfaceIdiom == traitCollection.userInterfaceIdiom && - CGSizeEqualToSize(self.containerWindowSize, traitCollection.containerWindowSize) && + CGSizeEqualToSize(self.containerSize, traitCollection.containerSize) && self.forceTouchCapability == traitCollection.forceTouchCapability; } diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm index 9e80f609e0..5a3c88b784 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm @@ -207,7 +207,7 @@ ASEnvironmentState ASEnvironmentMergeObjectAndState(ASEnvironmentState childEnvi childTraitCollection.userInterfaceIdiom = parentTraitCollection.userInterfaceIdiom; childTraitCollection.forceTouchCapability = parentTraitCollection.forceTouchCapability; childTraitCollection.displayScale = parentTraitCollection.displayScale; - childTraitCollection.containerWindowSize = parentTraitCollection.containerWindowSize; + childTraitCollection.containerSize = parentTraitCollection.containerSize; childEnvironmentState.environmentTraitCollection = childTraitCollection; } From ff0e2846e34c3262ea9066615949201be48df113 Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 7 Jul 2016 10:56:58 -0700 Subject: [PATCH 082/247] fixed formatting --- AsyncDisplayKit/Details/ASTraitCollection.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Details/ASTraitCollection.m b/AsyncDisplayKit/Details/ASTraitCollection.m index a087c84c3a..3bee2582e1 100644 --- a/AsyncDisplayKit/Details/ASTraitCollection.m +++ b/AsyncDisplayKit/Details/ASTraitCollection.m @@ -57,7 +57,7 @@ horizontalSizeClass:traits.horizontalSizeClass verticalSizeClass:traits.verticalSizeClass forceTouchCapability:traits.forceTouchCapability - containerSize:traits.containerSize]; + containerSize:traits.containerSize]; } From 8081123cb2039a835a0a2770fa4dcbdcf81ab002 Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Wed, 6 Jul 2016 13:35:40 -0700 Subject: [PATCH 083/247] Fix visibility assert on iOS 7 It appears that didMoveToViewController: can be called with nil, yet self.parentViewController will *not* be nil. This can result in calling parent view controller's visibility depth. Instead of asserting, these methods should return NSNotFound which also happens to be a really large number, effectively infinite depth. --- AsyncDisplayKit/ASNavigationController.m | 5 ++++- AsyncDisplayKit/ASTabBarController.m | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASNavigationController.m b/AsyncDisplayKit/ASNavigationController.m index bf97b765f5..e67f15e742 100644 --- a/AsyncDisplayKit/ASNavigationController.m +++ b/AsyncDisplayKit/ASNavigationController.m @@ -40,7 +40,10 @@ ASVisibilityDepthImplementation; - (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController { NSUInteger viewControllerIndex = [self.viewControllers indexOfObject:childViewController]; - NSAssert(viewControllerIndex != NSNotFound, @"childViewController is not in the navigation stack."); + if (viewControllerIndex == NSNotFound) { + //If childViewController is not actually a child, return NSNotFound which is also a really large number. + return NSNotFound; + } if (viewControllerIndex == self.viewControllers.count - 1) { //view controller is at the top, just return our own visibility depth. diff --git a/AsyncDisplayKit/ASTabBarController.m b/AsyncDisplayKit/ASTabBarController.m index 65b31d8137..5dd994e084 100644 --- a/AsyncDisplayKit/ASTabBarController.m +++ b/AsyncDisplayKit/ASTabBarController.m @@ -39,6 +39,12 @@ ASVisibilityDepthImplementation; - (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController { + NSUInteger viewControllerIndex = [self.viewControllers indexOfObject:childViewController]; + if (viewControllerIndex == NSNotFound) { + //If childViewController is not actually a child, return NSNotFound which is also a really large number. + return NSNotFound; + } + if (self.selectedViewController == childViewController) { return [self visibilityDepth]; } From b79641d4eebe138b6de00b24d6896f6abb85acc8 Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Thu, 7 Jul 2016 11:13:18 -0700 Subject: [PATCH 084/247] Use indexOfObjectIdenticalTo since we only care if the pointers are equal. Thanks @Adlai-Holler! --- AsyncDisplayKit/ASNavigationController.m | 2 +- AsyncDisplayKit/ASTabBarController.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASNavigationController.m b/AsyncDisplayKit/ASNavigationController.m index e67f15e742..79ae3f4232 100644 --- a/AsyncDisplayKit/ASNavigationController.m +++ b/AsyncDisplayKit/ASNavigationController.m @@ -39,7 +39,7 @@ ASVisibilityDepthImplementation; - (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController { - NSUInteger viewControllerIndex = [self.viewControllers indexOfObject:childViewController]; + NSUInteger viewControllerIndex = [self.viewControllers indexOfObjectIdenticalTo:childViewController]; if (viewControllerIndex == NSNotFound) { //If childViewController is not actually a child, return NSNotFound which is also a really large number. return NSNotFound; diff --git a/AsyncDisplayKit/ASTabBarController.m b/AsyncDisplayKit/ASTabBarController.m index 5dd994e084..8a82ff11b1 100644 --- a/AsyncDisplayKit/ASTabBarController.m +++ b/AsyncDisplayKit/ASTabBarController.m @@ -39,7 +39,7 @@ ASVisibilityDepthImplementation; - (NSInteger)visibilityDepthOfChildViewController:(UIViewController *)childViewController { - NSUInteger viewControllerIndex = [self.viewControllers indexOfObject:childViewController]; + NSUInteger viewControllerIndex = [self.viewControllers indexOfObjectIdenticalTo:childViewController]; if (viewControllerIndex == NSNotFound) { //If childViewController is not actually a child, return NSNotFound which is also a really large number. return NSNotFound; From 312de1a0849ce560d7ae885f878af4e9eb37aa70 Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Thu, 7 Jul 2016 17:41:58 +0700 Subject: [PATCH 085/247] Make sure range controller listens to node display notifications if absolutely needed --- AsyncDisplayKit/ASDisplayNode.mm | 32 +++++++++---------- AsyncDisplayKit/Details/ASRangeController.mm | 29 +++++++++-------- .../Private/ASDisplayNode+FrameworkPrivate.h | 5 +++ 3 files changed, 36 insertions(+), 30 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 32b1c80b6a..d4ff7e6499 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -245,9 +245,9 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) dispatch_once(&onceToken, ^{ renderQueue = [[ASRunLoopQueue alloc] initWithRunLoop:CFRunLoopGetMain() andHandler:^(ASDisplayNode * _Nonnull dequeuedItem, BOOL isQueueDrained) { - CFAbsoluteTime timestamp = isQueueDrained ? CFAbsoluteTimeGetCurrent() : 0; [dequeuedItem _recursivelyTriggerDisplayAndBlock:NO]; if (isQueueDrained) { + CFAbsoluteTime timestamp = CFAbsoluteTimeGetCurrent(); [[NSNotificationCenter defaultCenter] postNotificationName:ASRenderingEngineDidDisplayScheduledNodesNotification object:nil userInfo:@{ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp: @(timestamp)}]; @@ -2317,27 +2317,27 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) }); } -- (void)recursivelySetInterfaceState:(ASInterfaceState)interfaceState +- (void)recursivelySetInterfaceState:(ASInterfaceState)newInterfaceState { - ASInterfaceState oldState = self.interfaceState; - ASInterfaceState newState = interfaceState; + // Instead of each node in the recursion assuming it needs to schedule itself for display, + // setInterfaceState: skips this when handling range-managed nodes (our whole subtree has this set). + // If our range manager intends for us to be displayed right now, and didn't before, get started! + BOOL shouldScheduleDisplay = [self supportsRangeManagedInterfaceState] && [self shouldScheduleDisplayWithNewInterfaceState:newInterfaceState]; ASDisplayNodePerformBlockOnEveryNode(nil, self, ^(ASDisplayNode *node) { - node.interfaceState = interfaceState; + node.interfaceState = newInterfaceState; }); - - if ([self supportsRangeManagedInterfaceState]) { - // Instead of each node in the recursion assuming it needs to schedule itself for display, - // setInterfaceState: skips this when handling range-managed nodes (our whole subtree has this set). - // If our range manager intends for us to be displayed right now, and didn't before, get started! - - BOOL nowDisplay = ASInterfaceStateIncludesDisplay(newState); - BOOL wasDisplay = ASInterfaceStateIncludesDisplay(oldState); - if (nowDisplay && (nowDisplay != wasDisplay)) { - [ASDisplayNode scheduleNodeForRecursiveDisplay:self]; - } + if (shouldScheduleDisplay) { + [ASDisplayNode scheduleNodeForRecursiveDisplay:self]; } } +- (BOOL)shouldScheduleDisplayWithNewInterfaceState:(ASInterfaceState)newInterfaceState +{ + BOOL willDisplay = ASInterfaceStateIncludesDisplay(newInterfaceState); + BOOL nowDisplay = ASInterfaceStateIncludesDisplay(self.interfaceState); + return willDisplay && (willDisplay != nowDisplay); +} + - (ASHierarchyState)hierarchyState { ASDN::MutexLocker l(_propertyLock); diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 6c84935540..f1d354af10 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -27,7 +27,7 @@ NSSet *_allPreviousIndexPaths; ASLayoutRangeMode _currentRangeMode; BOOL _didUpdateCurrentRange; - BOOL _didRegisterForNotifications; + BOOL _didRegisterForNodeDisplayNotifications; CFAbsoluteTime _pendingDisplayNodesTimestamp; } @@ -56,7 +56,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; - (void)dealloc { - if (_didRegisterForNotifications) { + if (_didRegisterForNodeDisplayNotifications) { [[NSNotificationCenter defaultCenter] removeObserver:self name:ASRenderingEngineDidDisplayScheduledNodesNotification object:nil]; } } @@ -242,10 +242,6 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; [allIndexPaths addObjectsFromArray:ASIndexPathsForTwoDimensionalArray(allNodes)]; } - // TODO Don't register for notifications if this range update doesn't cause any node to enter rendering pipeline. - // This can be done once there is an API to observe to (or be notified upon) interface state changes or pipeline enterings - [self registerForNotificationsForInterfaceStateIfNeeded:selfInterfaceState]; - #if ASRangeControllerLoggingEnabled ASDisplayNodeAssertTrue([visibleIndexPaths isSubsetOfSet:displayIndexPaths]); NSMutableArray *modifiedIndexPaths = (ASRangeControllerLoggingEnabled ? [NSMutableArray array] : nil); @@ -309,16 +305,21 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; #if ASRangeControllerLoggingEnabled [modifiedIndexPaths addObject:indexPath]; #endif + + BOOL nodeShouldScheduleDisplay = [node shouldScheduleDisplayWithNewInterfaceState:interfaceState]; [node recursivelySetInterfaceState:interfaceState]; + + if (nodeShouldScheduleDisplay) { + [self registerForNodeDisplayNotificationsForInterfaceStateIfNeeded:selfInterfaceState]; + if (_didRegisterForNodeDisplayNotifications) { + _pendingDisplayNodesTimestamp = CFAbsoluteTimeGetCurrent(); + } + } } } } } - if (_didRegisterForNotifications) { - _pendingDisplayNodesTimestamp = CFAbsoluteTimeGetCurrent(); - } - _rangeIsValid = YES; _queuedRangeUpdate = NO; @@ -338,9 +339,9 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; #pragma mark - Notification observers -- (void)registerForNotificationsForInterfaceStateIfNeeded:(ASInterfaceState)interfaceState +- (void)registerForNodeDisplayNotificationsForInterfaceStateIfNeeded:(ASInterfaceState)interfaceState { - if (!_didRegisterForNotifications) { + if (!_didRegisterForNodeDisplayNotifications) { ASLayoutRangeMode nextRangeMode = [ASRangeController rangeModeForInterfaceState:interfaceState currentRangeMode:_currentRangeMode]; if (_currentRangeMode != nextRangeMode) { @@ -348,7 +349,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; selector:@selector(scheduledNodesDidDisplay:) name:ASRenderingEngineDidDisplayScheduledNodesNotification object:nil]; - _didRegisterForNotifications = YES; + _didRegisterForNodeDisplayNotifications = YES; } } } @@ -359,7 +360,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; if (_pendingDisplayNodesTimestamp < notificationTimestamp) { // The rendering engine has processed all the nodes this range controller scheduled. Let's schedule a range update [[NSNotificationCenter defaultCenter] removeObserver:self name:ASRenderingEngineDidDisplayScheduledNodesNotification object:nil]; - _didRegisterForNotifications = NO; + _didRegisterForNodeDisplayNotifications = NO; [self scheduleRangeUpdate]; } diff --git a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h index 78ce6ce05e..30cf597f51 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h +++ b/AsyncDisplayKit/Private/ASDisplayNode+FrameworkPrivate.h @@ -135,6 +135,11 @@ inline BOOL ASHierarchyStateIncludesRangeManaged(ASHierarchyState hierarchyState */ @property (nonatomic, assign) BOOL shouldBypassEnsureDisplay; +/** + * @abstract Checks whether a node should be scheduled for display, considering its current and new interface states. + */ +- (BOOL)shouldScheduleDisplayWithNewInterfaceState:(ASInterfaceState)newInterfaceState; + @end @interface UIView (ASDisplayNodeInternal) From f25e0f0d011f506eabb34923071edcfd214be247 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 8 Jul 2016 08:05:44 -0700 Subject: [PATCH 086/247] Fix Xcode 8 errors --- AsyncDisplayKit/ASDisplayNode.mm | 7 ++++++- AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.m | 9 ++++++--- AsyncDisplayKitTests/ASDisplayNodeTests.m | 8 ++++---- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 32b1c80b6a..228537f394 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -39,6 +39,10 @@ NSInteger const ASDefaultDrawingPriority = ASDefaultTransactionPriority; NSString * const ASRenderingEngineDidDisplayScheduledNodesNotification = @"ASRenderingEngineDidDisplayScheduledNodes"; NSString * const ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp = @"ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp"; +// Forward declare CALayerDelegate protocol as the iOS 10 SDK moves CALayerDelegate from a formal delegate to a protocol. +// We have to forward declare the protocol as this place otherwise it will not compile compiling with an Base SDK < iOS 10 +@protocol CALayerDelegate; + @interface ASDisplayNode () /** @@ -493,7 +497,8 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) if (isLayerBacked) { TIME_SCOPED(_debugTimeToCreateView); _layer = [self _layerToLoad]; - _layer.delegate = self; + // Surpress warning for Base SDK > 10.0 + _layer.delegate = (id)self; } else { TIME_SCOPED(_debugTimeToCreateView); _view = [self _viewToLoad]; diff --git a/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.m b/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.m index 5d0337cd5f..d157cb4797 100644 --- a/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.m +++ b/AsyncDisplayKit/TextKit/ASTextKitCoreTextAdditions.m @@ -223,9 +223,12 @@ NSAttributedString *ASCleanseAttributedStringOfCoreTextAttributes(NSAttributedSt // kCTParagraphStyleSpecifierLineSpacing -> lineSpacing // Note that kCTParagraphStyleSpecifierLineSpacing is deprecated and will die soon. We should not be using it. - CGFloat lineSpacing; - if (CTParagraphStyleGetValueForSpecifier(coreTextParagraphStyle, kCTParagraphStyleSpecifierLineSpacing, sizeof(lineSpacing), &lineSpacing)) - newParagraphStyle.lineSpacing = lineSpacing; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + CGFloat lineSpacing; + if (CTParagraphStyleGetValueForSpecifier(coreTextParagraphStyle, kCTParagraphStyleSpecifierLineSpacing, sizeof(lineSpacing), &lineSpacing)) + newParagraphStyle.lineSpacing = lineSpacing; +#pragma clang diagnostic pop // kCTParagraphStyleSpecifierParagraphSpacing -> paragraphSpacing CGFloat paragraphSpacing; diff --git a/AsyncDisplayKitTests/ASDisplayNodeTests.m b/AsyncDisplayKitTests/ASDisplayNodeTests.m index 86529730f3..1d58b9ccc4 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeTests.m @@ -160,7 +160,7 @@ for (ASDisplayNode *n in @[ nodes ]) {\ @end @interface UIResponderNodeTestView : _ASDisplayView -@property(nonatomic) BOOL isFirstResponder; +@property(nonatomic) BOOL testIsFirstResponder; @end @implementation UIDisplayNodeTestView @@ -192,7 +192,7 @@ for (ASDisplayNode *n in @[ nodes ]) {\ @implementation UIResponderNodeTestView - (BOOL)becomeFirstResponder { - self.isFirstResponder = YES; + self.testIsFirstResponder = YES; return YES; } @@ -202,8 +202,8 @@ for (ASDisplayNode *n in @[ nodes ]) {\ - (BOOL)resignFirstResponder { [super resignFirstResponder]; - if (self.isFirstResponder) { - self.isFirstResponder = NO; + if (self.testIsFirstResponder) { + self.testIsFirstResponder = NO; return YES; } return NO; From a0aad4609d9486a1cbc48044de69d2343100e3a2 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 8 Jul 2016 11:36:43 -0700 Subject: [PATCH 087/247] [ASDataController] Temporarily disable some troublesome assertions --- AsyncDisplayKit/Details/ASChangeSetDataController.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index 3a31b8ce82..235ad254b9 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -27,7 +27,8 @@ - (void)beginUpdates { - ASDisplayNodeAssertMainThread(); + // NOTE: This assertion is failing in some apps and will be enabled soon. +// ASDisplayNodeAssertMainThread(); if (_changeSetBatchUpdateCounter <= 0) { _changeSet = [_ASHierarchyChangeSet new]; _changeSetBatchUpdateCounter = 0; @@ -37,11 +38,13 @@ - (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion { - ASDisplayNodeAssertMainThread(); + // NOTE: This assertion is failing in some apps and will be enabled soon. +// ASDisplayNodeAssertMainThread(); _changeSetBatchUpdateCounter--; // Prevent calling endUpdatesAnimated:completion: in an unbalanced way - NSAssert(_changeSetBatchUpdateCounter >= 0, @"endUpdatesAnimated:completion: called without having a balanced beginUpdates call"); + // NOTE: This assertion is failing in some apps and will be enabled soon. +// NSAssert(_changeSetBatchUpdateCounter >= 0, @"endUpdatesAnimated:completion: called without having a balanced beginUpdates call"); if (_changeSetBatchUpdateCounter == 0) { [_changeSet markCompleted]; From 02a41f4db5f0664a0d59fcbb7a95b26e9e567899 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 8 Jul 2016 11:36:43 -0700 Subject: [PATCH 088/247] Move setting the tuning parameters to the range controller in ASTableView --- AsyncDisplayKit/ASTableView.mm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 1244c2b893..5edc232114 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -362,22 +362,22 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType { - [_layoutController setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; + [_rangeController setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeType:(ASLayoutRangeType)rangeType { - return [_layoutController tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; + return [_rangeController tuningParametersForRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; } - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - [_layoutController setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; + [_rangeController setTuningParameters:tuningParameters forRangeMode:rangeMode rangeType:rangeType]; } - (ASRangeTuningParameters)tuningParametersForRangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType { - return [_layoutController tuningParametersForRangeMode:rangeMode rangeType:rangeType]; + return [_rangeController tuningParametersForRangeMode:rangeMode rangeType:rangeType]; } - (NSArray *> *)completedNodes From 057c48482ad463910c5e8a89c2bb772216920d3c Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 24 Jun 2016 20:59:07 -0700 Subject: [PATCH 089/247] Fix Modal presented ASViewController don't rotate on iOS 8.3 --- AsyncDisplayKit/ASViewController.mm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index 4dc56942f3..efa7009557 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -89,6 +89,20 @@ { [super viewWillLayoutSubviews]; [_node measureWithSizeRange:[self nodeConstrainedSize]]; + + if (!AS_AT_LEAST_IOS9) { + [self _legacyHandleViewDidLayoutSubviews]; + } +} + +- (void)_legacyHandleViewDidLayoutSubviews +{ + // In modal presentation the view does not automatic resize in iOS7 and iOS8. As workaround we adjust the frame of the + // view manually + if (self.presentingViewController != nil) { + CGSize maxConstrainedSize = [self nodeConstrainedSize].max; + _node.frame = (CGRect){.origin = CGPointZero, .size = maxConstrainedSize}; + } } - (void)viewDidLayoutSubviews @@ -177,7 +191,19 @@ ASVisibilityDepthImplementation; - (ASSizeRange)nodeConstrainedSize { - CGSize viewSize = self.view.bounds.size; + if (AS_AT_LEAST_IOS9) { + CGSize viewSize = self.view.bounds.size; + return ASSizeRangeMake(viewSize, viewSize); + } else { + return [self _legacyConstrainedSize]; + } +} + +- (ASSizeRange)_legacyConstrainedSize +{ + // In modal presentation the view does not have the right bounds in iOS7 and iOS8. As workaround using the superviews + // view bounds + CGSize viewSize = (self.presentingViewController != nil) ? self.view.superview.bounds.size : self.view.bounds.size; return ASSizeRangeMake(viewSize, viewSize); } From 33e093b1f6c65225a74ba5e0fcf0d72e9bc54197 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 8 Jul 2016 13:20:18 -0700 Subject: [PATCH 090/247] Check if a superview is present before calculating the legacy constrained size --- AsyncDisplayKit/ASViewController.mm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index efa7009557..f711aa121b 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -203,7 +203,14 @@ ASVisibilityDepthImplementation; { // In modal presentation the view does not have the right bounds in iOS7 and iOS8. As workaround using the superviews // view bounds - CGSize viewSize = (self.presentingViewController != nil) ? self.view.superview.bounds.size : self.view.bounds.size; + UIView *view = self.view; + CGSize viewSize = view.bounds.size; + if (self.presentingViewController != nil) { + UIView *superview = view.superview; + if (superview != nil) { + viewSize = superview.bounds.size; + } + } return ASSizeRangeMake(viewSize, viewSize); } From b2810edb0f525399fd38019d8dfd6af470dfeaf4 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 8 Jul 2016 14:41:19 -0700 Subject: [PATCH 091/247] Move dealloc method from ASImageNode+AnimatedImage category to ASImageNode Having a dealloc method in a category can be very problematic as the superclass dealloc method will not be called in case it exists. --- AsyncDisplayKit/ASImageNode+AnimatedImage.mm | 6 +++++- AsyncDisplayKit/ASImageNode.mm | 6 ++++++ AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h | 7 +++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASImageNode+AnimatedImage.mm b/AsyncDisplayKit/ASImageNode+AnimatedImage.mm index e51305a298..cbaff6d42b 100644 --- a/AsyncDisplayKit/ASImageNode+AnimatedImage.mm +++ b/AsyncDisplayKit/ASImageNode+AnimatedImage.mm @@ -233,7 +233,11 @@ NSString *const ASAnimatedImageDefaultRunLoopMode = NSRunLoopCommonModes; return frameIndex; } -- (void)dealloc +@end + +@implementation ASImageNode(AnimatedImageInvalidation) + +- (void)invalidateAnimatedImage { ASDN::MutexLocker l(_displayLinkLock); #if ASAnimatedImageDebug diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index 024bf1370d..4af9d7b290 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -110,6 +110,12 @@ struct ASImageNodeDrawParameters { return nil; } +- (void)dealloc +{ + // Invalidate all components around animated images + [self invalidateAnimatedImage]; +} + #pragma mark - Layout and Sizing - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize diff --git a/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h b/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h index 64a20d8cc3..95f352d2dc 100644 --- a/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h +++ b/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h @@ -31,3 +31,10 @@ extern NSString *const ASAnimatedImageDefaultRunLoopMode; @property (atomic, assign) CFTimeInterval lastDisplayLinkFire; @end + + +@interface ASImageNode (AnimatedImageInvalidation) + +- (void)invalidateAnimatedImage; + +@end From fe61c3e3aba8b564c5819fe7cf9380dd3aeed374 Mon Sep 17 00:00:00 2001 From: ricky Date: Fri, 8 Jul 2016 14:55:33 -0700 Subject: [PATCH 092/247] [ASEnvironmentTraitCollection] Fixed bug where containerSize wasn't being saved Summary: The old assignment of `self.node.environmentTraitCollection.containerSize = windowSize;` doesn't because the struct creates a copy and then assigns `windowSize` to that copy. Also realized that we need to create a new `ASEnvironmentTraitCollection` in `willTransitionToTraitCollection:withTransitionCoordinator`:. If we only update in `viewWillTransitionToSize:` we will only update the `containerSize` value in `self.environmentTraitCollection` as we don't have the new trait collection yet. Differential Revision: https://phabricator.pinadmin.com/D101807 --- AsyncDisplayKit/ASViewController.mm | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index f711aa121b..a9923ef9f0 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -240,8 +240,9 @@ ASVisibilityDepthImplementation; ASTraitCollection *traitCollection = self.overrideDisplayTraitsWithWindowSize(windowSize); return [traitCollection environmentTraitCollection]; } - self.node.environmentTraitCollection.containerSize = windowSize; - return self.node.environmentTraitCollection; + ASEnvironmentTraitCollection traitCollection = self.node.environmentTraitCollection; + traitCollection.containerSize = windowSize; + return traitCollection; } - (void)progagateNewEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection @@ -270,9 +271,18 @@ ASVisibilityDepthImplementation; [self progagateNewEnvironmentTraitCollection:environmentTraitCollection]; } -// Note: We don't override willTransitionToTraitCollection:withTransitionCoordinator: because viewWillTransitionToSize:withTransitionCoordinator: will also called -// called in all these cases. However, there are cases where viewWillTransitionToSize:withTransitionCoordinator: but willTransitionToTraitCollection:withTransitionCoordinator: -// is not. +- (void)willTransitionToTraitCollection:(UITraitCollection *)newCollection withTransitionCoordinator:(id)coordinator +{ + [super willTransitionToTraitCollection:newCollection withTransitionCoordinator:coordinator]; + + // here we take the new UITraitCollection and use it to create a new ASEnvironmentTraitCollection on self.node + // We will propagate when the corresponding viewWillTransitionToSize:withTransitionCoordinator: is called and we have the + // new windowSize. There are cases when viewWillTransitionToSize: is called when willTransitionToTraitCollection: is not. + // Since we do the propagation on viewWillTransitionToSize: our subnodes should always get the proper trait collection. + ASEnvironmentTraitCollection asyncTraitCollection = ASEnvironmentTraitCollectionFromUITraitCollection(newCollection); + self.node.environmentTraitCollection = asyncTraitCollection; +} + - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; From 6238e5edbde55fb82982ce4a19a0cbca7fe7eb9d Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sat, 9 Jul 2016 15:40:31 -0700 Subject: [PATCH 093/247] [ASTextNode] Fix text node truncation (#1863) * Before truncate a text storage in ASTextKitContext reset the text storage to original value * Fix ASTextNode tests We should pass in the constrained size in both cases and the sizes should be the same. We adjust the calculated size in ASTextNode to be a bit narrower in the second case if we truncate again with the calculated size as constrained size it will truncate more and the resulting size will shrink. --- AsyncDisplayKit/TextKit/ASTextKitContext.h | 13 +++++++- AsyncDisplayKit/TextKit/ASTextKitContext.mm | 30 ++++++++++++++++++- AsyncDisplayKit/TextKit/ASTextKitRenderer.mm | 8 +++-- .../TextKit/ASTextKitTailTruncater.mm | 9 ++++-- AsyncDisplayKitTests/ASTextNodeTests.m | 4 +-- 5 files changed, 56 insertions(+), 8 deletions(-) diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.h b/AsyncDisplayKit/TextKit/ASTextKitContext.h index ccd7bb0eb9..61488b4a98 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.h +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.h @@ -10,6 +10,8 @@ #import +typedef NSTextStorage *(^ASTextKitContextTextStorageCreationBlock)(NSAttributedString *attributedString); + /** A threadsafe container for the TextKit components that ASTextKit uses to lay out and truncate its text. @@ -30,10 +32,19 @@ constrainedSize:(CGSize)constrainedSize layoutManagerCreationBlock:(NSLayoutManager * (^)(void))layoutCreationBlock layoutManagerDelegate:(id)layoutManagerDelegate - textStorageCreationBlock:(NSTextStorage * (^)(NSAttributedString *attributedString))textStorageCreationBlock; + textStorageCreationBlock:(ASTextKitContextTextStorageCreationBlock)textStorageCreationBlock; +/** + Set the constrained size for the text context. + */ @property (nonatomic, assign, readwrite) CGSize constrainedSize; +/** + Resets the text storage to the original value in case it was truncated before. This method is called within + a locked context. + */ +- (void)resetTextStorage; + /** All operations on TextKit values MUST occur within this locked context. Simultaneous access (even non-mutative) to TextKit components may cause crashes. diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.mm b/AsyncDisplayKit/TextKit/ASTextKitContext.mm index 7410ed9f45..7f5ed9be98 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.mm @@ -21,8 +21,12 @@ NSLayoutManager *_layoutManager; NSTextStorage *_textStorage; NSTextContainer *_textContainer; + + NSAttributedString *_attributedString; } +#pragma mark - Lifecycle + - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString lineBreakMode:(NSLineBreakMode)lineBreakMode maximumNumberOfLines:(NSUInteger)maximumNumberOfLines @@ -37,16 +41,23 @@ // Concurrently initialising TextKit components crashes (rdar://18448377) so we use a global lock. static std::mutex __static_mutex; std::lock_guard l(__static_mutex); + + _attributedString = [attributedString copy]; + // Create the TextKit component stack with our default configuration. if (textStorageCreationBlock) { _textStorage = textStorageCreationBlock(attributedString); } else { - _textStorage = (attributedString ? [[NSTextStorage alloc] initWithAttributedString:attributedString] : [[NSTextStorage alloc] init]); + _textStorage = [[NSTextStorage alloc] init]; + [self _resetTextStorage]; } + + _layoutManager = layoutCreationBlock ? layoutCreationBlock() : [[ASLayoutManager alloc] init]; _layoutManager.usesFontLeading = NO; _layoutManager.delegate = layoutManagerDelegate; [_textStorage addLayoutManager:_layoutManager]; + _textContainer = [[NSTextContainer alloc] initWithSize:constrainedSize]; // We want the text laid out up to the very edges of the container. _textContainer.lineFragmentPadding = 0; @@ -58,6 +69,21 @@ return self; } +#pragma mark - Text Storage + +- (void)resetTextStorage +{ + std::lock_guard l(_textKitMutex); + [self _resetTextStorage]; +} + +- (void)_resetTextStorage +{ + [_textStorage setAttributedString:_attributedString]; +} + +#pragma mark - Setter / Getter + - (CGSize)constrainedSize { std::lock_guard l(_textKitMutex); @@ -70,6 +96,8 @@ _textContainer.size = constrainedSize; } +#pragma mark - Locking + - (void)performBlockWithLockedTextKitComponents:(void (^)(NSLayoutManager *, NSTextStorage *, NSTextContainer *))block diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm index 05463f39e4..ef32d0dc40 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm @@ -129,8 +129,12 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet() // If we're updating an existing context, make sure to use the same inset logic used during initialization. // This codepath allows us to reuse the CGSize shadowConstrainedSize = [[self shadower] insetSizeWithConstrainedSize:constrainedSize]; - if (_context) _context.constrainedSize = shadowConstrainedSize; - if (_fontSizeAdjuster) _fontSizeAdjuster.constrainedSize = shadowConstrainedSize; + if (_context) { + _context.constrainedSize = shadowConstrainedSize; + } + if (_fontSizeAdjuster) { + _fontSizeAdjuster.constrainedSize = shadowConstrainedSize; + } } } } diff --git a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm index 57a9eb2f27..e44ed03ef5 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm @@ -152,9 +152,14 @@ - (void)truncate { - [_context performBlockWithLockedTextKitComponents:^(NSLayoutManager *layoutManager, NSTextStorage *textStorage, NSTextContainer *textContainer) { - NSUInteger originalStringLength = textStorage.length; + // Reset the text storage to start always with the full string + [_context resetTextStorage]; + // Start truncation + [_context performBlockWithLockedTextKitComponents:^(NSLayoutManager *layoutManager, NSTextStorage *textStorage, NSTextContainer *textContainer) { + + NSUInteger originalStringLength = textStorage.length; + [layoutManager ensureLayoutForTextContainer:textContainer]; NSRange visibleGlyphRange = [layoutManager glyphRangeForBoundingRect:{ .size = textContainer.size } diff --git a/AsyncDisplayKitTests/ASTextNodeTests.m b/AsyncDisplayKitTests/ASTextNodeTests.m index 6990b786d5..e928a22523 100644 --- a/AsyncDisplayKitTests/ASTextNodeTests.m +++ b/AsyncDisplayKitTests/ASTextNodeTests.m @@ -125,7 +125,7 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) for (NSInteger i = 10; i < 500; i += 50) { CGSize constrainedSize = CGSizeMake(i, i); CGSize calculatedSize = [_textNode measure:constrainedSize]; - CGSize recalculatedSize = [_textNode measure:calculatedSize]; + CGSize recalculatedSize = [_textNode measure:constrainedSize]; XCTAssertTrue(CGSizeEqualToSizeWithIn(calculatedSize, recalculatedSize, 4.0), @"Recalculated size %@ should be same as original size %@", NSStringFromCGSize(recalculatedSize), NSStringFromCGSize(calculatedSize)); } @@ -136,7 +136,7 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) for (CGFloat i = 10; i < 500; i *= 1.3) { CGSize constrainedSize = CGSizeMake(i, i); CGSize calculatedSize = [_textNode measure:constrainedSize]; - CGSize recalculatedSize = [_textNode measure:calculatedSize]; + CGSize recalculatedSize = [_textNode measure:constrainedSize]; XCTAssertTrue(CGSizeEqualToSizeWithIn(calculatedSize, recalculatedSize, 11.0), @"Recalculated size %@ should be same as original size %@", NSStringFromCGSize(recalculatedSize), NSStringFromCGSize(calculatedSize)); } From 01ba38d818247ef0f117cf5da3e13bb9315bd185 Mon Sep 17 00:00:00 2001 From: gazreese Date: Sun, 10 Jul 2016 00:00:48 +0100 Subject: [PATCH 094/247] [ASVideoPlayerNode] Ensure activity indicator view is transparent (#1852) --- AsyncDisplayKit/ASVideoPlayerNode.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index fd76f79d30..7a678831c3 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -502,6 +502,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; return spinnnerView; }]; _spinnerNode.preferredFrameSize = CGSizeMake(44.0, 44.0); + _spinnerNode.backgroundColor = [UIColor clearColor]; [self addSubnode:_spinnerNode]; [self setNeedsLayout]; From 48311aee9665063bf7bce6d73f7c7297c632a5f4 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 9 Jul 2016 16:09:35 -0700 Subject: [PATCH 095/247] [Build] Fix build issue caused by an #import change. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 18 +++++++++--------- AsyncDisplayKit/ASTableNode.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index f112662fd1..6838f16632 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -1875,12 +1875,12 @@ isa = PBXNativeTarget; buildConfigurationList = 058D09D2195D04C000B7D73C /* Build configuration list for PBXNativeTarget "AsyncDisplayKitTests" */; buildPhases = ( - 2E61B6A0DB0F436A9DDBE86F /* 📦 Check Pods Manifest.lock */, + 2E61B6A0DB0F436A9DDBE86F /* [CP] Check Pods Manifest.lock */, 058D09B8195D04C000B7D73C /* Sources */, 058D09B9195D04C000B7D73C /* Frameworks */, 058D09BA195D04C000B7D73C /* Resources */, - 3B9D88CDF51B429C8409E4B6 /* 📦 Copy Pods Resources */, - B130AB1AC0A1E5162E211C19 /* 📦 Embed Pods Frameworks */, + 3B9D88CDF51B429C8409E4B6 /* [CP] Copy Pods Resources */, + B130AB1AC0A1E5162E211C19 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -1981,14 +1981,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 2E61B6A0DB0F436A9DDBE86F /* 📦 Check Pods Manifest.lock */ = { + 2E61B6A0DB0F436A9DDBE86F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -1996,14 +1996,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - 3B9D88CDF51B429C8409E4B6 /* 📦 Copy Pods Resources */ = { + 3B9D88CDF51B429C8409E4B6 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -2011,14 +2011,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AsyncDisplayKitTests/Pods-AsyncDisplayKitTests-resources.sh\"\n"; showEnvVarsInLog = 0; }; - B130AB1AC0A1E5162E211C19 /* 📦 Embed Pods Frameworks */ = { + B130AB1AC0A1E5162E211C19 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "📦 Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/AsyncDisplayKit/ASTableNode.h b/AsyncDisplayKit/ASTableNode.h index b5ae348e51..e9508cfaf2 100644 --- a/AsyncDisplayKit/ASTableNode.h +++ b/AsyncDisplayKit/ASTableNode.h @@ -10,7 +10,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import +#import #import #import From d646d3c753193382f8ad029172d975c782ad8544 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sat, 9 Jul 2016 16:43:18 -0700 Subject: [PATCH 096/247] Use textStorageCreationBlock for resetting the text storage (#1874) --- AsyncDisplayKit/TextKit/ASTextKitContext.mm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.mm b/AsyncDisplayKit/TextKit/ASTextKitContext.mm index 7f5ed9be98..bc852b9839 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.mm @@ -23,6 +23,7 @@ NSTextContainer *_textContainer; NSAttributedString *_attributedString; + ASTextKitContextTextStorageCreationBlock _textStorageCreationBlock; } #pragma mark - Lifecycle @@ -34,7 +35,7 @@ constrainedSize:(CGSize)constrainedSize layoutManagerCreationBlock:(NSLayoutManager * (^)(void))layoutCreationBlock layoutManagerDelegate:(id)layoutManagerDelegate - textStorageCreationBlock:(NSTextStorage * (^)(NSAttributedString *attributedString))textStorageCreationBlock + textStorageCreationBlock:(ASTextKitContextTextStorageCreationBlock)textStorageCreationBlock { if (self = [super init]) { @@ -43,6 +44,7 @@ std::lock_guard l(__static_mutex); _attributedString = [attributedString copy]; + _textStorageCreationBlock = [textStorageCreationBlock copy]; // Create the TextKit component stack with our default configuration. if (textStorageCreationBlock) { @@ -79,7 +81,11 @@ - (void)_resetTextStorage { - [_textStorage setAttributedString:_attributedString]; + if (_textStorageCreationBlock) { + [_textStorage setAttributedString:_textStorageCreationBlock(_attributedString)]; + } else { + [_textStorage setAttributedString:_attributedString]; + } } #pragma mark - Setter / Getter From e7e2672472e6f6788cd32835e9f6a8b95e42352c Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sat, 9 Jul 2016 17:02:05 -0700 Subject: [PATCH 097/247] Move imageLock in braces for getting drawing parameters (#1876) --- AsyncDisplayKit/ASImageNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index e6bbf7e692..ecfea0ebe3 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -221,8 +221,8 @@ struct ASImageNodeDrawParameters { CGRect cropRect = CGRectZero; asimagenode_modification_block_t imageModificationBlock; - ASDN::MutexLocker l(_imageLock); { + ASDN::MutexLocker l(_imageLock); ASImageNodeDrawParameters drawParameter = _drawParameter; drawParameterBounds = drawParameter.bounds; From 3b2af7eb6d559b4f355556ccc3d57372bbdaeeb7 Mon Sep 17 00:00:00 2001 From: appleguy Date: Sat, 9 Jul 2016 17:20:59 -0700 Subject: [PATCH 098/247] [Build] Remove Unused Imports across all of AsyncDisplayKit. This uses a feature of AppCode. (#1875) Details on the tool are here: https://www.jetbrains.com/help/idea/2016.1/optimizing-imports.html --- AsyncDisplayKit/ASCellNode.mm | 2 -- AsyncDisplayKit/ASCollectionNode.mm | 2 -- AsyncDisplayKit/ASCollectionView.mm | 2 -- AsyncDisplayKit/ASControlNode.mm | 2 -- AsyncDisplayKit/ASDisplayNode.mm | 3 --- AsyncDisplayKit/ASEditableTextNode.mm | 1 - AsyncDisplayKit/ASImageNode+AnimatedImage.mm | 2 -- AsyncDisplayKit/ASImageNode.mm | 1 - AsyncDisplayKit/ASMapNode.mm | 2 -- AsyncDisplayKit/ASMultiplexImageNode.mm | 4 ---- AsyncDisplayKit/ASNetworkImageNode.mm | 1 - AsyncDisplayKit/ASPagerNode.m | 3 --- AsyncDisplayKit/ASTableNode.mm | 3 --- AsyncDisplayKit/ASTableView.mm | 6 ------ AsyncDisplayKit/ASVideoNode.mm | 2 -- AsyncDisplayKit/ASViewController.mm | 2 -- AsyncDisplayKit/ASVisibilityProtocols.m | 2 -- AsyncDisplayKit/Details/ASBasicImageDownloader.mm | 2 -- AsyncDisplayKit/Details/ASChangeSetDataController.m | 4 ---- AsyncDisplayKit/Details/ASCollectionDataController.mm | 1 - AsyncDisplayKit/Details/ASCollectionInternal.m | 1 - AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm | 3 --- AsyncDisplayKit/Details/ASDataController.mm | 5 ----- AsyncDisplayKit/Details/ASFlowLayoutController.mm | 1 - AsyncDisplayKit/Details/ASTraitCollection.m | 1 - AsyncDisplayKit/Details/CGRect+ASConvenience.m | 2 -- AsyncDisplayKit/Details/_ASDisplayViewAccessiblity.mm | 1 - AsyncDisplayKit/Layout/ASBackgroundLayoutSpec.mm | 1 - AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm | 1 - AsyncDisplayKit/Layout/ASInsetLayoutSpec.mm | 1 - AsyncDisplayKit/Layout/ASLayout.mm | 2 -- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 2 -- AsyncDisplayKit/Layout/ASLayoutable.mm | 6 ------ AsyncDisplayKit/Layout/ASOverlayLayoutSpec.mm | 1 - AsyncDisplayKit/Layout/ASRatioLayoutSpec.mm | 1 - AsyncDisplayKit/Layout/ASRelativeSize.mm | 1 - AsyncDisplayKit/Layout/ASStackLayoutSpec.mm | 3 --- AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm | 1 - AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm | 1 - AsyncDisplayKit/Private/ASInternalHelpers.mm | 2 -- AsyncDisplayKit/Private/ASLayoutTransition.mm | 3 --- AsyncDisplayKit/Private/ASPendingStateController.mm | 1 - AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm | 1 - AsyncDisplayKit/Private/ASStackPositionedLayout.mm | 3 --- AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm | 1 - AsyncDisplayKit/Private/ASWeakSet.m | 1 - AsyncDisplayKit/TextKit/ASTextKitRenderer+TextChecking.mm | 1 - AsyncDisplayKit/TextKit/ASTextKitRenderer.mm | 1 - AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm | 2 -- 49 files changed, 98 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index 1b9c69de5b..9dd9d27b47 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -10,7 +10,6 @@ #import "ASCellNode+Internal.h" -#import "ASInternalHelpers.h" #import "ASEqualityHelpers.h" #import "ASDisplayNodeInternal.h" #import @@ -20,7 +19,6 @@ #import #import -#import #pragma mark - #pragma mark ASCellNode diff --git a/AsyncDisplayKit/ASCollectionNode.mm b/AsyncDisplayKit/ASCollectionNode.mm index 9b54921f34..c8d7aa2573 100644 --- a/AsyncDisplayKit/ASCollectionNode.mm +++ b/AsyncDisplayKit/ASCollectionNode.mm @@ -16,9 +16,7 @@ #import "ASDisplayNode+Subclasses.h" #import "ASEnvironmentInternal.h" #import "ASInternalHelpers.h" -#import "ASRangeControllerUpdateRangeProtocol+Beta.h" #import "ASCellNode+Internal.h" -#include #pragma mark - _ASCollectionPendingState diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index f715ddc53c..d835a88a1f 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -23,8 +23,6 @@ #import "UICollectionViewLayout+ASConvenience.h" #import "ASRangeController.h" #import "ASCollectionNode.h" -#import "ASCollectionView.h" -#import "ASRangeControllerUpdateRangeProtocol+Beta.h" #import "_ASDisplayLayer.h" #import "ASCollectionViewLayoutFacilitatorProtocol.h" diff --git a/AsyncDisplayKit/ASControlNode.mm b/AsyncDisplayKit/ASControlNode.mm index a2be60e5bf..ef1bad52c6 100644 --- a/AsyncDisplayKit/ASControlNode.mm +++ b/AsyncDisplayKit/ASControlNode.mm @@ -10,8 +10,6 @@ #import "ASControlNode.h" #import "ASControlNode+Subclasses.h" -#import "ASThread.h" -#import "ASDisplayNodeExtras.h" #import "ASImageNode.h" #import "AsyncDisplayKit+Debug.h" #import "ASInternalHelpers.h" diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index da76f80e12..2de5996f92 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -14,8 +14,6 @@ #import "ASDisplayNode+Beta.h" #import -#import -#import #import "_ASAsyncTransaction.h" #import "_ASAsyncTransactionContainer+Private.h" @@ -23,7 +21,6 @@ #import "_ASDisplayView.h" #import "_ASScopeTimer.h" #import "_ASCoreAnimationExtras.h" -#import "ASLayoutTransition.h" #import "ASDisplayNodeExtras.h" #import "ASTraitCollection.h" #import "ASEqualityHelpers.h" diff --git a/AsyncDisplayKit/ASEditableTextNode.mm b/AsyncDisplayKit/ASEditableTextNode.mm index 2ea00acf12..687cebc430 100644 --- a/AsyncDisplayKit/ASEditableTextNode.mm +++ b/AsyncDisplayKit/ASEditableTextNode.mm @@ -15,7 +15,6 @@ #import "ASDisplayNode+Subclasses.h" #import "ASEqualityHelpers.h" #import "ASTextNodeWordKerner.h" -#import "ASThread.h" /** @abstract Object to hold UITextView's pending UITextInputTraits diff --git a/AsyncDisplayKit/ASImageNode+AnimatedImage.mm b/AsyncDisplayKit/ASImageNode+AnimatedImage.mm index cbaff6d42b..d64cddfb1b 100644 --- a/AsyncDisplayKit/ASImageNode+AnimatedImage.mm +++ b/AsyncDisplayKit/ASImageNode+AnimatedImage.mm @@ -13,11 +13,9 @@ #import "ASImageNode.h" #import "ASAssert.h" -#import "ASImageProtocols.h" #import "ASDisplayNode+Subclasses.h" #import "ASDisplayNodeExtras.h" #import "ASEqualityHelpers.h" -#import "ASDisplayNode+FrameworkPrivate.h" #import "ASImageNode+AnimatedImagePrivate.h" #import "ASInternalHelpers.h" #import "ASWeakProxy.h" diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index ecfea0ebe3..d32955d688 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -10,7 +10,6 @@ #import "ASImageNode.h" -#import "_ASCoreAnimationExtras.h" #import "_ASDisplayLayer.h" #import "ASAssert.h" #import "ASDisplayNode+Subclasses.h" diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index a0d1ec147a..f6fd7a87b7 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -13,8 +13,6 @@ #import "ASDisplayNode+Subclasses.h" #import "ASDisplayNodeExtras.h" #import "ASInsetLayoutSpec.h" -#import "ASCenterLayoutSpec.h" -#import "ASThread.h" #import "ASInternalHelpers.h" #import "ASLayout.h" diff --git a/AsyncDisplayKit/ASMultiplexImageNode.mm b/AsyncDisplayKit/ASMultiplexImageNode.mm index 19145359ba..9042f18870 100644 --- a/AsyncDisplayKit/ASMultiplexImageNode.mm +++ b/AsyncDisplayKit/ASMultiplexImageNode.mm @@ -13,11 +13,7 @@ #import "ASMultiplexImageNode.h" #import -#import -#import - #import "ASAvailability.h" -#import "ASBaseDefines.h" #import "ASDisplayNode+Subclasses.h" #import "ASDisplayNode+FrameworkPrivate.h" #import "ASLog.h" diff --git a/AsyncDisplayKit/ASNetworkImageNode.mm b/AsyncDisplayKit/ASNetworkImageNode.mm index 77559209c0..c66b53ea89 100755 --- a/AsyncDisplayKit/ASNetworkImageNode.mm +++ b/AsyncDisplayKit/ASNetworkImageNode.mm @@ -14,7 +14,6 @@ #import "ASDisplayNode+Subclasses.h" #import "ASDisplayNode+FrameworkPrivate.h" #import "ASEqualityHelpers.h" -#import "ASThread.h" #import "ASInternalHelpers.h" #import "ASImageContainerProtocolCategories.h" #import "ASDisplayNodeExtras.h" diff --git a/AsyncDisplayKit/ASPagerNode.m b/AsyncDisplayKit/ASPagerNode.m index b30cce61bb..b5050f4d5c 100644 --- a/AsyncDisplayKit/ASPagerNode.m +++ b/AsyncDisplayKit/ASPagerNode.m @@ -14,9 +14,6 @@ #import "ASDelegateProxy.h" #import "ASDisplayNode+Subclasses.h" #import "ASPagerFlowLayout.h" -#import "ASCollectionView.h" -#import "ASCollectionViewProtocols.h" -#import "UICollectionViewLayout+ASConvenience.h" @interface ASPagerNode () { diff --git a/AsyncDisplayKit/ASTableNode.mm b/AsyncDisplayKit/ASTableNode.mm index af74a56054..2f4de2d0cf 100644 --- a/AsyncDisplayKit/ASTableNode.mm +++ b/AsyncDisplayKit/ASTableNode.mm @@ -15,10 +15,7 @@ #import "ASEnvironmentInternal.h" #import "ASDisplayNode+Subclasses.h" #import "ASInternalHelpers.h" -#import "ASRangeControllerUpdateRangeProtocol+Beta.h" -#import "ASTableViewInternal.h" #import "ASCellNode+Internal.h" -#import "ASTableNode.h" #pragma mark - _ASTablePendingState diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 71316cc1b6..517554fb90 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -18,17 +18,11 @@ #import "ASDisplayNodeExtras.h" #import "ASDisplayNode+Beta.h" #import "ASDisplayNode+FrameworkPrivate.h" -#import "ASEnvironmentInternal.h" #import "ASInternalHelpers.h" #import "ASLayout.h" -#import "ASLayoutController.h" -#import "ASRangeController.h" -#import "ASRangeControllerUpdateRangeProtocol+Beta.h" #import "_ASDisplayLayer.h" #import "ASTableNode.h" -#import - static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 9a4869bab6..1a29eb865d 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -11,11 +11,9 @@ #import #import "ASDisplayNode+Subclasses.h" #import "ASVideoNode.h" -#import "ASDefaultPlayButton.h" #import "ASEqualityHelpers.h" #import "ASInternalHelpers.h" #import "ASDisplayNodeExtras.h" -#import "ASThread.h" static BOOL ASAssetIsEqual(AVAsset *asset1, AVAsset *asset2) { return ASObjectIsEqual(asset1, asset2) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index a9923ef9f0..bfdaefbe7c 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -13,10 +13,8 @@ #import "ASViewController.h" #import "ASAssert.h" #import "ASAvailability.h" -#import "ASDimension.h" #import "ASDisplayNodeInternal.h" #import "ASDisplayNode+FrameworkPrivate.h" -#import "ASDisplayNode+Beta.h" #import "ASTraitCollection.h" #import "ASEnvironmentInternal.h" #import "ASRangeControllerUpdateRangeProtocol+Beta.h" diff --git a/AsyncDisplayKit/ASVisibilityProtocols.m b/AsyncDisplayKit/ASVisibilityProtocols.m index 1b59dde807..62f9879e14 100644 --- a/AsyncDisplayKit/ASVisibilityProtocols.m +++ b/AsyncDisplayKit/ASVisibilityProtocols.m @@ -10,8 +10,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import - #import "ASVisibilityProtocols.h" ASLayoutRangeMode ASLayoutRangeModeForVisibilityDepth(NSUInteger visibilityDepth) diff --git a/AsyncDisplayKit/Details/ASBasicImageDownloader.mm b/AsyncDisplayKit/Details/ASBasicImageDownloader.mm index 37f32d554a..159f19b76e 100644 --- a/AsyncDisplayKit/Details/ASBasicImageDownloader.mm +++ b/AsyncDisplayKit/Details/ASBasicImageDownloader.mm @@ -12,8 +12,6 @@ #import -#import - #import "ASBasicImageDownloaderInternal.h" #import "ASThread.h" diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.m index 235ad254b9..99a5bc81b2 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.m @@ -11,12 +11,8 @@ // #import "ASChangeSetDataController.h" -#import "ASInternalHelpers.h" #import "_ASHierarchyChangeSet.h" #import "ASAssert.h" -#import "NSIndexSet+ASHelpers.h" - -#import "ASDataController+Subclasses.h" @implementation ASChangeSetDataController { NSInteger _changeSetBatchUpdateCounter; diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index c4d27c8a54..8755253673 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -13,7 +13,6 @@ #import "ASAssert.h" #import "ASMultidimensionalArrayUtils.h" #import "ASCellNode.h" -#import "ASDisplayNodeInternal.h" #import "ASDataController+Subclasses.h" #import "ASIndexedNodeContext.h" diff --git a/AsyncDisplayKit/Details/ASCollectionInternal.m b/AsyncDisplayKit/Details/ASCollectionInternal.m index e7f68bd978..fd39342a48 100644 --- a/AsyncDisplayKit/Details/ASCollectionInternal.m +++ b/AsyncDisplayKit/Details/ASCollectionInternal.m @@ -10,4 +10,3 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASCollectionInternal.h" diff --git a/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm b/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm index f7e63f3d6e..6c31beaa82 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm +++ b/AsyncDisplayKit/Details/ASCollectionViewLayoutController.mm @@ -10,13 +10,10 @@ #import "ASCollectionViewLayoutController.h" -#include - #import "ASAssert.h" #import "ASCollectionView.h" #import "CGRect+ASConvenience.h" #import "UICollectionViewLayout+ASConvenience.h" -#import "ASDisplayNodeExtras.h" struct ASRangeGeometry { CGRect rangeBounds; diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 46af3d39d8..fba864966e 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -10,14 +10,9 @@ #import "ASDataController.h" -#import - #import "ASAssert.h" #import "ASCellNode.h" -#import "ASDisplayNode.h" #import "ASEnvironmentInternal.h" -#import "ASFlowLayoutController.h" -#import "ASInternalHelpers.h" #import "ASLayout.h" #import "ASMainSerialQueue.h" #import "ASMultidimensionalArrayUtils.h" diff --git a/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/AsyncDisplayKit/Details/ASFlowLayoutController.mm index ffd553ba96..82078240b0 100644 --- a/AsyncDisplayKit/Details/ASFlowLayoutController.mm +++ b/AsyncDisplayKit/Details/ASFlowLayoutController.mm @@ -16,7 +16,6 @@ #include #include -#include @interface ASFlowLayoutController() { diff --git a/AsyncDisplayKit/Details/ASTraitCollection.m b/AsyncDisplayKit/Details/ASTraitCollection.m index 3bee2582e1..c3b83dd8ee 100644 --- a/AsyncDisplayKit/Details/ASTraitCollection.m +++ b/AsyncDisplayKit/Details/ASTraitCollection.m @@ -11,7 +11,6 @@ // #import "ASTraitCollection.h" -#import #import @implementation ASTraitCollection diff --git a/AsyncDisplayKit/Details/CGRect+ASConvenience.m b/AsyncDisplayKit/Details/CGRect+ASConvenience.m index 32ca3ca04d..76e6fbc4c1 100644 --- a/AsyncDisplayKit/Details/CGRect+ASConvenience.m +++ b/AsyncDisplayKit/Details/CGRect+ASConvenience.m @@ -9,8 +9,6 @@ // #import "CGRect+ASConvenience.h" -#import "ASScrollDirection.h" -#import "ASLayoutController.h" ASDirectionalScreenfulBuffer ASDirectionalScreenfulBufferHorizontal(ASScrollDirection scrollDirection, ASRangeTuningParameters rangeTuningParameters) diff --git a/AsyncDisplayKit/Details/_ASDisplayViewAccessiblity.mm b/AsyncDisplayKit/Details/_ASDisplayViewAccessiblity.mm index 57ddef0d59..baa2b1b7a2 100644 --- a/AsyncDisplayKit/Details/_ASDisplayViewAccessiblity.mm +++ b/AsyncDisplayKit/Details/_ASDisplayViewAccessiblity.mm @@ -8,7 +8,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "_ASDisplayViewAccessiblity.h" #import "_ASDisplayView.h" #import "ASDisplayNodeExtras.h" #import "ASDisplayNode+FrameworkPrivate.h" diff --git a/AsyncDisplayKit/Layout/ASBackgroundLayoutSpec.mm b/AsyncDisplayKit/Layout/ASBackgroundLayoutSpec.mm index 00201a79b9..99ec4061fe 100644 --- a/AsyncDisplayKit/Layout/ASBackgroundLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASBackgroundLayoutSpec.mm @@ -11,7 +11,6 @@ #import "ASBackgroundLayoutSpec.h" #import "ASAssert.h" -#import "ASBaseDefines.h" #import "ASLayout.h" static NSUInteger const kForegroundChildIndex = 0; diff --git a/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm b/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm index 8a8d7266d7..e5ffb8d6d7 100644 --- a/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASCenterLayoutSpec.mm @@ -10,7 +10,6 @@ #import "ASCenterLayoutSpec.h" -#import "ASInternalHelpers.h" #import "ASLayout.h" @implementation ASCenterLayoutSpec diff --git a/AsyncDisplayKit/Layout/ASInsetLayoutSpec.mm b/AsyncDisplayKit/Layout/ASInsetLayoutSpec.mm index 685c1a29b0..9a6a32707c 100644 --- a/AsyncDisplayKit/Layout/ASInsetLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASInsetLayoutSpec.mm @@ -11,7 +11,6 @@ #import "ASInsetLayoutSpec.h" #import "ASAssert.h" -#import "ASBaseDefines.h" #import "ASInternalHelpers.h" #import "ASLayout.h" diff --git a/AsyncDisplayKit/Layout/ASLayout.mm b/AsyncDisplayKit/Layout/ASLayout.mm index ca0033e8be..4733ac7c1d 100644 --- a/AsyncDisplayKit/Layout/ASLayout.mm +++ b/AsyncDisplayKit/Layout/ASLayout.mm @@ -10,8 +10,6 @@ #import "ASLayout.h" -#import "ASAssert.h" -#import "ASDimension.h" #import "ASInternalHelpers.h" #import "ASLayoutSpecUtilities.h" diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index eed668782e..6627587bbb 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -11,10 +11,8 @@ #import "ASLayoutSpec.h" #import "ASAssert.h" -#import "ASBaseDefines.h" #import "ASEnvironmentInternal.h" -#import "ASInternalHelpers.h" #import "ASLayout.h" #import "ASThread.h" #import "ASTraitCollection.h" diff --git a/AsyncDisplayKit/Layout/ASLayoutable.mm b/AsyncDisplayKit/Layout/ASLayoutable.mm index 0113150e84..de0f6e5cad 100644 --- a/AsyncDisplayKit/Layout/ASLayoutable.mm +++ b/AsyncDisplayKit/Layout/ASLayoutable.mm @@ -11,16 +11,10 @@ // #import "ASLayoutablePrivate.h" -#import "ASInternalHelpers.h" #import "ASEnvironmentInternal.h" #import "ASDisplayNodeInternal.h" -#import "ASTextNode.h" -#import "ASLayoutSpec.h" -#import "pthread.h" #import -#import -#import "ASThread.h" int32_t const ASLayoutableContextInvalidTransitionID = 0; int32_t const ASLayoutableContextDefaultTransitionID = ASLayoutableContextInvalidTransitionID + 1; diff --git a/AsyncDisplayKit/Layout/ASOverlayLayoutSpec.mm b/AsyncDisplayKit/Layout/ASOverlayLayoutSpec.mm index 669a5ad9eb..02f7b4d5b4 100644 --- a/AsyncDisplayKit/Layout/ASOverlayLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASOverlayLayoutSpec.mm @@ -11,7 +11,6 @@ #import "ASOverlayLayoutSpec.h" #import "ASAssert.h" -#import "ASBaseDefines.h" #import "ASLayout.h" static NSUInteger const kUnderlayChildIndex = 0; diff --git a/AsyncDisplayKit/Layout/ASRatioLayoutSpec.mm b/AsyncDisplayKit/Layout/ASRatioLayoutSpec.mm index 2825101233..8b51c71148 100644 --- a/AsyncDisplayKit/Layout/ASRatioLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASRatioLayoutSpec.mm @@ -14,7 +14,6 @@ #import #import "ASAssert.h" -#import "ASBaseDefines.h" #import "ASInternalHelpers.h" #import "ASLayout.h" diff --git a/AsyncDisplayKit/Layout/ASRelativeSize.mm b/AsyncDisplayKit/Layout/ASRelativeSize.mm index 9d08009f78..9018aedf40 100644 --- a/AsyncDisplayKit/Layout/ASRelativeSize.mm +++ b/AsyncDisplayKit/Layout/ASRelativeSize.mm @@ -9,7 +9,6 @@ // #import "ASRelativeSize.h" -#import "ASAssert.h" ASRelativeSizeRange const ASRelativeSizeRangeUnconstrained = {}; diff --git a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm index e169cf488b..8d7fe094fe 100644 --- a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm @@ -11,13 +11,10 @@ #import #import -#import "ASBaseDefines.h" #import "ASInternalHelpers.h" #import "ASLayoutSpecUtilities.h" #import "ASStackBaselinePositionedLayout.h" -#import "ASStackLayoutSpecUtilities.h" -#import "ASStackUnpositionedLayout.h" #import "ASThread.h" @implementation ASStackLayoutSpec diff --git a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm index a7e93805c0..516e79e721 100644 --- a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm @@ -11,7 +11,6 @@ #import "ASStaticLayoutSpec.h" #import "ASLayoutSpecUtilities.h" -#import "ASInternalHelpers.h" #import "ASLayout.h" @implementation ASStaticLayoutSpec diff --git a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm index 6d25d63a43..b6dfef2ab3 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm +++ b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm @@ -14,7 +14,6 @@ #import "ASAssert.h" #import "ASDisplayNodeInternal.h" #import "ASDisplayNode+FrameworkPrivate.h" -#import "ASDisplayNode+Beta.h" @interface ASDisplayNode () <_ASDisplayLayerDelegate> @end diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.mm b/AsyncDisplayKit/Private/ASInternalHelpers.mm index 4538edf1cd..94042053d7 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.mm +++ b/AsyncDisplayKit/Private/ASInternalHelpers.mm @@ -10,11 +10,9 @@ #import "ASInternalHelpers.h" -#import #import #import "ASThread.h" -#import "ASLayout.h" BOOL ASSubclassOverridesSelector(Class superclass, Class subclass, SEL selector) { diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index 919378a8ca..e719f9a60e 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -12,12 +12,9 @@ #import "ASLayoutTransition.h" -#import "ASDisplayNode.h" #import "ASDisplayNodeInternal.h" -#import "ASDisplayNode+Subclasses.h" #import "ASLayout.h" -#import #import #import "NSArray+Diffing.h" diff --git a/AsyncDisplayKit/Private/ASPendingStateController.mm b/AsyncDisplayKit/Private/ASPendingStateController.mm index 7874924d36..e02e1e5ee0 100644 --- a/AsyncDisplayKit/Private/ASPendingStateController.mm +++ b/AsyncDisplayKit/Private/ASPendingStateController.mm @@ -13,7 +13,6 @@ #import "ASPendingStateController.h" #import "ASThread.h" #import "ASWeakSet.h" -#import "ASAssert.h" #import "ASDisplayNodeInternal.h" @interface ASPendingStateController() diff --git a/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm b/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm index 19b6167358..4dc3e194f2 100644 --- a/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm +++ b/AsyncDisplayKit/Private/ASStackBaselinePositionedLayout.mm @@ -11,7 +11,6 @@ #import "ASStackBaselinePositionedLayout.h" #import "ASLayoutSpecUtilities.h" -#import "ASStackLayoutSpecUtilities.h" static CGFloat baselineForItem(const ASStackLayoutSpecStyle &style, const ASLayout *layout) { diff --git a/AsyncDisplayKit/Private/ASStackPositionedLayout.mm b/AsyncDisplayKit/Private/ASStackPositionedLayout.mm index 2f13b23d6b..82cc1608be 100644 --- a/AsyncDisplayKit/Private/ASStackPositionedLayout.mm +++ b/AsyncDisplayKit/Private/ASStackPositionedLayout.mm @@ -12,9 +12,6 @@ #import "ASInternalHelpers.h" #import "ASLayoutSpecUtilities.h" -#import "ASStackLayoutSpecUtilities.h" -#import "ASLayoutable.h" -#import "ASAssert.h" static CGFloat crossOffset(const ASStackLayoutSpecStyle &style, const ASStackUnpositionedItem &l, diff --git a/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm b/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm index 7df078ae55..9e143ae139 100644 --- a/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm +++ b/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm @@ -13,7 +13,6 @@ #import #import "ASLayoutSpecUtilities.h" -#import "ASStackLayoutSpecUtilities.h" /** Sizes the child given the parameters specified, and returns the computed layout. diff --git a/AsyncDisplayKit/Private/ASWeakSet.m b/AsyncDisplayKit/Private/ASWeakSet.m index 62eccf61fa..773af682fd 100644 --- a/AsyncDisplayKit/Private/ASWeakSet.m +++ b/AsyncDisplayKit/Private/ASWeakSet.m @@ -11,7 +11,6 @@ // #import "ASWeakSet.h" -#import @interface ASWeakSet<__covariant ObjectType> () @property (nonatomic, strong, readonly) NSMapTable *mapTable; diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer+TextChecking.mm b/AsyncDisplayKit/TextKit/ASTextKitRenderer+TextChecking.mm index 83fb9706bf..23b181f8bc 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer+TextChecking.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer+TextChecking.mm @@ -10,7 +10,6 @@ #import "ASTextKitRenderer+TextChecking.h" -#import "ASTextKitAttributes.h" #import "ASTextKitEntityAttribute.h" #import "ASTextKitRenderer+Positioning.h" #import "ASTextKitTailTruncater.h" diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm index ef32d0dc40..fc7948093b 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm @@ -16,7 +16,6 @@ #import "ASTextKitShadower.h" #import "ASTextKitTailTruncater.h" #import "ASTextKitFontSizeAdjuster.h" -#import "ASTextKitTruncating.h" //#define LOG(...) NSLog(__VA_ARGS__) #define LOG(...) diff --git a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm index e44ed03ef5..92aa7527e3 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm @@ -8,8 +8,6 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASAssert.h" - #import "ASTextKitContext.h" #import "ASTextKitTailTruncater.h" From dc12042589794b9bd4bbb4d477ca83576d83fe23 Mon Sep 17 00:00:00 2001 From: appleguy Date: Sat, 9 Jul 2016 21:16:29 -0700 Subject: [PATCH 099/247] [ASDisplayNode] Do not start measurement for a transition if we have never been provided a constrainedSize. (#1844) --- AsyncDisplayKit/ASDisplayNode.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 2de5996f92..31c770cae6 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -695,6 +695,11 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) shouldMeasureAsync:(BOOL)shouldMeasureAsync measurementCompletion:(void(^)())completion { + if (_layout == nil) { + // constrainedSizeRange returns a struct and is invalid to call on nil. + // Defaulting to CGSizeZero can cause negative values in client layout code. + return; + } [self invalidateCalculatedLayout]; [self transitionLayoutWithSizeRange:_layout.constrainedSizeRange animated:animated From 131dd25de39b2a4f718ffc2398dea0425d253154 Mon Sep 17 00:00:00 2001 From: Flo Date: Sun, 10 Jul 2016 06:19:57 +0200 Subject: [PATCH 100/247] [ASNetworkImageNode] Check that data is not nil before loading the animated image. (#1849) --- AsyncDisplayKit/ASNetworkImageNode.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASNetworkImageNode.mm b/AsyncDisplayKit/ASNetworkImageNode.mm index c66b53ea89..aa33179d2a 100755 --- a/AsyncDisplayKit/ASNetworkImageNode.mm +++ b/AsyncDisplayKit/ASNetworkImageNode.mm @@ -479,10 +479,12 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; id animatedImage = nil; if (_downloaderFlags.downloaderImplementsAnimatedImage) { NSData *data = [NSData dataWithContentsOfURL:_URL]; - animatedImage = [_downloader animatedImageWithData:data]; + if (data != nil) { + animatedImage = [_downloader animatedImageWithData:data]; - if ([animatedImage respondsToSelector:@selector(isDataSupported:)] && [animatedImage isDataSupported:data] == NO) { - animatedImage = nil; + if ([animatedImage respondsToSelector:@selector(isDataSupported:)] && [animatedImage isDataSupported:data] == NO) { + animatedImage = nil; + } } } From f39c2ce7e306bbc75ccd6adc1f34774a7d7fe172 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sat, 9 Jul 2016 22:08:34 -0700 Subject: [PATCH 101/247] [ASTextNode, ASImageNode, ASVideoNode] Use ASDisplayNode base class lock for subclass property synchronization (#1877) * [ASTextNode, ASVideoNode] Use ASDisplayNode base class lock for subclass property synchronization * fix headers to match master * address @appleguy, @maicki comments * import header * Swap lock in ASNetworkImageNode as well * remove invalid comment * more cleanup of locks --- AsyncDisplayKit/ASImageNode.mm | 41 ++++++------ AsyncDisplayKit/ASNetworkImageNode.mm | 81 ++++++++++------------- AsyncDisplayKit/ASTextNode.mm | 92 +++++++++++++-------------- AsyncDisplayKit/ASVideoNode.mm | 53 ++++++++------- 4 files changed, 123 insertions(+), 144 deletions(-) diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index d32955d688..9704cfe8ef 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -44,7 +44,6 @@ struct ASImageNodeDrawParameters { UIImage *_image; void (^_displayCompletionBlock)(BOOL canceled); - ASDN::RecursiveMutex _imageLock; // Drawing ASImageNodeDrawParameters _drawParameter; @@ -119,7 +118,7 @@ struct ASImageNodeDrawParameters { - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); // if a preferredFrameSize is set, call the superclass to return that instead of using the image size. if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO) return [super calculateSizeThatFits:constrainedSize]; @@ -133,11 +132,9 @@ struct ASImageNodeDrawParameters { - (void)setImage:(UIImage *)image { - _imageLock.lock(); + ASDN::MutexLocker l(_propertyLock); if (!ASObjectIsEqual(_image, image)) { _image = image; - - _imageLock.unlock(); [self invalidateCalculatedLayout]; if (image) { @@ -153,14 +150,12 @@ struct ASImageNodeDrawParameters { } else { self.contents = nil; } - } else { - _imageLock.unlock(); // We avoid using MutexUnlocker as it needlessly re-locks at the end of the scope. } } - (UIImage *)image { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); return _image; } @@ -176,7 +171,7 @@ struct ASImageNodeDrawParameters { - (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); _drawParameter = { .bounds = self.bounds, @@ -221,7 +216,7 @@ struct ASImageNodeDrawParameters { asimagenode_modification_block_t imageModificationBlock; { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); ASImageNodeDrawParameters drawParameter = _drawParameter; drawParameterBounds = drawParameter.bounds; @@ -356,19 +351,19 @@ struct ASImageNodeDrawParameters { { [super displayDidFinish]; - _imageLock.lock(); + _propertyLock.lock(); void (^displayCompletionBlock)(BOOL canceled) = _displayCompletionBlock; UIImage *image = _image; - _imageLock.unlock(); + _propertyLock.unlock(); // If we've got a block to perform after displaying, do it. if (image && displayCompletionBlock) { displayCompletionBlock(NO); - _imageLock.lock(); + _propertyLock.lock(); _displayCompletionBlock = nil; - _imageLock.unlock(); + _propertyLock.unlock(); } } @@ -381,7 +376,7 @@ struct ASImageNodeDrawParameters { } // Stash the block and call-site queue. We'll invoke it in -displayDidFinish. - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); if (_displayCompletionBlock != displayCompletionBlock) { _displayCompletionBlock = [displayCompletionBlock copy]; } @@ -393,7 +388,7 @@ struct ASImageNodeDrawParameters { - (BOOL)isCropEnabled { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); return _cropEnabled; } @@ -404,7 +399,7 @@ struct ASImageNodeDrawParameters { - (void)setCropEnabled:(BOOL)cropEnabled recropImmediately:(BOOL)recropImmediately inBounds:(CGRect)cropBounds { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); if (_cropEnabled == cropEnabled) return; @@ -425,13 +420,13 @@ struct ASImageNodeDrawParameters { - (CGRect)cropRect { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); return _cropRect; } - (void)setCropRect:(CGRect)cropRect { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); if (CGRectEqualToRect(_cropRect, cropRect)) return; @@ -452,25 +447,25 @@ struct ASImageNodeDrawParameters { - (BOOL)forceUpscaling { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); return _forceUpscaling; } - (void)setForceUpscaling:(BOOL)forceUpscaling { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); _forceUpscaling = forceUpscaling; } - (asimagenode_modification_block_t)imageModificationBlock { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); return _imageModificationBlock; } - (void)setImageModificationBlock:(asimagenode_modification_block_t)imageModificationBlock { - ASDN::MutexLocker l(_imageLock); + ASDN::MutexLocker l(_propertyLock); _imageModificationBlock = imageModificationBlock; } diff --git a/AsyncDisplayKit/ASNetworkImageNode.mm b/AsyncDisplayKit/ASNetworkImageNode.mm index aa33179d2a..67696883a1 100755 --- a/AsyncDisplayKit/ASNetworkImageNode.mm +++ b/AsyncDisplayKit/ASNetworkImageNode.mm @@ -11,6 +11,7 @@ #import "ASNetworkImageNode.h" #import "ASBasicImageDownloader.h" +#import "ASDisplayNodeInternal.h" #import "ASDisplayNode+Subclasses.h" #import "ASDisplayNode+FrameworkPrivate.h" #import "ASEqualityHelpers.h" @@ -26,11 +27,10 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; @interface ASNetworkImageNode () { - ASDN::RecursiveMutex _lock; __weak id _cache; __weak id _downloader; - // Only access any of these with _lock. + // Only access any of these with _propertyLock. __weak id _delegate; NSURL *_URL; @@ -121,7 +121,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (void)setURL:(NSURL *)URL resetToDefault:(BOOL)reset { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); if (ASObjectIsEqual(URL, _URL)) { return; @@ -150,16 +150,15 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (NSURL *)URL { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); return _URL; } - (void)setDefaultImage:(UIImage *)defaultImage { - _lock.lock(); + ASDN::MutexLocker l(_propertyLock); if (ASObjectIsEqual(defaultImage, _defaultImage)) { - _lock.unlock(); return; } _defaultImage = defaultImage; @@ -172,49 +171,43 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; dispatch_async(dispatch_get_main_queue(), ^{ self.currentImageQuality = hasURL ? 0.0 : 1.0; }); - _lock.unlock(); - // Locking: it is important to release _lock before entering setImage:, as it needs to release the lock before -invalidateCalculatedLayout. - // If we continue to hold the lock here, it will still be locked until the next unlock() call, causing a possible deadlock with - // -[ASNetworkImageNode displayWillStart] (which is called on a different thread / main, at an unpredictable time due to ASMainRunloopQueue). self.image = defaultImage; - } else { - _lock.unlock(); } } - (UIImage *)defaultImage { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); return _defaultImage; } - (void)setCurrentImageQuality:(CGFloat)currentImageQuality { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); _currentImageQuality = currentImageQuality; } - (CGFloat)currentImageQuality { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); return _currentImageQuality; } - (void)setRenderedImageQuality:(CGFloat)renderedImageQuality { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); _renderedImageQuality = renderedImageQuality; } - (CGFloat)renderedImageQuality { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); return _renderedImageQuality; } - (void)setDelegate:(id)delegate { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); _delegate = delegate; _delegateFlags.delegateDidStartFetchingData = [delegate respondsToSelector:@selector(imageNodeDidStartFetchingData:)]; @@ -225,13 +218,13 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (id)delegate { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); return _delegate; } - (void)setShouldRenderProgressImages:(BOOL)shouldRenderProgressImages { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); if (shouldRenderProgressImages == _shouldRenderProgressImages) { return; } @@ -239,19 +232,19 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; _shouldRenderProgressImages = shouldRenderProgressImages; - ASDN::MutexUnlocker u(_lock); + ASDN::MutexUnlocker u(_propertyLock); [self _updateProgressImageBlockOnDownloaderIfNeeded]; } - (BOOL)shouldRenderProgressImages { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); return _shouldRenderProgressImages; } - (BOOL)placeholderShouldPersist { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); return (self.image == nil && _URL != nil); } @@ -262,7 +255,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super displayWillStart]; if (_cacheFlags.cacheSupportsSynchronousFetch) { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); if (_imageLoaded == NO && _URL && _downloadIdentifier == nil) { UIImage *result = [[_cache synchronouslyFetchedCachedImageWithURL:_URL] asdk_image]; if (result) { @@ -279,7 +272,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [self fetchData]; if (self.image == nil && _downloaderFlags.downloaderImplementsSetPriority) { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); if (_downloadIdentifier != nil) { [_downloader setPriority:ASImageDownloaderPriorityImminent withDownloadIdentifier:_downloadIdentifier]; } @@ -293,7 +286,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super visibleStateDidChange:isVisible]; if (_downloaderFlags.downloaderImplementsSetPriority) { - _lock.lock(); + ASDN::MutexLocker l(_propertyLock); if (_downloadIdentifier != nil) { if (isVisible) { [_downloader setPriority:ASImageDownloaderPriorityVisible withDownloadIdentifier:_downloadIdentifier]; @@ -301,10 +294,8 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [_downloader setPriority:ASImageDownloaderPriorityPreload withDownloadIdentifier:_downloadIdentifier]; } } - _lock.unlock(); } - // This method has to be called without _lock held [self _updateProgressImageBlockOnDownloaderIfNeeded]; } @@ -313,7 +304,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super clearFetchedData]; { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); [self _cancelImageDownload]; [self _clearImage]; @@ -328,24 +319,19 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super fetchData]; { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); [self _lazilyLoadImageIfNecessary]; } } #pragma mark - Private methods -- only call with lock. -/** - @note: This should be called without _lock held. We will lock - super to read our interface state and it's best to avoid acquiring both locks. - */ - (void)_updateProgressImageBlockOnDownloaderIfNeeded { - BOOL shouldRenderProgressImages = self.shouldRenderProgressImages; + ASDN::MutexLocker l(_propertyLock); - // Read our interface state before locking so that we don't lock super while holding our lock. + BOOL shouldRenderProgressImages = _shouldRenderProgressImages; ASInterfaceState interfaceState = self.interfaceState; - ASDN::MutexLocker l(_lock); if (!_downloaderFlags.downloaderImplementsSetProgress || _downloadIdentifier == nil) { return; @@ -360,14 +346,15 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; return; } - ASDN::MutexLocker l(strongSelf->_lock); + ASDN::MutexLocker l(strongSelf->_propertyLock); //Getting a result back for a different download identifier, download must not have been successfully canceled if (ASObjectIsEqual(strongSelf->_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) { return; } strongSelf.image = progressImage; dispatch_async(dispatch_get_main_queue(), ^{ - strongSelf->_currentImageQuality = progress; + // See comment in -displayDidFinish for why this must be dispatched to main + strongSelf.currentImageQuality = progress; }); }; } @@ -391,6 +378,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; self.animatedImage = nil; self.image = _defaultImage; _imageLoaded = NO; + // See comment in -displayDidFinish for why this must be dispatched to main dispatch_async(dispatch_get_main_queue(), ^{ self.currentImageQuality = 0.0; }); @@ -413,7 +401,8 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (void)_downloadImageWithCompletion:(void (^)(id imageContainer, NSError*, id downloadIdentifier))finished { ASPerformBlockOnBackgroundThread(^{ - _lock.lock(); + + ASDN::MutexLocker l(_propertyLock); if (_downloaderFlags.downloaderSupportsNewProtocol) { _downloadIdentifier = [_downloader downloadImageWithURL:_URL callbackQueue:dispatch_get_main_queue() @@ -436,9 +425,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; }]; #pragma clang diagnostic pop } - _lock.unlock(); - - // This method has to be called without _lock held + [self _updateProgressImageBlockOnDownloaderIfNeeded]; }); @@ -449,7 +436,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; // FIXME: We should revisit locking in this method (e.g. to access the instance variables at the top, and holding lock while calling delegate) if (!_imageLoaded && _URL != nil && _downloadIdentifier == nil) { { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); if (_delegateFlags.delegateDidStartFetchingData) { [_delegate imageNodeDidStartFetchingData:self]; } @@ -457,7 +444,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; if (_URL.isFileURL) { { - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); dispatch_async(dispatch_get_main_queue(), ^{ if (self.shouldCacheImage) { @@ -515,7 +502,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; return; } - ASDN::MutexLocker l(strongSelf->_lock); + ASDN::MutexLocker l(strongSelf->_propertyLock); //Getting a result back for a different download identifier, download must not have been successfully canceled if (ASObjectIsEqual(strongSelf->_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) { @@ -592,7 +579,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; { [super displayDidFinish]; - ASDN::MutexLocker l(_lock); + ASDN::MutexLocker l(_propertyLock); if (_delegateFlags.delegateDidFinishDecoding && self.layer.contents != nil) { /* We store the image quality in _currentImageQuality whenever _image is set. On the following displayDidFinish, we'll know that _currentImageQuality is the quality of the image that has just finished rendering. In order for this to be accurate, we diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index e77b1b2bf2..28fb35764a 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -57,8 +57,6 @@ struct ASTextNodeDrawParameter { NSRange _highlightRange; ASHighlightOverlayLayer *_activeHighlightLayer; - std::recursive_mutex _textLock; - CGSize _constrainedSize; ASTextKitRenderer *_renderer; @@ -153,7 +151,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (NSString *)description { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); NSString *plainString = [[_attributedText string] stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]]; NSString *truncationString = [_composedTruncationText string]; @@ -222,7 +220,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (ASTextKitRenderer *)_rendererWithBounds:(CGRect)bounds { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_renderer == nil) { CGSize constrainedSize = _constrainedSize.width != -INFINITY ? _constrainedSize : bounds.size; @@ -234,7 +232,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (ASTextKitAttributes)_rendererAttributes { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return { .attributedString = _attributedText, @@ -260,7 +258,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // so our previous layout information is invalid, and TextKit may draw at the // incorrect origin. { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); _constrainedSize = CGSizeMake(-INFINITY, -INFINITY); } [self _invalidateRenderer]; @@ -269,7 +267,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)_invalidateRenderer { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_renderer) { // Destruction of the layout managers/containers/text storage is quite @@ -288,7 +286,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (BOOL)_needInvalidateRendererForBoundsSize:(CGSize)boundsSize { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_renderer == nil) { return YES; @@ -327,7 +325,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; ASLayout *layout = self.calculatedLayout; if (layout != nil) { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); _constrainedSize = layout.size; _renderer.constrainedSize = layout.size; } @@ -338,7 +336,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; ASDisplayNodeAssert(constrainedSize.width >= 0, @"Constrained width for text (%f) is too narrow", constrainedSize.width); ASDisplayNodeAssert(constrainedSize.height >= 0, @"Constrained height for text (%f) is too short", constrainedSize.height); - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); _constrainedSize = constrainedSize; @@ -373,7 +371,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // Don't hold textLock for too long. { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (ASObjectIsEqual(attributedText, _attributedText)) { return; } @@ -411,7 +409,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)setExclusionPaths:(NSArray *)exclusionPaths { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (ASObjectIsEqual(exclusionPaths, _exclusionPaths)) { return; @@ -425,7 +423,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (NSArray *)exclusionPaths { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return _exclusionPaths; } @@ -434,7 +432,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); _drawParameter = { .backgroundColor = self.backgroundColor, @@ -446,7 +444,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)drawRect:(CGRect)bounds withParameters:(id )p isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing; { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); ASTextNodeDrawParameter drawParameter = _drawParameter; CGRect drawParameterBounds = drawParameter.bounds; @@ -499,7 +497,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; { ASDisplayNodeAssertMainThread(); - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); ASTextKitRenderer *renderer = [self _renderer]; NSRange visibleRange = renderer.firstVisibleRange; @@ -626,14 +624,14 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (ASTextNodeHighlightStyle)highlightStyle { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return _highlightStyle; } - (void)setHighlightStyle:(ASTextNodeHighlightStyle)highlightStyle { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); _highlightStyle = highlightStyle; } @@ -717,7 +715,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; } if (highlightTargetLayer != nil) { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); NSArray *highlightRects = [[self _renderer] rectsForTextRange:highlightRange measureOption:ASTextKitRendererMeasureOptionBlock]; NSMutableArray *converted = [NSMutableArray arrayWithCapacity:highlightRects.count]; @@ -797,7 +795,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (NSArray *)_rectsForTextRange:(NSRange)textRange measureOption:(ASTextKitRendererMeasureOption)measureOption { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); NSArray *rects = [[self _renderer] rectsForTextRange:textRange measureOption:measureOption]; NSMutableArray *adjustedRects = [NSMutableArray array]; @@ -815,7 +813,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGRect)trailingRect { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); CGRect rect = [[self _renderer] trailingRect]; return ASTextNodeAdjustRenderRectForShadowPadding(rect, self.shadowPadding); @@ -823,7 +821,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGRect)frameForTextRange:(NSRange)textRange { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); CGRect frame = [[self _renderer] frameForTextRange:textRange]; return ASTextNodeAdjustRenderRectForShadowPadding(frame, self.shadowPadding); @@ -833,7 +831,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (void)setPlaceholderColor:(UIColor *)placeholderColor { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); _placeholderColor = placeholderColor; @@ -850,7 +848,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI return nil; } - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); UIGraphicsBeginImageContext(size); [self.placeholderColor setFill]; @@ -932,7 +930,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI if (inAdditionalTruncationMessage) { NSRange visibleRange = NSMakeRange(0, 0); { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); visibleRange = [self _renderer].firstVisibleRange; } NSRange truncationMessageRange = [self _additionalTruncationMessageRangeWithVisibleRange:visibleRange]; @@ -1011,14 +1009,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (BOOL)_pendingLinkTap { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return (_highlightedLinkAttributeValue != nil && ![self _pendingTruncationTap]) && _delegate != nil; } - (BOOL)_pendingTruncationTap { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return [_highlightedLinkAttributeName isEqualToString:ASTextNodeTruncationTokenAttributeName]; } @@ -1027,14 +1025,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGColorRef)shadowColor { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return _shadowColor; } - (void)setShadowColor:(CGColorRef)shadowColor { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_shadowColor != shadowColor) { if (shadowColor != NULL) { @@ -1048,14 +1046,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGSize)shadowOffset { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return _shadowOffset; } - (void)setShadowOffset:(CGSize)shadowOffset { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (!CGSizeEqualToSize(_shadowOffset, shadowOffset)) { _shadowOffset = shadowOffset; @@ -1066,14 +1064,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGFloat)shadowOpacity { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return _shadowOpacity; } - (void)setShadowOpacity:(CGFloat)shadowOpacity { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_shadowOpacity != shadowOpacity) { _shadowOpacity = shadowOpacity; @@ -1084,14 +1082,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGFloat)shadowRadius { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return _shadowRadius; } - (void)setShadowRadius:(CGFloat)shadowRadius { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_shadowRadius != shadowRadius) { _shadowRadius = shadowRadius; @@ -1107,7 +1105,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (UIEdgeInsets)shadowPaddingWithRenderer:(ASTextKitRenderer *)renderer { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return renderer.shadower.shadowPadding; } @@ -1126,7 +1124,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setTruncationAttributedText:(NSAttributedString *)truncationAttributedText { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (ASObjectIsEqual(_truncationAttributedText, truncationAttributedText)) { return; @@ -1138,7 +1136,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setAdditionalTruncationMessage:(NSAttributedString *)additionalTruncationMessage { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (ASObjectIsEqual(_additionalTruncationMessage, additionalTruncationMessage)) { return; @@ -1150,7 +1148,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setTruncationMode:(NSLineBreakMode)truncationMode { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_truncationMode != truncationMode) { _truncationMode = truncationMode; @@ -1161,7 +1159,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (BOOL)isTruncated { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); ASTextKitRenderer *renderer = [self _renderer]; return renderer.firstVisibleRange.length < _attributedText.length; @@ -1169,7 +1167,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setPointSizeScaleFactors:(NSArray *)pointSizeScaleFactors { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if ([_pointSizeScaleFactors isEqualToArray:pointSizeScaleFactors] == NO) { _pointSizeScaleFactors = pointSizeScaleFactors; @@ -1179,7 +1177,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setMaximumNumberOfLines:(NSUInteger)maximumNumberOfLines { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); if (_maximumNumberOfLines != maximumNumberOfLines) { _maximumNumberOfLines = maximumNumberOfLines; @@ -1190,7 +1188,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (NSUInteger)lineCount { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); return [[self _renderer] lineCount]; } @@ -1199,7 +1197,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)_updateComposedTruncationText { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); _composedTruncationText = [self _prepareTruncationStringForDrawing:[self _composedTruncationText]]; } @@ -1217,7 +1215,7 @@ static NSAttributedString *DefaultTruncationAttributedString() */ - (NSRange)_additionalTruncationMessageRangeWithVisibleRange:(NSRange)visibleRange { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); // Check if we even have an additional truncation message. if (!_additionalTruncationMessage) { @@ -1240,7 +1238,7 @@ static NSAttributedString *DefaultTruncationAttributedString() */ - (NSAttributedString *)_composedTruncationText { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); //If we have neither return the default if (!_additionalTruncationMessage && !_truncationAttributedText) { @@ -1270,7 +1268,7 @@ static NSAttributedString *DefaultTruncationAttributedString() */ - (NSAttributedString *)_prepareTruncationStringForDrawing:(NSAttributedString *)truncationString { - std::lock_guard l(_textLock); + ASDN::MutexLocker l(_propertyLock); truncationString = ASCleanseAttributedStringOfCoreTextAttributes(truncationString); NSMutableAttributedString *truncationMutableString = [truncationString mutableCopy]; diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 1a29eb865d..7e0c9050da 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -9,6 +9,7 @@ // #if TARGET_OS_IOS #import +#import "ASDisplayNodeInternal.h" #import "ASDisplayNode+Subclasses.h" #import "ASVideoNode.h" #import "ASEqualityHelpers.h" @@ -39,8 +40,6 @@ static NSString * const kStatus = @"status"; @interface ASVideoNode () { - ASDN::RecursiveMutex _videoLock; - __weak id _delegate; struct { unsigned int delegateVideNodeShouldChangePlayerStateTo:1; @@ -122,7 +121,7 @@ static NSString * const kStatus = @"status"; - (AVPlayerItem *)constructPlayerItem { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (_asset != nil) { return [[AVPlayerItem alloc] initWithAsset:_asset]; @@ -210,7 +209,7 @@ static NSString * const kStatus = @"status"; - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); CGSize calculatedSize = constrainedSize; // if a preferredFrameSize is set, call the superclass to return that instead of using the image size. @@ -273,7 +272,7 @@ static NSString * const kStatus = @"status"; - (void)setVideoPlaceholderImage:(UIImage *)image { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (image != nil) { self.contentMode = ASContentModeFromVideoGravity(_gravity); } @@ -282,7 +281,7 @@ static NSString * const kStatus = @"status"; - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (object != _currentPlayerItem) { return; @@ -335,7 +334,7 @@ static NSString * const kStatus = @"status"; { [super fetchData]; - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); AVAsset *asset = self.asset; // Return immediately if the asset is nil; if (asset == nil || self.playerState == ASVideoNodePlayerStateInitialLoading) { @@ -385,7 +384,7 @@ static NSString * const kStatus = @"status"; [super clearFetchedData]; { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); self.player = nil; self.currentItem = nil; @@ -396,7 +395,7 @@ static NSString * const kStatus = @"status"; { [super visibleStateDidChange:isVisible]; - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (isVisible) { if (_shouldBePlaying || _shouldAutoplay) { @@ -413,7 +412,7 @@ static NSString * const kStatus = @"status"; - (void)setPlayerState:(ASVideoNodePlayerState)playerState { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); ASVideoNodePlayerState oldState = _playerState; @@ -430,7 +429,7 @@ static NSString * const kStatus = @"status"; - (void)setAsset:(AVAsset *)asset { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (ASAssetIsEqual(asset, _asset)) { return; @@ -445,13 +444,13 @@ static NSString * const kStatus = @"status"; - (AVAsset *)asset { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return _asset; } - (AVPlayer *)player { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return _player; } @@ -489,7 +488,7 @@ static NSString * const kStatus = @"status"; - (void)setGravity:(NSString *)gravity { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (_playerNode.isNodeLoaded) { ((AVPlayerLayer *)_playerNode.layer).videoGravity = gravity; } @@ -499,19 +498,19 @@ static NSString * const kStatus = @"status"; - (NSString *)gravity { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return _gravity; } - (BOOL)muted { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return _muted; } - (void)setMuted:(BOOL)muted { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); _player.muted = muted; _muted = muted; @@ -521,7 +520,7 @@ static NSString * const kStatus = @"status"; - (void)play { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (![self isStateChangeValid:ASVideoNodePlayerStatePlaying]) { return; @@ -558,7 +557,7 @@ static NSString * const kStatus = @"status"; - (void)pause { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); if (![self isStateChangeValid:ASVideoNodePlayerStatePaused]) { return; } @@ -569,7 +568,7 @@ static NSString * const kStatus = @"status"; - (BOOL)isPlaying { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return (_player.rate > 0 && !_player.error); } @@ -637,13 +636,13 @@ static NSString * const kStatus = @"status"; - (AVPlayerItem *)currentItem { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return _currentPlayerItem; } - (void)setCurrentItem:(AVPlayerItem *)currentItem { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); [self removePlayerItemObservers:_currentPlayerItem]; @@ -656,13 +655,13 @@ static NSString * const kStatus = @"status"; - (ASDisplayNode *)playerNode { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return _playerNode; } - (void)setPlayerNode:(ASDisplayNode *)playerNode { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); _playerNode = playerNode; [self setNeedsLayout]; @@ -670,7 +669,7 @@ static NSString * const kStatus = @"status"; - (void)setPlayer:(AVPlayer *)player { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); _player = player; player.muted = _muted; ((AVPlayerLayer *)_playerNode.layer).player = player; @@ -678,13 +677,13 @@ static NSString * const kStatus = @"status"; - (BOOL)shouldBePlaying { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); return _shouldBePlaying; } - (void)setShouldBePlaying:(BOOL)shouldBePlaying { - ASDN::MutexLocker l(_videoLock); + ASDN::MutexLocker l(_propertyLock); _shouldBePlaying = shouldBePlaying; } From 3efd01a781b60d3f4913960de3d71770ede14782 Mon Sep 17 00:00:00 2001 From: Eric Horacek Date: Sat, 9 Jul 2016 22:46:29 -0700 Subject: [PATCH 102/247] [ASCollectionDataController] Repopulate deleted supplementary nodes if necessary (#1773) * Repopulate deleted supplementary nodes if necessary Fixes 1771 * Fix warning --- .../Details/ASCollectionDataController.mm | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index 8755253673..2a0978cbbd 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -154,11 +154,32 @@ } } +- (void)prepareForDeleteRowsAtIndexPaths:(NSArray *)indexPaths +{ + for (NSString *kind in [self supplementaryKinds]) { + NSMutableArray *contexts = [NSMutableArray array]; + [self _populateSupplementaryNodesOfKind:kind atIndexPaths:indexPaths mutableContexts:contexts]; + _pendingContexts[kind] = contexts; + } +} + - (void)willDeleteRowsAtIndexPaths:(NSArray *)indexPaths { for (NSString *kind in [self supplementaryKinds]) { NSArray *deletedIndexPaths = ASIndexPathsInMultidimensionalArrayIntersectingIndexPaths([self editingNodesOfKind:kind], indexPaths); + [self deleteNodesOfKind:kind atIndexPaths:deletedIndexPaths completion:nil]; + + // If any of the contexts remain after the deletion, re-insert them, e.g. + // UICollectionElementKindSectionHeader remains even if item 0 is deleted. + NSArray *contexts = [_pendingContexts[kind] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^(ASIndexedNodeContext *context, NSDictionary *_) { + return [deletedIndexPaths containsObject:context.indexPath]; + }]]; + + [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; + }]; + [_pendingContexts removeObjectForKey:kind]; } } From 1d07759c9ecd81c70862d315dc72e66d42590527 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 9 Jul 2016 23:50:40 -0700 Subject: [PATCH 103/247] [ASDisplayNode+AsyncDisplay] Add locking for _flags (although write-once-on-init, this quiets the Thread Sanitizer). --- .../Private/ASDisplayNode+AsyncDisplay.mm | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm index b6dfef2ab3..55653db946 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm +++ b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm @@ -182,7 +182,11 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, - (asyncdisplaykit_async_transaction_operation_block_t)_displayBlockWithAsynchronous:(BOOL)asynchronous isCancelledBlock:(asdisplaynode_iscancelled_block_t)isCancelledBlock rasterizing:(BOOL)rasterizing { asyncdisplaykit_async_transaction_operation_block_t displayBlock = nil; - + ASDisplayNodeFlags flags; + _propertyLock.lock(); + flags = _flags; + _propertyLock.unlock(); + ASDisplayNodeAssert(rasterizing || !(_hierarchyState & ASHierarchyStateRasterized), @"Rasterized descendants should never display unless being drawn into the rasterized container."); if (!rasterizing && self.shouldRasterizeDescendants) { @@ -226,7 +230,7 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, return image; }; - } else if (_flags.implementsInstanceImageDisplay || _flags.implementsImageDisplay) { + } else if (flags.implementsInstanceImageDisplay || flags.implementsImageDisplay) { // Capture drawParameters from delegate on main thread id drawParameters = [self drawParameters]; @@ -242,7 +246,7 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, UIImage *result = nil; //We can't call _willDisplayNodeContentWithRenderingContext or _didDisplayNodeContentWithRenderingContext because we don't //have a context. We rely on implementors of displayWithParameters:isCancelled: to call - if (_flags.implementsInstanceImageDisplay) { + if (flags.implementsInstanceImageDisplay) { result = [self displayWithParameters:drawParameters isCancelled:isCancelledBlock]; } else { result = [[self class] displayWithParameters:drawParameters isCancelled:isCancelledBlock]; @@ -251,7 +255,7 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, return result; }; - } else if (_flags.implementsInstanceDrawRect || _flags.implementsDrawRect) { + } else if (flags.implementsInstanceDrawRect || flags.implementsDrawRect) { CGRect bounds = self.bounds; if (CGRectIsEmpty(bounds)) { @@ -281,7 +285,7 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, _willDisplayNodeContentWithRenderingContext(currentContext); } - if (_flags.implementsInstanceDrawRect) { + if (flags.implementsInstanceDrawRect) { [self drawRect:bounds withParameters:drawParameters isCancelled:isCancelledBlock isRasterizing:rasterizing]; } else { [[self class] drawRect:bounds withParameters:drawParameters isCancelled:isCancelledBlock isRasterizing:rasterizing]; From ff7a586eba31f7607a3e2850cde399dde6288194 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sat, 9 Jul 2016 23:51:49 -0700 Subject: [PATCH 104/247] [ASVideoPlayerNode] Use ASDisplayNode base class lock for subclass property syncrhonization, fix retain cycles (#1878) --- AsyncDisplayKit/ASVideoPlayerNode.mm | 46 ++++++++++++++++------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index 7a678831c3..5e8d1bea7e 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -12,13 +12,12 @@ #import "ASVideoPlayerNode.h" #import "ASDefaultPlaybackButton.h" +#import "ASDisplayNodeInternal.h" static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; @interface ASVideoPlayerNode() { - ASDN::RecursiveMutex _videoPlayerLock; - __weak id _delegate; struct { @@ -165,7 +164,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; { [super didLoad]; { - ASDN::MutexLocker l(_videoPlayerLock); + ASDN::MutexLocker l(_propertyLock); [self createControls]; } } @@ -174,7 +173,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; { [super visibleStateDidChange:isVisible]; - ASDN::MutexLocker l(_videoPlayerLock); + ASDN::MutexLocker l(_propertyLock); if (isVisible && _loadAssetWhenNodeBecomesVisible && _asset != _videoNode.asset) { _videoNode.asset = _asset; @@ -196,7 +195,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; #pragma mark - UI - (void)createControls { - ASDN::MutexLocker l(_videoPlayerLock); + ASDN::MutexLocker l(_propertyLock); if (_controlsDisabled) { return; @@ -247,7 +246,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; } ASPerformBlockOnMainThread(^{ - ASDN::MutexLocker l(_videoPlayerLock); + ASDN::MutexLocker l(_propertyLock); [self setNeedsLayout]; }); } @@ -323,32 +322,35 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; - (void)createScrubber { if (_scrubberNode == nil) { - _scrubberNode = [[ASDisplayNode alloc] initWithViewBlock:^UIView * _Nonnull{ + __weak __typeof__(self) weakSelf = self; + _scrubberNode = [[ASDisplayNode alloc] initWithViewBlock:^UIView * _Nonnull { + __typeof__(self) strongSelf = weakSelf; + UISlider *slider = [[UISlider alloc] initWithFrame:CGRectZero]; slider.minimumValue = 0.0; slider.maximumValue = 1.0; if (_delegateFlags.delegateScrubberMinimumTrackTintColor) { - slider.minimumTrackTintColor = [_delegate videoPlayerNodeScrubberMinimumTrackTint:self]; + slider.minimumTrackTintColor = [_delegate videoPlayerNodeScrubberMinimumTrackTint:strongSelf]; } if (_delegateFlags.delegateScrubberMaximumTrackTintColor) { - slider.maximumTrackTintColor = [_delegate videoPlayerNodeScrubberMaximumTrackTint:self]; + slider.maximumTrackTintColor = [_delegate videoPlayerNodeScrubberMaximumTrackTint:strongSelf]; } if (_delegateFlags.delegateScrubberThumbTintColor) { - slider.thumbTintColor = [_delegate videoPlayerNodeScrubberThumbTint:self]; + slider.thumbTintColor = [_delegate videoPlayerNodeScrubberThumbTint:strongSelf]; } if (_delegateFlags.delegateScrubberThumbImage) { - UIImage *thumbImage = [_delegate videoPlayerNodeScrubberThumbImage:self]; + UIImage *thumbImage = [_delegate videoPlayerNodeScrubberThumbImage:strongSelf]; [slider setThumbImage:thumbImage forState:UIControlStateNormal]; } - [slider addTarget:self action:@selector(beginSeek) forControlEvents:UIControlEventTouchDown]; - [slider addTarget:self action:@selector(endSeek) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside|UIControlEventTouchCancel]; - [slider addTarget:self action:@selector(seekTimeDidChange:) forControlEvents:UIControlEventValueChanged]; + [slider addTarget:strongSelf action:@selector(beginSeek) forControlEvents:UIControlEventTouchDown]; + [slider addTarget:strongSelf action:@selector(endSeek) forControlEvents:UIControlEventTouchUpInside|UIControlEventTouchUpOutside|UIControlEventTouchCancel]; + [slider addTarget:strongSelf action:@selector(seekTimeDidChange:) forControlEvents:UIControlEventValueChanged]; return slider; }]; @@ -490,19 +492,25 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; - (void)showSpinner { - ASDN::MutexLocker l(_videoPlayerLock); + ASDN::MutexLocker l(_propertyLock); if (!_spinnerNode) { + + __weak __typeof__(self) weakSelf = self; _spinnerNode = [[ASDisplayNode alloc] initWithViewBlock:^UIView *{ + __typeof__(self) strongSelf = weakSelf; UIActivityIndicatorView *spinnnerView = [[UIActivityIndicatorView alloc] init]; - spinnnerView.color = _defaultControlsColor; + spinnnerView.backgroundColor = [UIColor clearColor]; + if (_delegateFlags.delegateSpinnerTintColor) { - spinnnerView.color = [_delegate videoPlayerNodeSpinnerTint:self]; + spinnnerView.color = [_delegate videoPlayerNodeSpinnerTint:strongSelf]; + } else { + spinnnerView.color = _defaultControlsColor; } + return spinnnerView; }]; _spinnerNode.preferredFrameSize = CGSizeMake(44.0, 44.0); - _spinnerNode.backgroundColor = [UIColor clearColor]; [self addSubnode:_spinnerNode]; [self setNeedsLayout]; @@ -512,7 +520,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; - (void)removeSpinner { - ASDN::MutexLocker l(_videoPlayerLock); + ASDN::MutexLocker l(_propertyLock); if (!_spinnerNode) { return; From d83f319fe36bb461fc650a92c6eb7fde658f12a0 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 9 Jul 2016 23:54:06 -0700 Subject: [PATCH 105/247] Revert "Use textStorageCreationBlock for resetting the text storage (#1874)" This reverts commit d646d3c753193382f8ad029172d975c782ad8544. --- AsyncDisplayKit/TextKit/ASTextKitContext.mm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.mm b/AsyncDisplayKit/TextKit/ASTextKitContext.mm index bc852b9839..7f5ed9be98 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.mm @@ -23,7 +23,6 @@ NSTextContainer *_textContainer; NSAttributedString *_attributedString; - ASTextKitContextTextStorageCreationBlock _textStorageCreationBlock; } #pragma mark - Lifecycle @@ -35,7 +34,7 @@ constrainedSize:(CGSize)constrainedSize layoutManagerCreationBlock:(NSLayoutManager * (^)(void))layoutCreationBlock layoutManagerDelegate:(id)layoutManagerDelegate - textStorageCreationBlock:(ASTextKitContextTextStorageCreationBlock)textStorageCreationBlock + textStorageCreationBlock:(NSTextStorage * (^)(NSAttributedString *attributedString))textStorageCreationBlock { if (self = [super init]) { @@ -44,7 +43,6 @@ std::lock_guard l(__static_mutex); _attributedString = [attributedString copy]; - _textStorageCreationBlock = [textStorageCreationBlock copy]; // Create the TextKit component stack with our default configuration. if (textStorageCreationBlock) { @@ -81,11 +79,7 @@ - (void)_resetTextStorage { - if (_textStorageCreationBlock) { - [_textStorage setAttributedString:_textStorageCreationBlock(_attributedString)]; - } else { - [_textStorage setAttributedString:_attributedString]; - } + [_textStorage setAttributedString:_attributedString]; } #pragma mark - Setter / Getter From bf9c1427651c713ba21e4b3bd541394b62d76464 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 9 Jul 2016 23:54:43 -0700 Subject: [PATCH 106/247] Revert "[ASTextNode] Fix text node truncation (#1863)" This reverts commit 6238e5edbde55fb82982ce4a19a0cbca7fe7eb9d. We will re-apply this change, but there are some early signs of performance impacts that need to be investigated. --- AsyncDisplayKit/TextKit/ASTextKitContext.h | 13 +------- AsyncDisplayKit/TextKit/ASTextKitContext.mm | 30 +------------------ AsyncDisplayKit/TextKit/ASTextKitRenderer.mm | 8 ++--- .../TextKit/ASTextKitTailTruncater.mm | 7 +---- AsyncDisplayKitTests/ASTextNodeTests.m | 4 +-- 5 files changed, 7 insertions(+), 55 deletions(-) diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.h b/AsyncDisplayKit/TextKit/ASTextKitContext.h index 61488b4a98..ccd7bb0eb9 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.h +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.h @@ -10,8 +10,6 @@ #import -typedef NSTextStorage *(^ASTextKitContextTextStorageCreationBlock)(NSAttributedString *attributedString); - /** A threadsafe container for the TextKit components that ASTextKit uses to lay out and truncate its text. @@ -32,19 +30,10 @@ typedef NSTextStorage *(^ASTextKitContextTextStorageCreationBlock)(NSAttributedS constrainedSize:(CGSize)constrainedSize layoutManagerCreationBlock:(NSLayoutManager * (^)(void))layoutCreationBlock layoutManagerDelegate:(id)layoutManagerDelegate - textStorageCreationBlock:(ASTextKitContextTextStorageCreationBlock)textStorageCreationBlock; + textStorageCreationBlock:(NSTextStorage * (^)(NSAttributedString *attributedString))textStorageCreationBlock; -/** - Set the constrained size for the text context. - */ @property (nonatomic, assign, readwrite) CGSize constrainedSize; -/** - Resets the text storage to the original value in case it was truncated before. This method is called within - a locked context. - */ -- (void)resetTextStorage; - /** All operations on TextKit values MUST occur within this locked context. Simultaneous access (even non-mutative) to TextKit components may cause crashes. diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.mm b/AsyncDisplayKit/TextKit/ASTextKitContext.mm index 7f5ed9be98..7410ed9f45 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.mm @@ -21,12 +21,8 @@ NSLayoutManager *_layoutManager; NSTextStorage *_textStorage; NSTextContainer *_textContainer; - - NSAttributedString *_attributedString; } -#pragma mark - Lifecycle - - (instancetype)initWithAttributedString:(NSAttributedString *)attributedString lineBreakMode:(NSLineBreakMode)lineBreakMode maximumNumberOfLines:(NSUInteger)maximumNumberOfLines @@ -41,23 +37,16 @@ // Concurrently initialising TextKit components crashes (rdar://18448377) so we use a global lock. static std::mutex __static_mutex; std::lock_guard l(__static_mutex); - - _attributedString = [attributedString copy]; - // Create the TextKit component stack with our default configuration. if (textStorageCreationBlock) { _textStorage = textStorageCreationBlock(attributedString); } else { - _textStorage = [[NSTextStorage alloc] init]; - [self _resetTextStorage]; + _textStorage = (attributedString ? [[NSTextStorage alloc] initWithAttributedString:attributedString] : [[NSTextStorage alloc] init]); } - - _layoutManager = layoutCreationBlock ? layoutCreationBlock() : [[ASLayoutManager alloc] init]; _layoutManager.usesFontLeading = NO; _layoutManager.delegate = layoutManagerDelegate; [_textStorage addLayoutManager:_layoutManager]; - _textContainer = [[NSTextContainer alloc] initWithSize:constrainedSize]; // We want the text laid out up to the very edges of the container. _textContainer.lineFragmentPadding = 0; @@ -69,21 +58,6 @@ return self; } -#pragma mark - Text Storage - -- (void)resetTextStorage -{ - std::lock_guard l(_textKitMutex); - [self _resetTextStorage]; -} - -- (void)_resetTextStorage -{ - [_textStorage setAttributedString:_attributedString]; -} - -#pragma mark - Setter / Getter - - (CGSize)constrainedSize { std::lock_guard l(_textKitMutex); @@ -96,8 +70,6 @@ _textContainer.size = constrainedSize; } -#pragma mark - Locking - - (void)performBlockWithLockedTextKitComponents:(void (^)(NSLayoutManager *, NSTextStorage *, NSTextContainer *))block diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm index fc7948093b..4cbb3552d7 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm @@ -128,12 +128,8 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet() // If we're updating an existing context, make sure to use the same inset logic used during initialization. // This codepath allows us to reuse the CGSize shadowConstrainedSize = [[self shadower] insetSizeWithConstrainedSize:constrainedSize]; - if (_context) { - _context.constrainedSize = shadowConstrainedSize; - } - if (_fontSizeAdjuster) { - _fontSizeAdjuster.constrainedSize = shadowConstrainedSize; - } + if (_context) _context.constrainedSize = shadowConstrainedSize; + if (_fontSizeAdjuster) _fontSizeAdjuster.constrainedSize = shadowConstrainedSize; } } } diff --git a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm index 92aa7527e3..9b870a36a6 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitTailTruncater.mm @@ -150,14 +150,9 @@ - (void)truncate { - // Reset the text storage to start always with the full string - [_context resetTextStorage]; - - // Start truncation [_context performBlockWithLockedTextKitComponents:^(NSLayoutManager *layoutManager, NSTextStorage *textStorage, NSTextContainer *textContainer) { - NSUInteger originalStringLength = textStorage.length; - + [layoutManager ensureLayoutForTextContainer:textContainer]; NSRange visibleGlyphRange = [layoutManager glyphRangeForBoundingRect:{ .size = textContainer.size } diff --git a/AsyncDisplayKitTests/ASTextNodeTests.m b/AsyncDisplayKitTests/ASTextNodeTests.m index e928a22523..6990b786d5 100644 --- a/AsyncDisplayKitTests/ASTextNodeTests.m +++ b/AsyncDisplayKitTests/ASTextNodeTests.m @@ -125,7 +125,7 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) for (NSInteger i = 10; i < 500; i += 50) { CGSize constrainedSize = CGSizeMake(i, i); CGSize calculatedSize = [_textNode measure:constrainedSize]; - CGSize recalculatedSize = [_textNode measure:constrainedSize]; + CGSize recalculatedSize = [_textNode measure:calculatedSize]; XCTAssertTrue(CGSizeEqualToSizeWithIn(calculatedSize, recalculatedSize, 4.0), @"Recalculated size %@ should be same as original size %@", NSStringFromCGSize(recalculatedSize), NSStringFromCGSize(calculatedSize)); } @@ -136,7 +136,7 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) for (CGFloat i = 10; i < 500; i *= 1.3) { CGSize constrainedSize = CGSizeMake(i, i); CGSize calculatedSize = [_textNode measure:constrainedSize]; - CGSize recalculatedSize = [_textNode measure:constrainedSize]; + CGSize recalculatedSize = [_textNode measure:calculatedSize]; XCTAssertTrue(CGSizeEqualToSizeWithIn(calculatedSize, recalculatedSize, 11.0), @"Recalculated size %@ should be same as original size %@", NSStringFromCGSize(recalculatedSize), NSStringFromCGSize(calculatedSize)); } From 10447998af0793971ef302c6f96da472406a4137 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 10 Jul 2016 00:30:37 -0700 Subject: [PATCH 107/247] [ASMapNode] use ASDisplayNode base class lock (#1879) * [ASVideoPlayerNode] Use ASDisplayNode base class lock for subclass property syncrhonization, fix retain cycles * [ASMapNode] Use ASDisplayNode base class lock instead of subclass lock --- AsyncDisplayKit/ASMapNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index f6fd7a87b7..e29f369664 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -10,6 +10,7 @@ #if TARGET_OS_IOS #import "ASMapNode.h" +#import "ASDisplayNodeInternal.h" #import "ASDisplayNode+Subclasses.h" #import "ASDisplayNodeExtras.h" #import "ASInsetLayoutSpec.h" @@ -18,7 +19,6 @@ @interface ASMapNode() { - ASDN::RecursiveMutex _propertyLock; MKMapSnapshotter *_snapshotter; BOOL _snapshotAfterLayout; NSArray *_annotations; From 2e65339f33c0d69797b42ccffd02100d8a8d3ebd Mon Sep 17 00:00:00 2001 From: Flo Date: Sun, 10 Jul 2016 20:32:21 +0200 Subject: [PATCH 108/247] [ASVideoNode, ASVideoPlayerNode] Add video composition and audio mix capabilities (#1800) * [ASVideoNode] Add delegate method called when the currentItem is set. * [ASVideoNode] Add videoComposition and audioMix properties to the ASVideoNode. * [ASVideoPlayerNode] Add new initialiser with videoComposition and audioMix, and forward new delegate method. * [ASVideoPlayerNode] Forward missing ASVideoNodeDelegate methods. --- AsyncDisplayKit/ASVideoNode.h | 10 ++- AsyncDisplayKit/ASVideoNode.mm | 45 +++++++++++++- AsyncDisplayKit/ASVideoPlayerNode.h | 37 ++++++++++- AsyncDisplayKit/ASVideoPlayerNode.mm | 93 +++++++++++++++++++++++++++- 4 files changed, 178 insertions(+), 7 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.h b/AsyncDisplayKit/ASVideoNode.h index 1194266ef6..00f90ce80f 100644 --- a/AsyncDisplayKit/ASVideoNode.h +++ b/AsyncDisplayKit/ASVideoNode.h @@ -12,7 +12,7 @@ #import #import -@class AVAsset, AVPlayer, AVPlayerItem; +@class AVAsset, AVPlayer, AVPlayerItem, AVVideoComposition, AVAudioMix; @protocol ASVideoNodeDelegate; typedef enum { @@ -41,6 +41,8 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)isPlaying; @property (nullable, atomic, strong, readwrite) AVAsset *asset; +@property (nullable, atomic, strong, readwrite) AVVideoComposition *videoComposition; +@property (nullable, atomic, strong, readwrite) AVAudioMix *audioMix; @property (nullable, atomic, strong, readonly) AVPlayer *player; @property (nullable, atomic, strong, readonly) AVPlayerItem *currentItem; @@ -121,6 +123,12 @@ NS_ASSUME_NONNULL_BEGIN * @param videoNode The videoNode */ - (void)videoNodeDidFinishInitialLoading:(ASVideoNode *)videoNode; +/** + * @abstract Delegate method invoked when the AVPlayerItem for the asset has been set up and can be accessed throught currentItem. + * @param videoNode The videoNode. + * @param currentItem The AVPlayerItem that was constructed from the asset. + */ +- (void)videoNode:(ASVideoNode *)videoNode didSetCurrentItem:(AVPlayerItem *)currentItem; /** * @abstract Delegate method invoked when the video node has recovered from the stall * @param videoNode The videoNode diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 7e0c9050da..c0e0accf3a 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -49,6 +49,7 @@ static NSString * const kStatus = @"status"; unsigned int delegateVideoNodeDidPlayToTimeInterval:1; unsigned int delegateVideoNodeDidStartInitialLoading:1; unsigned int delegateVideoNodeDidFinishInitialLoading:1; + unsigned int delegateVideoNodeDidSetCurrentItem:1; unsigned int delegateVideoNodeDidStallAtTimeInterval:1; unsigned int delegateVideoNodeDidRecoverFromStall:1; @@ -68,6 +69,8 @@ static NSString * const kStatus = @"status"; ASVideoNodePlayerState _playerState; AVAsset *_asset; + AVVideoComposition *_videoComposition; + AVAudioMix *_audioMix; AVPlayerItem *_currentPlayerItem; AVPlayer *_player; @@ -124,7 +127,10 @@ static NSString * const kStatus = @"status"; ASDN::MutexLocker l(_propertyLock); if (_asset != nil) { - return [[AVPlayerItem alloc] initWithAsset:_asset]; + AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; + playerItem.videoComposition = _videoComposition; + playerItem.audioMix = _audioMix; + return playerItem; } return nil; @@ -153,7 +159,11 @@ static NSString * const kStatus = @"status"; } else { self.player = [AVPlayer playerWithPlayerItem:playerItem]; } - + + if (_delegateFlags.delegateVideoNodeDidSetCurrentItem) { + [_delegate videoNode:self didSetCurrentItem:playerItem]; + } + if (self.image == nil && self.URL == nil) { [self generatePlaceholderImage]; } @@ -448,6 +458,34 @@ static NSString * const kStatus = @"status"; return _asset; } +- (void)setVideoComposition:(AVVideoComposition *)videoComposition +{ + ASDN::MutexLocker l(_propertyLock); + + _videoComposition = videoComposition; + _currentPlayerItem.videoComposition = videoComposition; +} + +- (AVVideoComposition *)videoComposition +{ + ASDN::MutexLocker l(_propertyLock); + return _videoComposition; +} + +- (void)setAudioMix:(AVAudioMix *)audioMix +{ + ASDN::MutexLocker l(_propertyLock); + + _audioMix = audioMix; + _currentPlayerItem.audioMix = audioMix; +} + +- (AVAudioMix *)audioMix +{ + ASDN::MutexLocker l(_propertyLock); + return _audioMix; +} + - (AVPlayer *)player { ASDN::MutexLocker l(_propertyLock); @@ -473,6 +511,7 @@ static NSString * const kStatus = @"status"; _delegateFlags.delegateVideoNodeDidPlayToTimeInterval = [_delegate respondsToSelector:@selector(videoNode:didPlayToTimeInterval:)]; _delegateFlags.delegateVideoNodeDidStartInitialLoading = [_delegate respondsToSelector:@selector(videoNodeDidStartInitialLoading:)]; _delegateFlags.delegateVideoNodeDidFinishInitialLoading = [_delegate respondsToSelector:@selector(videoNodeDidFinishInitialLoading:)]; + _delegateFlags.delegateVideoNodeDidSetCurrentItem = [_delegate respondsToSelector:@selector(videoNode:didSetCurrentItem:)]; _delegateFlags.delegateVideoNodeDidStallAtTimeInterval = [_delegate respondsToSelector:@selector(videoNode:didStallAtTimeInterval:)]; _delegateFlags.delegateVideoNodeDidRecoverFromStall = [_delegate respondsToSelector:@selector(videoNodeDidRecoverFromStall:)]; @@ -697,4 +736,4 @@ static NSString * const kStatus = @"status"; } @end -#endif \ No newline at end of file +#endif diff --git a/AsyncDisplayKit/ASVideoPlayerNode.h b/AsyncDisplayKit/ASVideoPlayerNode.h index c8f65fcb80..60318ce938 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.h +++ b/AsyncDisplayKit/ASVideoPlayerNode.h @@ -58,8 +58,10 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithUrl:(NSURL*)url; - (instancetype)initWithAsset:(AVAsset*)asset; +- (instancetype)initWithAsset:(AVAsset *)asset videoComposition:(AVVideoComposition *)videoComposition audioMix:(AVAudioMix *)audioMix; - (instancetype)initWithUrl:(NSURL *)url loadAssetWhenNodeBecomesVisible:(BOOL)loadAssetWhenNodeBecomesVisible; - (instancetype)initWithAsset:(AVAsset *)asset loadAssetWhenNodeBecomesVisible:(BOOL)loadAssetWhenNodeBecomesVisible; +- (instancetype)initWithAsset:(AVAsset *)asset videoComposition:(AVVideoComposition *)videoComposition audioMix:(AVAudioMix *)audioMix loadAssetWhenNodeBecomesVisible:(BOOL)loadAssetWhenNodeBecomesVisible; #pragma mark - Public API - (void)seekToTime:(CGFloat)percentComplete; @@ -156,10 +158,43 @@ NS_ASSUME_NONNULL_BEGIN /** * @abstract Delegate method invoked when the ASVideoNode has played to its end time. - * @param videoPlayerNode The video node has played to its end time. + * @param videoPlayer The video node has played to its end time. */ - (void)videoPlayerNodeDidPlayToEnd:(ASVideoPlayerNode *)videoPlayer; +/** + * @abstract Delegate method invoked when the ASVideoNode has constructed its AVPlayerItem for the asset. + * @param videoPlayer The video player node. + * @param currentItem The AVPlayerItem that was constructed from the asset. + */ +- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer didSetCurrentItem:(AVPlayerItem *)currentItem; + +/** + * @abstract Delegate method invoked when the ASVideoNode stalls. + * @param videoPlayer The video player node that has experienced the stall + * @param second Current playback time when the stall happens + */ +- (void)videoPlayerNode:(ASVideoPlayerNode *)videoPlayer didStallAtTimeInterval:(NSTimeInterval)timeInterval; + +/** + * @abstract Delegate method invoked when the ASVideoNode starts the inital asset loading + * @param videoPlayer The videoPlayer + */ +- (void)videoPlayerNodeDidStartInitialLoading:(ASVideoPlayerNode *)videoPlayer; + +/** + * @abstract Delegate method invoked when the ASVideoNode is done loading the asset and can start the playback + * @param videoPlayer The videoPlayer + */ +- (void)videoPlayerNodeDidFinishInitialLoading:(ASVideoPlayerNode *)videoPlayer; + +/** + * @abstract Delegate method invoked when the ASVideoNode has recovered from the stall + * @param videoPlayer The videoplayer + */ +- (void)videoPlayerNodeDidRecoverFromStall:(ASVideoPlayerNode *)videoPlayer; + + @end NS_ASSUME_NONNULL_END #endif diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index 5e8d1bea7e..100485d539 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -37,10 +37,17 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; unsigned int delegateVideoNodeShouldChangeState:1; unsigned int delegateVideoNodePlaybackDidFinish:1; unsigned int delegateDidTapVideoPlayerNode:1; + unsigned int delegateVideoPlayerNodeDidSetCurrentItem:1; + unsigned int delegateVideoPlayerNodeDidStallAtTimeInterval:1; + unsigned int delegateVideoPlayerNodeDidStartInitialLoading:1; + unsigned int delegateVideoPlayerNodeDidFinishInitialLoading:1; + unsigned int delegateVideoPlayerNodeDidRecoverFromStall:1; } _delegateFlags; NSURL *_url; AVAsset *_asset; + AVVideoComposition *_videoComposition; + AVAudioMix *_audioMix; ASVideoNode *_videoNode; @@ -118,6 +125,22 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; return self; } +-(instancetype)initWithAsset:(AVAsset *)asset videoComposition:(AVVideoComposition *)videoComposition audioMix:(AVAudioMix *)audioMix +{ + if (!(self = [super init])) { + return nil; + } + + _asset = asset; + _videoComposition = videoComposition; + _audioMix = audioMix; + _loadAssetWhenNodeBecomesVisible = YES; + + [self _init]; + + return self; +} + - (instancetype)initWithUrl:(NSURL *)url loadAssetWhenNodeBecomesVisible:(BOOL)loadAssetWhenNodeBecomesVisible { if (!(self = [super init])) { @@ -147,6 +170,22 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; return self; } +-(instancetype)initWithAsset:(AVAsset *)asset videoComposition:(AVVideoComposition *)videoComposition audioMix:(AVAudioMix *)audioMix loadAssetWhenNodeBecomesVisible:(BOOL)loadAssetWhenNodeBecomesVisible +{ + if (!(self = [super init])) { + return nil; + } + + _asset = asset; + _videoComposition = videoComposition; + _audioMix = audioMix; + _loadAssetWhenNodeBecomesVisible = loadAssetWhenNodeBecomesVisible; + + [self _init]; + + return self; +} + - (void)_init { _defaultControlsColor = [UIColor whiteColor]; @@ -156,6 +195,8 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; _videoNode.delegate = self; if (_loadAssetWhenNodeBecomesVisible == NO) { _videoNode.asset = _asset; + _videoNode.videoComposition = _videoComposition; + _videoNode.audioMix = _audioMix; } [self addSubnode:_videoNode]; } @@ -175,8 +216,16 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; ASDN::MutexLocker l(_propertyLock); - if (isVisible && _loadAssetWhenNodeBecomesVisible && _asset != _videoNode.asset) { - _videoNode.asset = _asset; + if (isVisible && _loadAssetWhenNodeBecomesVisible) { + if (_asset != _videoNode.asset) { + _videoNode.asset = _asset; + } + if (_videoComposition != _videoNode.videoComposition) { + _videoNode.videoComposition = _videoComposition; + } + if (_audioMix != _videoNode.audioMix) { + _videoNode.audioMix = _audioMix; + } } } @@ -480,6 +529,41 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; } } +- (void)videoNode:(ASVideoNode *)videoNode didSetCurrentItem:(AVPlayerItem *)currentItem +{ + if (_delegateFlags.delegateVideoPlayerNodeDidSetCurrentItem) { + [_delegate videoPlayerNode:self didSetCurrentItem:currentItem]; + } +} + +- (void)videoNode:(ASVideoNode *)videoNode didStallAtTimeInterval:(NSTimeInterval)timeInterval +{ + if (_delegateFlags.delegateVideoPlayerNodeDidStallAtTimeInterval) { + [_delegate videoPlayerNode:self didStallAtTimeInterval:timeInterval]; + } +} + +- (void)videoNodeDidStartInitialLoading:(ASVideoNode *)videoNode +{ + if (_delegateFlags.delegateVideoPlayerNodeDidStartInitialLoading) { + [_delegate videoPlayerNodeDidStartInitialLoading:self]; + } +} + +- (void)videoNodeDidFinishInitialLoading:(ASVideoNode *)videoNode +{ + if (_delegateFlags.delegateVideoPlayerNodeDidFinishInitialLoading) { + [_delegate videoPlayerNodeDidFinishInitialLoading:self]; + } +} + +- (void)videoNodeDidRecoverFromStall:(ASVideoNode *)videoNode +{ + if (_delegateFlags.delegateVideoPlayerNodeDidRecoverFromStall) { + [_delegate videoPlayerNodeDidRecoverFromStall:self]; + } +} + #pragma mark - Actions - (void)togglePlayPause { @@ -702,6 +786,11 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; _delegateFlags.delegateTimeLabelAttributedString = [_delegate respondsToSelector:@selector(videoPlayerNode:timeStringForTimeLabelType:forTime:)]; _delegateFlags.delegatePlaybackButtonTint = [_delegate respondsToSelector:@selector(videoPlayerNodePlaybackButtonTint:)]; _delegateFlags.delegateDidTapVideoPlayerNode = [_delegate respondsToSelector:@selector(didTapVideoPlayerNode:)]; + _delegateFlags.delegateVideoPlayerNodeDidSetCurrentItem = [_delegate respondsToSelector:@selector(videoPlayerNode:didSetCurrentItem:)]; + _delegateFlags.delegateVideoPlayerNodeDidStallAtTimeInterval = [_delegate respondsToSelector:@selector(videoPlayerNode:didStallAtTimeInterval:)]; + _delegateFlags.delegateVideoPlayerNodeDidStartInitialLoading = [_delegate respondsToSelector:@selector(videoPlayerNodeDidStartInitialLoading:)]; + _delegateFlags.delegateVideoPlayerNodeDidFinishInitialLoading = [_delegate respondsToSelector:@selector(videoPlayerNodeDidFinishInitialLoading:)]; + _delegateFlags.delegateVideoPlayerNodeDidRecoverFromStall = [_delegate respondsToSelector:@selector(videoPlayerNodeDidRecoverFromStall:)]; } } From 5856bd3b591e6f8a6f8e68a0b8da0c2b4dbc4915 Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Sun, 10 Jul 2016 12:53:44 -0700 Subject: [PATCH 109/247] [Cocoapods] Update podspec with 1.9.81 --- AsyncDisplayKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit.podspec b/AsyncDisplayKit.podspec index 8505b88f61..bccf8ba945 100644 --- a/AsyncDisplayKit.podspec +++ b/AsyncDisplayKit.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |spec| spec.name = 'AsyncDisplayKit' - spec.version = '1.9.80' + spec.version = '1.9.81' spec.license = { :type => 'BSD' } spec.homepage = 'http://asyncdisplaykit.org' spec.authors = { 'Scott Goodson' => 'scottgoodson@gmail.com', 'Ryan Nystrom' => 'rnystrom@fb.com' } spec.summary = 'Smooth asynchronous user interfaces for iOS apps.' - spec.source = { :git => 'https://github.com/facebook/AsyncDisplayKit.git', :tag => '1.9.80' } + spec.source = { :git => 'https://github.com/facebook/AsyncDisplayKit.git', :tag => '1.9.81' } spec.documentation_url = 'http://asyncdisplaykit.org/appledoc/' From a9e3eacfe513a82a03c3c1ef2a13656c6dfb6030 Mon Sep 17 00:00:00 2001 From: appleguy Date: Sun, 10 Jul 2016 16:01:55 -0700 Subject: [PATCH 110/247] [ASCellNode] Add gating for -convertRect: call upon invisibility notification for iOS 7 & 8 edge case. (#1881) * [ASCellNode] Add gating for -convertRect: call upon invisibility notification for iOS 7 & 8 edge case. This should resolve https://github.com/facebook/AsyncDisplayKit/issues/1659, which corresponds to this Fabric log for Pinterest: https://fabric.io/pinterest6/ios/apps/com.pinterest.enterprise/issues/5776fbfeffcdc042501a5f20/sessions/c178e977614b4ebab853084847fb241 8 * [ASCellNode] Additional improvements to visibilityDidChange: gating. --- AsyncDisplayKit/ASCellNode.mm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index 9dd9d27b47..dce2c936bd 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -272,13 +272,21 @@ { [super visibleStateDidChange:isVisible]; + ASDisplayNodeAssert(self.isNodeLoaded, @"Node should be loaded in order for it to become visible or invisible. If not in this situation, we shouldn't trigger creating the view."); + UIView *view = self.view; CGRect cellFrame = CGRectZero; - if (_scrollView) { - // It is not safe to message nil with a structure return value, so ensure our _scrollView has not died. - cellFrame = [self.view convertRect:self.bounds toView:_scrollView]; + + // Ensure our _scrollView is still valid before converting. It's also possible that we have already been removed from the _scrollView, + // in which case it is not valid to perform a convertRect (this actually crashes on iOS 7 and 8). + UIScrollView *scrollView = (_scrollView != nil && view.superview != nil && [view isDescendantOfView:_scrollView]) ? _scrollView : nil; + if (scrollView) { + cellFrame = [view convertRect:view.bounds toView:_scrollView]; } + + // If we did not convert, we'll pass along CGRectZero and a nil scrollView. The EventInvisible call is thus equivalent to + // visibleStateDidChange:NO, but is more convenient for the developer than implementing multiple methods. [self cellNodeVisibilityEvent:isVisible ? ASCellNodeVisibilityEventVisible : ASCellNodeVisibilityEventInvisible - inScrollView:_scrollView + inScrollView:scrollView withCellFrame:cellFrame]; } From b9c9e6be5b1e3a8a6438839ce4d02625c638b266 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 10 Jul 2016 18:59:07 -0700 Subject: [PATCH 111/247] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4185ee20e2..416cdfa9c1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![AsyncDisplayKit](https://github.com/facebook/AsyncDisplayKit/blob/master/docs/assets/logo.png) +![AsyncDisplayKit](https://github.com/facebook/AsyncDisplayKit/blob/gh-pages/static/images/logo.png) [![Apps Using](https://img.shields.io/badge/Apps%20Using%20ASDK-%3E4,646-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) [![Downloads](https://img.shields.io/badge/Total%20Downloads-%3E475,500-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) @@ -42,7 +42,7 @@ if you're using Swift: AsyncDisplayKit Nodes are a thread-safe abstraction layer over UIViews and CALayers: -![node-view-layer diagram](https://github.com/facebook/AsyncDisplayKit/blob/master/docs/assets/node-view-layer.png) +![node-view-layer diagram](https://github.com/facebook/AsyncDisplayKit/blob/gh-pages/static/images/node-view-layer.png) You can construct entire node hierarchies in parallel, or instantiate and size a single node on a background thread — for example, you could do From bd6e85e59d6653273968a4a207e18daa0b755587 Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Sun, 10 Jul 2016 19:03:34 -0700 Subject: [PATCH 112/247] Remove old (original website) files from repository --- Default-568h@2x.png | Bin 18594 -> 0 bytes docs/CNAME | 2 - docs/LICENSE.md | 420 ------------------------ docs/README.md | 9 - docs/_config.yml | 13 - docs/_includes/footer.html | 18 - docs/_includes/head.html | 24 -- docs/_includes/header.html | 25 -- docs/_layouts/default.html | 20 -- docs/_layouts/docs.html | 27 -- docs/_layouts/page.html | 16 - docs/_layouts/post.html | 15 - docs/_sass/_base.scss | 205 ------------ docs/_sass/_layout.scss | 265 --------------- docs/_sass/_syntax-highlighting.scss | 76 ----- docs/assets/guide/1-shuffle-crop.png | Bin 1016 -> 0 bytes docs/assets/guide/1-shuffle.png | Bin 19288 -> 0 bytes docs/assets/logo-square.png | Bin 66422 -> 0 bytes docs/assets/logo.png | Bin 105684 -> 0 bytes docs/assets/node-view-layer.png | Bin 12961 -> 0 bytes docs/build.sh | 33 -- docs/css/main.scss | 49 --- docs/guide/1-introduction.md | 150 --------- docs/guide/2-custom-nodes.md | 211 ------------ docs/guide/3-asynchronous-display.md | 102 ------ docs/guide/4-making-the-most-of-asdk.md | 139 -------- docs/guide/5-under-the-hood.md | 89 ----- docs/index.md | 86 ----- 28 files changed, 1994 deletions(-) delete mode 100644 Default-568h@2x.png delete mode 100644 docs/CNAME delete mode 100644 docs/LICENSE.md delete mode 100644 docs/README.md delete mode 100644 docs/_config.yml delete mode 100644 docs/_includes/footer.html delete mode 100644 docs/_includes/head.html delete mode 100644 docs/_includes/header.html delete mode 100644 docs/_layouts/default.html delete mode 100644 docs/_layouts/docs.html delete mode 100644 docs/_layouts/page.html delete mode 100644 docs/_layouts/post.html delete mode 100644 docs/_sass/_base.scss delete mode 100644 docs/_sass/_layout.scss delete mode 100644 docs/_sass/_syntax-highlighting.scss delete mode 100644 docs/assets/guide/1-shuffle-crop.png delete mode 100644 docs/assets/guide/1-shuffle.png delete mode 100755 docs/assets/logo-square.png delete mode 100755 docs/assets/logo.png delete mode 100755 docs/assets/node-view-layer.png delete mode 100755 docs/build.sh delete mode 100755 docs/css/main.scss delete mode 100644 docs/guide/1-introduction.md delete mode 100644 docs/guide/2-custom-nodes.md delete mode 100644 docs/guide/3-asynchronous-display.md delete mode 100644 docs/guide/4-making-the-most-of-asdk.md delete mode 100644 docs/guide/5-under-the-hood.md delete mode 100644 docs/index.md diff --git a/Default-568h@2x.png b/Default-568h@2x.png deleted file mode 100644 index 0891b7aabfcf3422423b109c8beed2bab838c607..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 18594 zcmeI4X;f257Jx&9f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y#r zX&U<=BsPkdqcMe<_}2+>H%XKyrr5ZR8_KVe>ZqYN z^=^~TFD};;rHJ$U;{~w^hYojl4hRI@SH$^K{YEo=sg)WY87r!*7blQK&qnpDo0`Vn zkl)9u9g=mCh&ZCJS(L4yN3k0kQ zuvg$h2KEEk51T+O0JQ+r0`R>g{jvqM0Mr6d3qUOZwE!?PI7HY@CE|dr sfw?Q;rAv?G4&^^8-z_>&sWXMxvD*gPOU4CBe-*@OtE+wfmVJNyHv)PfH~;_u diff --git a/docs/CNAME b/docs/CNAME deleted file mode 100644 index a295f461e5..0000000000 --- a/docs/CNAME +++ /dev/null @@ -1,2 +0,0 @@ -asyncdisplaykit.org - diff --git a/docs/LICENSE.md b/docs/LICENSE.md deleted file mode 100644 index 4bb498ec63..0000000000 --- a/docs/LICENSE.md +++ /dev/null @@ -1,420 +0,0 @@ ---- -layout: page -title: License -permalink: /license/ ---- - -AsyncDisplayKit is free software under the BSD -license. - -Code examples and sample -projects are licensed as follows: - - This file provided by Facebook is for non-commercial testing and evaluation - purposes only. Facebook reserves all rights not expressly granted. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -All other AsyncDisplayKit documentation is licensed CC-BY-4.0. - - Attribution 4.0 International - - ======================================================================= - - Creative Commons Corporation ("Creative Commons") is not a law firm and - does not provide legal services or legal advice. Distribution of - Creative Commons public licenses does not create a lawyer-client or - other relationship. Creative Commons makes its licenses and related - information available on an "as-is" basis. Creative Commons gives no - warranties regarding its licenses, any material licensed under their - terms and conditions, or any related information. Creative Commons - disclaims all liability for damages resulting from their use to the - fullest extent possible. - - Using Creative Commons Public Licenses - - Creative Commons public licenses provide a standard set of terms and - conditions that creators and other rights holders may use to share - original works of authorship and other material subject to copyright - and certain other rights specified in the public license below. The - following considerations are for informational purposes only, are not - exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - - ======================================================================= - - Creative Commons Attribution 4.0 International Public License - - By exercising the Licensed Rights (defined below), You accept and agree - to be bound by the terms and conditions of this Creative Commons - Attribution 4.0 International Public License ("Public License"). To the - extent this Public License may be interpreted as a contract, You are - granted the Licensed Rights in consideration of Your acceptance of - these terms and conditions, and the Licensor grants You such rights in - consideration of benefits the Licensor receives from making the - Licensed Material available under these terms and conditions. - - - Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - - Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - - Section 3 -- License Conditions. - - Your exercise of the Licensed Rights is expressly made subject to the - following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - - Section 4 -- Sui Generis Database Rights. - - Where the Licensed Rights include Sui Generis Database Rights that - apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - - For the avoidance of doubt, this Section 4 supplements and does not - replace Your obligations under this Public License where the Licensed - Rights include other Copyright and Similar Rights. - - - Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - - Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - - Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - - Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - - ======================================================================= - - Creative Commons is not a party to its public licenses. - Notwithstanding, Creative Commons may elect to apply one of its public - licenses to material it publishes and in those instances will be - considered the "Licensor." Except for the limited purpose of indicating - that material is shared under a Creative Commons public license or as - otherwise permitted by the Creative Commons policies published at - creativecommons.org/policies, Creative Commons does not authorize the - use of the trademark "Creative Commons" or any other trademark or logo - of Creative Commons without its prior written consent including, - without limitation, in connection with any unauthorized modifications - to any of its public licenses or any other arrangements, - understandings, or agreements concerning use of licensed material. For - the avoidance of doubt, this paragraph does not form part of the public - licenses. - - Creative Commons may be contacted at creativecommons.org. diff --git a/docs/README.md b/docs/README.md deleted file mode 100644 index 05980d3818..0000000000 --- a/docs/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Documentation - -## Building - -You need Jekyll and appledoc. See `build.sh`. - -## License - -See LICENSE.md. diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 0d5f309f67..0000000000 --- a/docs/_config.yml +++ /dev/null @@ -1,13 +0,0 @@ -# Site settings -title: AsyncDisplayKit -description: Smooth asynchronous user interfaces for iOS apps. -baseurl: "" -url: "http://asyncdisplaykit.org" - -# Build settings -highlighter: pygments -markdown: redcarpet - -exclude: -- README.md -- build.sh diff --git a/docs/_includes/footer.html b/docs/_includes/footer.html deleted file mode 100644 index 2714963def..0000000000 --- a/docs/_includes/footer.html +++ /dev/null @@ -1,18 +0,0 @@ -
- -
- - -
- -
diff --git a/docs/_includes/head.html b/docs/_includes/head.html deleted file mode 100644 index a9e7efbdea..0000000000 --- a/docs/_includes/head.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - {% if page.title %}{{ page.title }} — {% endif %}AsyncDisplayKit - - - - - - - diff --git a/docs/_includes/header.html b/docs/_includes/header.html deleted file mode 100644 index aebb67cdf1..0000000000 --- a/docs/_includes/header.html +++ /dev/null @@ -1,25 +0,0 @@ - diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html deleted file mode 100644 index bdf5a388da..0000000000 --- a/docs/_layouts/default.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - {% include head.html %} - - - - {% include header.html %} - -
-
- {{ content }} -
-
- - {% include footer.html %} - - - - diff --git a/docs/_layouts/docs.html b/docs/_layouts/docs.html deleted file mode 100644 index 65c07040aa..0000000000 --- a/docs/_layouts/docs.html +++ /dev/null @@ -1,27 +0,0 @@ ---- -layout: default -sectionid: docs ---- -
- -
-

- {{ page.title }} - [edit] -

-
- -
- {{ content }} -
- -
- {% if page.prev %} - ← prev - {% endif %} - {% if page.next %} - next → - {% endif %} -
- -
diff --git a/docs/_layouts/page.html b/docs/_layouts/page.html deleted file mode 100644 index 8e7ccf7a15..0000000000 --- a/docs/_layouts/page.html +++ /dev/null @@ -1,16 +0,0 @@ ---- -layout: default ---- -
- - {% if page.shouldDisplayTitle %} -
-

{{ page.title }}

-
- {% endif %} - -
- {{ content }} -
- -
diff --git a/docs/_layouts/post.html b/docs/_layouts/post.html deleted file mode 100644 index 675596fb1c..0000000000 --- a/docs/_layouts/post.html +++ /dev/null @@ -1,15 +0,0 @@ ---- -layout: default ---- -
- -
-

{{ page.title }}

- -
- -
- {{ content }} -
- -
diff --git a/docs/_sass/_base.scss b/docs/_sass/_base.scss deleted file mode 100644 index 7d353be258..0000000000 --- a/docs/_sass/_base.scss +++ /dev/null @@ -1,205 +0,0 @@ -/** - * Reset some basic elements - */ -body, h1, h2, h3, h4, h5, h6, -p, blockquote, pre, hr, -dl, dd, ol, ul, figure { - margin: 0; - padding: 0; -} - - - -/** - * Basic styling - */ -body { - font-family: $base-font-family; - font-size: $base-font-size; - line-height: $base-line-height; - font-weight: 300; - color: $text-color; - background-color: $background-color; - -webkit-text-size-adjust: 100%; -} - - - -/** - * Set `margin-bottom` to maintain vertical rhythm - */ -h1, h2, h3, h4, h5, h6, -p, blockquote, pre, -ul, ol, dl, figure, -%vertical-rhythm { - margin-bottom: $spacing-unit / 2; -} - - - -/** - * Images - */ -img { - max-width: 100%; - vertical-align: middle; -} - - - -/** - * Figures - */ -figure > img { - display: block; -} - -figcaption { - font-size: $small-font-size; -} - - - -/** - * Lists - */ -ul, ol { - margin-left: $spacing-unit; -} - -li { - > ul, - > ol { - margin-bottom: 0; - } -} - - - -/** - * Headings - */ -h1, h2, h3, h4, h5, h6 { - font-weight: 300; -} - - - -/** - * Links - */ -a { - color: $brand-color; - text-decoration: none; - - &:visited { - color: darken($brand-color, 15%); - } - - &:hover { - color: $text-color; - text-decoration: underline; - } -} - - - -/** - * Blockquotes - */ -blockquote { - color: $grey-color; - border-left: 4px solid $grey-color-light; - padding-left: $spacing-unit / 2; - font-size: 18px; - letter-spacing: -1px; - font-style: italic; - - > :last-child { - margin-bottom: 0; - } -} - - - -/** - * Code formatting - */ -pre, -code { - font-family: Monaco, monospace; - font-size: 14px; - border: 1px solid #afe4ff; - border-radius: 3px; - background-color: #fafdff; -} - -code { - padding: 1px 5px; -} - -pre { - padding: 8px 12px; - overflow-x: scroll; - - > code { - border: 0; - padding-right: 0; - padding-left: 0; - } -} - - - -/** - * Wrapper - */ -.wrapper { - max-width: -webkit-calc(800px - (#{$spacing-unit} * 2)); - max-width: calc(800px - (#{$spacing-unit} * 2)); - margin-right: auto; - margin-left: auto; - padding-right: $spacing-unit; - padding-left: $spacing-unit; - @extend %clearfix; - - @include media-query($on-laptop) { - max-width: -webkit-calc(800px - (#{$spacing-unit})); - max-width: calc(800px - (#{$spacing-unit})); - padding-right: $spacing-unit / 2; - padding-left: $spacing-unit / 2; - } -} - - - -/** - * Clearfix - */ -%clearfix { - - &:after { - content: ""; - display: table; - clear: both; - } -} - - - -/** - * Icons - */ -.icon { - - > svg { - display: inline-block; - width: 16px; - height: 16px; - vertical-align: middle; - - path { - fill: $grey-color; - } - } -} diff --git a/docs/_sass/_layout.scss b/docs/_sass/_layout.scss deleted file mode 100644 index 2eb740fa67..0000000000 --- a/docs/_sass/_layout.scss +++ /dev/null @@ -1,265 +0,0 @@ -/** - * Site header - */ -.site-header { - border-top: 5px solid $grey-color-dark; - border-bottom: 1px solid $grey-color-light; - min-height: 56px; - background-color: #f8f8f8; - - // Positioning context for the mobile navigation icon - position: relative; -} - -.site-title { - font-size: 26px; - line-height: 56px; - letter-spacing: -1px; - margin-bottom: 0; - float: left; - - &, - &:visited { - color: $grey-color-dark; - } - &:hover { - text-decoration: none; - } -} - -.site-nav { - float: right; - line-height: 56px; - - .menu-icon { - display: none; - } - - .page-link { - color: $grey-color; - line-height: $base-line-height; - - // Gaps between nav items, but not on the first one - &:not(:first-child) { - margin-left: 20px; - } - - &:hover { - color: $text-color; - } - } - - .page-link-active { - color: $text-color; - } - - @include media-query($on-palm) { - position: absolute; - top: 9px; - right: 30px; - background-color: $background-color; - border: 1px solid $grey-color-light; - border-radius: 5px; - text-align: right; - - .menu-icon { - display: block; - float: right; - width: 36px; - height: 26px; - line-height: 0; - padding-top: 10px; - text-align: center; - - > svg { - width: 18px; - height: 15px; - - path { - fill: $grey-color-dark; - } - } - } - - .trigger { - clear: both; - display: none; - } - - &:hover .trigger { - display: block; - padding-bottom: 5px; - } - - .page-link { - display: block; - padding: 5px 10px; - } - } -} - - - -/** - * Site footer - */ -.site-footer { - border-top: 1px solid $grey-color-light; - padding: $spacing-unit 0; -} - -.footer-heading { - font-size: 18px; - margin-bottom: $spacing-unit / 2; -} - -.contact-list, -.social-media-list { - list-style: none; - margin-left: 0; -} - -.footer-col-wrapper { - font-size: 11px; - color: $grey-color; - margin-left: -$spacing-unit / 2; - @extend %clearfix; -} - -.footer-col { - float: left; - margin-bottom: $spacing-unit / 2; - padding-left: $spacing-unit / 2; -} - -.footer-col-left { - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); -} - -.footer-col-right { - text-align: right; - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); -} - -@include media-query($on-laptop) { - .footer-col-left { - width: -webkit-calc(50% - (#{$spacing-unit} / 2)); - width: calc(50% - (#{$spacing-unit} / 2)); - } - - .footer-col-right { - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - -@include media-query($on-palm) { - .footer-col { - float: none; - width: -webkit-calc(100% - (#{$spacing-unit} / 2)); - width: calc(100% - (#{$spacing-unit} / 2)); - } -} - - - -/** - * Page content - */ -.page-content { - padding: $spacing-unit 0; - background-color: white; -} - -.page-heading { - font-size: 20px; -} - -.post-list { - margin-left: 0; - list-style: none; - - > li { - margin-bottom: $spacing-unit; - } -} - -.post-meta { - font-size: $small-font-size; - color: $grey-color; -} - -.post-link { - display: block; - font-size: 24px; -} - - - -/** - * Posts - */ -.post-header { - margin-bottom: $spacing-unit; -} - -.post-title { - font-size: 42px; - letter-spacing: -1px; - line-height: 1; - - @include media-query($on-laptop) { - font-size: 36px; - } - - .edit-page-link { - font-size: 18px; - } -} - -.post-content { - margin-bottom: $spacing-unit; - - h2 { - font-size: 32px; - - @include media-query($on-laptop) { - font-size: 28px; - } - } - - h3 { - font-size: 26px; - - @include media-query($on-laptop) { - font-size: 22px; - } - } - - h4 { - font-size: 20px; - - @include media-query($on-laptop) { - font-size: 18px; - } - } -} - - - -/** - * Docs - */ -.docs-prevnext { - @extend %clearfix; -} - -.docs-prev { - float: left; -} - -.docs-next { - float: right; -} diff --git a/docs/_sass/_syntax-highlighting.scss b/docs/_sass/_syntax-highlighting.scss deleted file mode 100644 index 3758fdb458..0000000000 --- a/docs/_sass/_syntax-highlighting.scss +++ /dev/null @@ -1,76 +0,0 @@ -/** - * Syntax highlighting styles - */ - -/* not official Xcode colors, but looks better on the web */ -$xc-black: black; -$xc-green: #008d14; -$xc-red: #b72748; -$xc-blue: #103ffb; -$xc-turquoise: #3a95ba; - -.highlight { - background: #fff; - @extend %vertical-rhythm; - - .c { color: $xc-green; font-style: italic } // Comment - .err { color: #a61717; background-color: #e3d2d2 } // Error - .k { color: $xc-blue} // Keyword - .o { } // Operator - .cm { color: $xc-green; font-style: italic } // Comment.Multiline - .cp { color: $xc-red} // Comment.Preproc - .c1 { color: $xc-green; font-style: italic } // Comment.Single - .cs { color: $xc-green; font-weight: bold; font-style: italic } // Comment.Special - .gd { color: #000; background-color: #fdd } // Generic.Deleted - .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific - .ge { font-style: italic } // Generic.Emph - .gr { color: #a00 } // Generic.Error - .gh { color: #999 } // Generic.Heading - .gi { color: #000; background-color: #dfd } // Generic.Inserted - .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific - .go { color: #888 } // Generic.Output - .gp { color: #555 } // Generic.Prompt - .gs { font-weight: bold } // Generic.Strong - .gu { color: #aaa } // Generic.Subheading - .gt { color: #a00 } // Generic.Traceback - .kc { color: orange} // Keyword.Constant - .kd { color: orange} // Keyword.Declaration - .kp { color: $xc-green} // Keyword.Pseudo - .kr { color: $xc-green} // Keyword.Reserved - .kt { color: $xc-blue} // Keyword.Type - .m { color: orange } // Literal.Number - .s { color: $xc-red } // Literal.String - .na { color: orange } // Name.Attribute - .nb { color: $xc-blue } // Name.Builtin - .nc { color: $xc-turquoise } // Name.Class - .no { color: orange } // Name.Constant - .ni { color: orange } // Name.Entity - .ne { color: orange } // Name.Exception - .nf { } // Name.Function - .nn { color: orange } // Name.Namespace - .nt { color: orange } // Name.Tag - .nv { } // Name.Variable - .ow { } // Operator.Word - .w { color: #bbb } // Text.Whitespace - .mf {} // Literal.Number.Float - .mh { color: $xc-black } // Literal.Number.Hex - .mi { color: $xc-black } // Literal.Number.Integer - .mo { color: $xc-black } // Literal.Number.Oct - .il { color: $xc-black } // Literal.Number.Integer.Long - .sb { color: #d14 } // Literal.String.Backtick - .sc { color: #d14 } // Literal.String.Char - .sd { color: #d14 } // Literal.String.Doc - .s2 { color: #d14 } // Literal.String.Double - .se { color: #d14 } // Literal.String.Escape - .sh { color: #d14 } // Literal.String.Heredoc - .si { color: #d14 } // Literal.String.Interpol - .sx { color: #d14 } // Literal.String.Other - .sr { color: orange } // Literal.String.Regex - .s1 { color: $xc-red } // Literal.String.Single - .ss { color: $xc-red } // Literal.String.Symbol - .bp { color: $xc-turquoise } // Name.Builtin.Pseudo - .vc { color: $xc-turquoise } // Name.Variable.Class - .vg { color: $xc-black } // Name.Variable.Global - .vi { color: orange } // Name.Variable.Instance - .nl { color: $xc-turquoise } -} diff --git a/docs/assets/guide/1-shuffle-crop.png b/docs/assets/guide/1-shuffle-crop.png deleted file mode 100644 index d1e0a83b0c3c23ee7ae938f88dbc1bebd1f27246..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1016 zcmeAS@N?(olHy`uVBq!ia0y~yVB7>`>u|6ENrnvD*+5dT#5JNMI6tkVJh3R1p&&0k zxu~=_!=cpkGXn$jB2O2`kcwMxZ~J!mRm&Xs_};iY&1Un1je<(9C!d&UW^G$>v%+)X zo+C?KIyKyq)KW7hi5zu0>2@efY{{~WBTj)zulO`CP2ug%G@ALSa$d2xeewC3&(F=h zy>n-2{J!~CbFV+Q{5oe@{_{Eiuc&(-O5tjCQr!KE{qwFfRb{JYC+uC9R=Mcq@-utN zcG_)@n}0LTx>xpd@g$X4k4ygp76!avtYg%2`1-qM(aJfN%jVpSo13uH>g1FwI_fiX zJ1OZfs&pZJ}bs zX11v4WL$hKC0e^h&GWAcX&igRove_L54T-D0R z?*7rcvtHiH`thIM-j6RfuH@X7|9uw7*u-Nz72ov^UAo4mA9rAi=7%?uXXbLd_Z=y$ z{&t{OdUAcZGqX-4Q)%gjlFS_KsR;*}W*Ddc**IPA;4qzs&OJFbe=P29D_D5l*(fE*@9$rO;gu28wiO2Vj*D^`)K>ARSQZ?3tte@vxtv$}(fnz@e!1 zavq)oD}y)W%>_B&Qv8OhQlH4r&wAzg;vVkME-0f`@ZX99t7%_)q5S zS)dRoIl>YeG&!QCJx^e&QGp3T(=JTt-{Lyf_xt`VW4m~78z@J6y85}Sb4q9e0NQ!% A6951J diff --git a/docs/assets/guide/1-shuffle.png b/docs/assets/guide/1-shuffle.png deleted file mode 100644 index 9188eebf8ae9edd78fadd80b1a8f994e116c88e4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19288 zcmdqJXH-*N)Git;iUKOqMN|Y{ng~b{1XKj1OG$vxr4vGEp@gO)pi)#iND=9T5L)OE z0jZ%wKnNWH=?H|9kmSa5@44e0-;ZZ4}rV+3>b@w4@E0C>1N*?Gaeogc$B z_W%Ix)0)qo82e9dPWz?Y1vb(C=x3~DR$cUcJssZntK_T6)ibwD3?8E|vc7xxweZ%p zAD1q~ojv#D+{L(F&ifYK&p+iJ*`0b~k<|CFck4$ikVwvHKp-K-4amTHC&!7y^?>En z)PBo?^`N!DHDkDnY=d01O(wSQqR!0M@0gtM}y#8-Q1{xrvPCenxHF{`(D`a{H!{kRgrrt=Xzr=syay~sUD*YFopw%zk@-L%g@ zs|JD$^mj&iY}!yiBUq!~^1M=4+;cQmA=2eK4IOPQN#uoAKK+&nK(aZumUtIppQVHDoZR92ff>2XkS)exY5XM=lU8>qjuB;((pej18o zteB7Z>2X@j{oJ@SQ9b1pC+Y(#Qv?YL$Co_jA>N0mX*`_bVoo^&F+hD8c0bM`q^G6Q zYx(?Ex4UmjKI0aQZ4=#RpJPCZ9vhl zE?FlfJZL@|0p(O6<$e@)0UlJ|f!ytFeUkL~!9PX%hNbHM0g`PcV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JR_f=stjfpTpeJ?psh-7sGynuPMqk4+N&8J=< z**xs-{ZLovO5<`gq!c6+`v&CTIoY`WuK>CNMg4$QR%G>5WwpXfF#{~l<1`XtTV;^d zTb0!lW^t-7Dc&r^M!q1EW5xiqD%|SX_Y^1C;tmITbp%zdv)soGwlNiC%?>jSqdKeg z7|r@_F@_caG`l)$v@(kmY{NMPR@~(FEmbQV)uhYDY>?Fx1oebaoZyOkcKSxo*kO&rG6wL9w*Ey{a-C` zhC7rJ&jZqa?+>nbKVvSrr=7OvlVK&@At2eBMTS)@INK|EUf-UZF<8T6O zOoZ5I1=(<`vw8w8Zdh3jyoS+Uz5rf%6<3`5HBu4PGi=%D5NDkCxYY$&GsCRjK#Tj> z&3t_X8GvSV;>`$&dLE;m02^~5Hc}n!aAy8BBhVUo4b~W4mH?>I>isgxTEWwd>GGo% zVk6!8HoN*6ZpAg+$s7b1fRPL~uZj0>*1oM#4Y1MbjE55*%{cq~NX$ee-~hCu5*u!) z4fpK(%?#D1vPYo-TUiN>)Q})y1z;?NTq9@B@LF))h=$hIP%MHM`U4aevaki@P+FCl~kq#-s3Ba}%dfo^>-!>Oy&3K&_%MZXd zR*5zH@x8IW;I_t&nBhSHXl>|tThp6eO diff --git a/docs/assets/logo-square.png b/docs/assets/logo-square.png deleted file mode 100755 index 82ad66c69ecdd8626cdd380e5c536dbcaeb0a0fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 66422 zcmeFYS5%W*w?7<2K}E!ZfKuCrCLVy3>U2O>D zc;eB|NgD8t@u~EA@ar;KNgu7_VuSX!a7RLJS-V&wuiSUCKq0k}7S=v)UyyPT2(_CX zLLaTKp)O}p}@mSNN4o@yYkn-{|H&zS<6UC!=$7ntVN*G5>^sWOSqUc z_{&BLYAGcx0vEBiv9_`i`7fRSZ9QCBjQy z6<$3%XKNR4556M_{d?fMNOwCgq_wiUi_?{Vu2{zIf7#yB!qNg}EeTF-Az}%YfQd;$ zEyb*@pcWDqQkJ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ets/logo.png b/docs/assets/logo.png deleted file mode 100755 index dce1ebc95066e56bf72c591027b7776b767a5786..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 105684 zcmeFYXIzu#7e5?}qpc{V7GvcrlBB(g;iWK&rJ z2`lWWAc25@7>4ZUqAl3xZ$JMR&x_~P?|y+K+~-{9I@kAn&$w?N+|p4!^CRnz5D4Uq zx|)(c1VY~dfgDf%{v`NDd5Xma{KJA#HpLjA5Ex%OFF52k2h?r&C3QDDN4P%R&cWZa z4K53T(0L*aO);k0TGI9?H$l6Ddj$R5Jb*L=BCFu%VQ23G$6UG%cSO3&aV=NZb6r9@ z$Z?s7X$xz6D8ikPY5`twg8&^v`v4bvDF-eE`Af2X(m;V59AkIM&&|~xE$t`A^_O00 z@cY5nLR^>rx&`AR$Mv^SrrNhIDWbgKm&63c1nh;OB9|nj1VzL|r9?#dFF}PxU_v6o zLQp9I5fN!o3271WOaEM4U^OoXgtWer%0Fv?PjXyN7>tLskdUvhub?kX5as14BqAjx zB_s?Lf^jq>)g2j_vfawrUZ z_kUmL;6`ALw5}Ht9EzQ*63X7&4epLnSCZobe-U&*I!H@OK_w-{9fSp>#O=ieZo@>S zzz>9^z->t>VVJN3!oeOPe5mKY@1 z?hYtlG|#~a{k>r&xEIm~?x5m@a=Y}Gi=~nOvAihUK}1vv<{)6_ASo;W7ZtS!zai`e zU?O5rQ9Fda1njmX*FW+O|6g4v1dI|oz{$UGbNCeic1dkVplBMe^ zhLB?^o9arx8TyTU96vpTKtJ7B*-v4)pMLJ9Uq+n1S}xx!_;a;cOtw?SIlb!Ih4Fji z@3l`+l};&_l*lY`Y5W?_k@&OT<#sb(1Fw{u^t8Q!>H##VrnH$jwqV^ATs%vwELvWZ zg^euK&DJBjU_}d?W@Jhi&gQS!{^!RNh9uA9|Ndh2UJ3obKiAsv)BWr74HPq=nXgwj zTMP8-CkSNq{{O@e{qaB79eM)tKiC|(0`k9*`Ra@R(ZyF^{Esenlz*18aQrnLR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`6+IB_JhQF?4@)>Q|B58}TCw#ZpUR(K0Ez z5q0T)7?LehKff^wr2Y(>Ta`T2p+vVsY*$9ZNQ4Ut6uDNbxV3LN_2;`+(~@voM}kzuM#Ll)1UI&b!k=O8SnSZJ z#?TwvT^GJmSK4+`*Vk?^N$6Dft*C%;=F>O`Yo)xhqzg z7-=-R>LJj6{V-sIFA^bx-5%Q&8?8kaS~iUj`GOU>xVf)#)Y};+e(o31maQ9~ZG-9D z%^t7DTyHzNx!215ICkvNMnMz!yQ`;oMYd379Xfq6Y8eh5FXI8+x%8<>3lr_wPG2$d zt~|CW=#%K2`4Gzh(_>xu0Ezi!j9$`Nn|z7QCqVjv6I>i1GD)kG+x(N4`hSNO{9l1r kxElR496@R~frk(905D)XJl%De%K*4`+454A>79H32Qrj$WB>pF diff --git a/docs/build.sh b/docs/build.sh deleted file mode 100755 index c532bb0d6b..0000000000 --- a/docs/build.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -set -e - -HEADERS=`ls ../AsyncDisplayKit/*.h ../AsyncDisplayKit/Details/ASRangeController.h ../AsyncDisplayKit/Layout/*.h` - -rm -rf htdocs appledoc - -jekyll build --destination htdocs - -appledoc \ - --no-create-docset \ - --create-html \ - --exit-threshold 2 \ - --no-repeat-first-par \ - --no-merge-categories \ - --explicit-crossref \ - --warn-missing-output-path \ - --warn-missing-company-id \ - --warn-undocumented-object \ - --warn-undocumented-member \ - --warn-empty-description \ - --warn-unknown-directive \ - --warn-invalid-crossref \ - --warn-missing-arg \ - --project-name AsyncDisplayKit \ - --project-company Facebook \ - --company-id "com.facebook" \ - --output appledoc \ - $HEADERS - -mv appledoc/html htdocs/appledoc - -rmdir appledoc diff --git a/docs/css/main.scss b/docs/css/main.scss deleted file mode 100755 index 4417ff0713..0000000000 --- a/docs/css/main.scss +++ /dev/null @@ -1,49 +0,0 @@ ---- -# Only the main Sass file needs front matter (the dashes are enough) ---- -@charset "utf-8"; - - - -// Our variables -$base-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -$base-font-size: 16px; -$small-font-size: $base-font-size * 0.875; -$base-line-height: 1.5; - -$spacing-unit: 30px; - -$text-color: #111; -$background-color: #f8f8f8; -$brand-color: #21b6ff; - -$grey-color: #828282; -$grey-color-light: lighten($grey-color, 40%); -$grey-color-dark: darken($grey-color, 25%); - -$on-palm: 600px; -$on-laptop: 800px; - - - -// Using media queries with like this: -// @include media-query($palm) { -// .wrapper { -// padding-right: $spacing-unit / 2; -// padding-left: $spacing-unit / 2; -// } -// } -@mixin media-query($device) { - @media screen and (max-width: $device) { - @content; - } -} - - - -// Import partials from `sass_dir` (defaults to `_sass`) -@import - "base", - "layout", - "syntax-highlighting" -; diff --git a/docs/guide/1-introduction.md b/docs/guide/1-introduction.md deleted file mode 100644 index d923c0a215..0000000000 --- a/docs/guide/1-introduction.md +++ /dev/null @@ -1,150 +0,0 @@ ---- -layout: docs -title: Getting started -permalink: /guide/ -next: guide/2/ ---- - -## Concepts - -AsyncDisplayKit's basic unit is the *node*. ASDisplayNode is an abstraction -over UIView, which in turn is an abstraction over CALayer. Unlike views, which -can only be used on the main thread, nodes are thread-safe: you can -instantiate and configure entire hierarchies of them in parallel on background -threads. - -To keep its user interface smooth and responsive, your app should render at 60 -frames per second — the gold standard on iOS. This means the main thread -has one-sixtieth of a second to push each frame. That's 16 milliseconds to -execute all layout and drawing code! And because of system overhead, your code -usually has less than ten milliseconds to run before it causes a frame drop. - -AsyncDisplayKit lets you move image decoding, text sizing and rendering, and -other expensive UI operations off the main thread. It has other tricks up its -sleeve too... but we'll get to that later. :] - -## Nodes as drop-in view replacements - -If you're used to working with views, you already know how to use nodes. The -node API is similar to UIView's, with some additional conveniences — for -example, you can access common CALayer properties directly. To add a node to -an existing view or layer hierarchy, use its `node.view` or `node.layer`. - -AsyncDisplayKit's core components include: - -* *ASDisplayNode*. Counterpart to UIView — subclass to make custom nodes. -* *ASControlNode*. Analogous to UIControl — subclass to make buttons. -* *ASImageNode*. Like UIImageView — decodes images asynchronously. -* *ASTextNode*. Like UITextView — built on TextKit with full-featured - rich text support. -* *ASTableView* and *ASCollectionView*. UITableView and UICollectionView - subclasses that support nodes. - -You can use these as drop-in replacements for their UIKit counterparts. While -ASDK works most effectively with fully node-based hierarchies, even replacing -individual views with nodes can improve performance. - -Let's look at an example. - -We'll start out by using nodes synchronously on the main thread — the -same way you already use views. This code is a familiar sight in custom view -controller `-loadView` implementations: - -```objective-c -_imageView = [[UIImageView alloc] init]; -_imageView.image = [UIImage imageNamed:@"hello"]; -_imageView.frame = CGRectMake(10.0f, 10.0f, 40.0f, 40.0f); -[self.view addSubview:_imageView]; -``` - -We can replace it with the following node-based code: - -```objective-c -_imageNode = [[ASImageNode alloc] init]; -_imageNode.backgroundColor = [UIColor lightGrayColor]; -_imageNode.image = [UIImage imageNamed:@"hello"]; -_imageNode.frame = CGRectMake(10.0f, 10.0f, 40.0f, 40.0f); -[self.view addSubview:_imageNode.view]; -``` - -This doesn't take advantage of ASDK's asynchronous sizing and layout -functionality, but it's already an improvement. The first block of code -synchronously decodes `hello.png` on the main thread; the second starts -decoding the image on a background thread, possibly on a different CPU core. - -(Note that we're setting a placeholder background colour on the node, "holding -its place" onscreen until the real content appears. This works well with -images but less so with text — people expect text to appear instantly, -with images loading in after a slight delay. We'll discuss techniques to -improve this later on.) - -## Button nodes - -ASImageNode and ASTextNode both inherit from ASControlNode, so you can use them -as buttons. Let's say we're making a music player and we want to add a -(non-skeuomorphic, iOS 7-style) shuffle button: - -[![shuffle]({{ site.baseurl }}/assets/guide/1-shuffle-crop.png)]({{ site.baseurl }}/assets/guide/1-shuffle.png) - -Our view controller will look something like this: - -```objective-c -- (void)viewDidLoad -{ - [super viewDidLoad]; - - // attribute a string - NSDictionary *attrs = @{ - NSFontAttributeName: [UIFont systemFontOfSize:12.0f], - NSForegroundColorAttributeName: [UIColor redColor], - }; - NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"shuffle" - attributes:attrs]; - - // create the node - _shuffleNode = [[ASTextNode alloc] init]; - _shuffleNode.attributedString = string; - - // configure the button - _shuffleNode.userInteractionEnabled = YES; // opt into touch handling - [_shuffleNode addTarget:self - action:@selector(buttonTapped:) - forControlEvents:ASControlNodeEventTouchUpInside]; - - // size all the things - CGRect b = self.view.bounds; // convenience - CGSize size = [_shuffleNode measure:CGSizeMake(b.size.width, FLT_MAX)]; - CGPoint origin = CGPointMake(roundf( (b.size.width - size.width) / 2.0f ), - roundf( (b.size.height - size.height) / 2.0f )); - _shuffleNode.frame = (CGRect){ origin, size }; - - // add to our view - [self.view addSubview:_shuffleNode.view]; -} - -- (void)buttonTapped:(id)sender -{ - NSLog(@"tapped!"); -} -``` - -This works as you would expect. Unfortunately, this button is only 14½ -points tall — nowhere near the standard 44×44 minimum tap target -size — and it's very difficult to tap. We could solve this by -subclassing the text node and overriding `-hitTest:withEvent:`. We could even -force the text view to have a minimum height during layout. But wouldn't it be -nice if there were a more elegant way? - -```objective-c - // size all the things - /* ... */ - - // make the tap target taller - CGFloat extendY = roundf( (44.0f - size.height) / 2.0f ); - _shuffleNode.hitTestSlop = UIEdgeInsetsMake(-extendY, 0.0f, -extendY, 0.0f); -``` - -Et voilà! *Hit-test slops* work on all nodes, and are a nice example of what -this new abstraction enables. - -Next up, making your own nodes! diff --git a/docs/guide/2-custom-nodes.md b/docs/guide/2-custom-nodes.md deleted file mode 100644 index 6d67ed3a05..0000000000 --- a/docs/guide/2-custom-nodes.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -layout: docs -title: Custom nodes -permalink: /guide/2/ -prev: guide/ -next: guide/3/ ---- - -## View hierarchies - -Sizing and layout of custom view hierarchies are typically done all at once on -the main thread. For example, a custom UIView that minimally encloses a text -view and an image view might look like this: - -```objective-c -- (CGSize)sizeThatFits:(CGSize)size -{ - // size the image - CGSize imageSize = [_imageView sizeThatFits:size]; - - // size the text view - CGSize maxTextSize = CGSizeMake(size.width - imageSize.width, size.height); - CGSize textSize = [_textView sizeThatFits:maxTextSize]; - - // make sure everything fits - CGFloat minHeight = MAX(imageSize.height, textSize.height); - return CGSizeMake(size.width, minHeight); -} - -- (void)layoutSubviews -{ - CGSize size = self.bounds.size; // convenience - - // size and layout the image - CGSize imageSize = [_imageView sizeThatFits:size]; - _imageView.frame = CGRectMake(size.width - imageSize.width, 0.0f, - imageSize.width, imageSize.height); - - // size and layout the text view - CGSize maxTextSize = CGSizeMake(size.width - imageSize.width, size.height); - CGSize textSize = [_textView sizeThatFits:maxTextSize]; - _textView.frame = (CGRect){ CGPointZero, textSize }; -} -``` - -This isn't ideal. We're sizing our subviews twice — once to figure out -how big our view needs to be and once when laying it out — and while our -layout arithmetic is cheap and quick, we're also blocking the main thread on -expensive text sizing. - -We could improve the situation by manually cacheing our subviews' sizes, but -that solution comes with its own set of problems. Just adding `_imageSize` and -`_textSize` ivars wouldn't be enough: for example, if the text were to change, -we'd need to recompute its size. The boilerplate would quickly become -untenable. - -Further, even with a cache, we'll still be blocking the main thread on sizing -*sometimes*. We could try to shift sizing to a background thread with -`dispatch_async()`, but even if our own code is thread-safe, UIView methods are -documented to [only work on the main -thread](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html): - -> Manipulations to your application’s user interface must occur on the main -> thread. Thus, you should always call the methods of the UIView class from -> code running in the main thread of your application. The only time this may -> not be strictly necessary is when creating the view object itself but all -> other manipulations should occur on the main thread. - -This is a pretty deep rabbit hole. We could attempt to work around the fact -that UILabels and UITextViews cannot safely be sized on background threads by -manually creating a TextKit stack and sizing the text ourselves... but that's a -laborious duplication of work. Further, if UITextView's layout behaviour -changes in an iOS update, our sizing code will break. (And did we mention that -TextKit isn't thread-safe either?) - -## Node hierarchies - -Enter AsyncDisplayKit. Our custom node looks like this: - -```objective-c -#import - -... - -// perform expensive sizing operations on a background thread -- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize -{ - // size the image - CGSize imageSize = [_imageNode measure:constrainedSize]; - - // size the text node - CGSize maxTextSize = CGSizeMake(constrainedSize.width - imageSize.width, - constrainedSize.height); - CGSize textSize = [_textNode measure:maxTextSize]; - - // make sure everything fits - CGFloat minHeight = MAX(imageSize.height, textSize.height); - return CGSizeMake(constrainedSize.width, minHeight); -} - -// do as little work as possible in main-thread layout -- (void)layout -{ - // layout the image using its cached size - CGSize imageSize = _imageNode.calculatedSize; - _imageNode.frame = CGRectMake(self.bounds.size.width - imageSize.width, 0.0f, - imageSize.width, imageSize.height); - - // layout the text view using its cached size - CGSize textSize = _textNode.calculatedSize; - _textNode.frame = (CGRect){ CGPointZero, textSize }; -} -``` - -ASImageNode and ASTextNode, like the rest of AsyncDisplayKit, are thread-safe, -so we can size them on background threads. The `-measure:` method is like -`-sizeThatFits:`, but with side effects: it caches both the argument -(`constrainedSizeForCalculatedSize`) and the result (`calculatedSize`) for -quick access later on — like in our now-snappy `-layout` implementation. - -As you can see, node hierarchies are sized and laid out in much the same way as -their view counterparts. Custom nodes do need to be written with a few things -in mind: - -* Nodes must recursively measure all of their subnodes in their - `-calculateSizeThatFits:` implementations. Note that the `-measure:` - machinery will only call `-calculateSizeThatFits:` if a new measurement pass - is needed (e.g., if the constrained size has changed). - -* Nodes should perform any other expensive pre-layout calculations in - `-calculateSizeThatFits:`, cacheing useful intermediate results in ivars as - appropriate. - -* Nodes should call `[self invalidateCalculatedSize]` when necessary. For - example, ASTextNode invalidates its calculated size when its - `attributedString` property is changed. - -For more examples of custom sizing and layout, along with a demo of -ASTextNode's features, check out `BlurbNode` and `KittenNode` in the -[Kittens](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens) -sample project. - -## Custom drawing - -To guarantee thread safety in its highly-concurrent drawing system, the node -drawing API diverges substantially from UIView's. Instead of implementing -`-drawRect:`, you must: - -1. Define an internal "draw parameters" class for your custom node. This - class should be able to store any state your node needs to draw itself - — it can be a plain old NSObject or even a dictionary. - -2. Return a configured instance of your draw parameters class in - `-drawParametersForAsyncLayer:`. This method will always be called on the - main thread. - -3. Implement either `+drawRect:withParameters:isCancelled:isRasterizing:` or - `+displayWithParameters:isCancelled:`. Note that these are *class* methods - that will not have access to your node's state — only the draw - parameters object. They can be called on any thread and must be - thread-safe. - -For example, this node will draw a rainbow: - -```objective-c -@interface RainbowNode : ASDisplayNode -@end - -@implementation RainbowNode - -+ (void)drawRect:(CGRect)bounds - withParameters:(id)parameters - isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock - isRasterizing:(BOOL)isRasterizing -{ - // clear the backing store, but only if we're not rasterising into another layer - if (!isRasterizing) { - [[UIColor whiteColor] set]; - UIRectFill(bounds); - } - - // UIColor sadly lacks +indigoColor and +violetColor methods - NSArray *colors = @[ [UIColor redColor], - [UIColor orangeColor], - [UIColor yellowColor], - [UIColor greenColor], - [UIColor blueColor], - [UIColor purpleColor] ]; - CGFloat stripeHeight = roundf(bounds.size.height / (float)colors.count); - - // draw the stripes - for (UIColor *color in colors) { - CGRect stripe = CGRectZero; - CGRectDivide(bounds, &stripe, &bounds, stripeHeight, CGRectMinYEdge); - [color set]; - UIRectFill(stripe); - } -} - -@end -``` - -This could easily be extended to support vertical rainbows too, by adding a -`vertical` property to the node, exporting it in -`-drawParametersForAsyncLayer:`, and referencing it in -`+drawRect:withParameters:isCancelled:isRasterizing:`. More-complex nodes can -be supported in much the same way. - -For more on custom nodes, check out the [subclassing -header](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASDisplayNode%2BSubclasses.h) -or read on! diff --git a/docs/guide/3-asynchronous-display.md b/docs/guide/3-asynchronous-display.md deleted file mode 100644 index acc9f37911..0000000000 --- a/docs/guide/3-asynchronous-display.md +++ /dev/null @@ -1,102 +0,0 @@ ---- -layout: docs -title: Asynchronous display -permalink: /guide/3/ -prev: guide/2/ -next: guide/4/ ---- - -## Realistic placeholders - -Nodes need to complete both a *measurement pass* and a *display pass* before -they're fully rendered. It's possible to force either step to happen -synchronously: call `-measure:` in `-layoutSubviews` to perform sizing on the -main thread, or set a node's `displaysAsynchronously` flag to NO to disable -ASDK's async display machinery. (AsyncDisplayKit can still improve your app's -performance even when rendering fully synchronously — more on that -later!) - -The recommended way to use ASDK is to only add nodes to your view hierarchy -once they've been sized. This avoids unsightly layout changes as the -measurement pass completes, but if you enable asynchronous display, it will -always be possible for a node to appear onscreen before its content has fully -rendered. We'll discuss techniques to minimise this shortly, but you should -take it into account and include *realistic placeholders* in your app designs. - -Once its measurement pass has completed, a node can accurately place all of its -subnodes onscreen — they'll just be blank. The easiest way to make a -realistic placeholder is to set static background colours on your subnodes. -This effect looks better than generic placeholder images because it varies -based on the content being loaded, and it works particularly well for opaque -images. You can also create visually-appealing placeholder nodes, like the -shimmery lines representing text in Paper as its stories are loaded, and swap -them out with your content nodes once they've finished displaying. - -## Working range - -So far, we've only discussed asynchronous sizing: toss a "create a node -hierarchy and measure it" block onto a background thread, then trampoline to -the main thread to add it to the view hierarchy when that's done. Ideally, as -much content as possible should be fully-rendered and ready to go as soon as -the user scrolls to it. This requires triggering display passes in advance. - -If your app's content is in a scroll view or can be paged through, like -Instagram's main feed or Paper's story strip, the solution is a *working -range*. A working range controller tracks the *visible range*, the subset of -content that's currently visible onscreen, and enqueues asynchronous rendering -for the next few screenfuls of content. As the user scrolls, a screenful or -two of previous content is preserved; the rest is cleared to conserve memory. -If she starts scrolling in the other direction, the working range trashes its -render queue and starts pre-rendering in the new direction of scroll — -and because of the buffer of previous content, this entire process will -typically be invisible. - -AsyncDisplayKit includes a generic working range controller, -`ASRangeController`. Its working range size can be tuned depending on your -app: if your nodes are simple, even an iPhone 4 can maintain a substantial -working range, but heavyweight nodes like Facebook stories are expensive and -need to be pruned quickly. - -```objective-c -ASRangeController *rangeController = [[ASRangeController alloc] init]; -rangeController.tuningParameters = (ASRangeTuningParameters){ - .leadingBufferScreenfuls = 2.0f; // two screenfuls in the direction of scroll - .trailingBufferScreenfuls = 0.5f; // one-half screenful in the other direction -}; -``` - -If you use a working range, you should profile your app and consider tuning it -differently on a per-device basis. iPhone 4 has 512MB of RAM and a single-core -A4 chipset, while iPhone 6 has 1GB of RAM and the orders-of-magnitude-faster -multicore A8 — and if your app supports iOS 7, it will be used on both. - -## ASTableView - -ASRangeController manages working ranges, but doesn't actually display content. -If your content is currently rendered in a UITableView, you can convert it to -use `ASTableView` and custom nodes — just subclass `ASCellNode` instead -of ASDisplayNode. ASTableView is a UITableView subclass that integrates -node-based cells and a working range. - -ASTableView doesn't let cells onscreen until their underlying nodes have been -sized, and as such can fully benefit from realistic placeholders. Its API is -very similar to UITableView (see the -[Kittens](https://github.com/facebook/AsyncDisplayKit/tree/master/examples/Kittens) -sample project for an example), with some key changes: - -* Rather than setting the table view's `.delegate` and `.dataSource`, you set - its `.asyncDelegate` and `.asyncDataSource`. See - [ASTableView.h](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASTableView.h) - for how its delegate and data source protocols differ from UITableView's. - -* Instead of implementing `-tableView:cellForRowAtIndexPath:`, your data - source must implement `-tableView:nodeForRowAtIndexPath:`. This method must - be thread-safe and should not implement reuse. Unlike the UITableView - version, it won't be called when the row is about to display. - -* `-tableView:heightForRowAtIndexPath:` has been removed — ASTableView - lets your cell nodes size themselves. This means you no longer have to - manually duplicate or factor out layout and sizing logic for - dynamically-sized UITableViewCells! - -Next up, how to get the most out of ASDK in your app. diff --git a/docs/guide/4-making-the-most-of-asdk.md b/docs/guide/4-making-the-most-of-asdk.md deleted file mode 100644 index f35ad900b4..0000000000 --- a/docs/guide/4-making-the-most-of-asdk.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -layout: docs -title: Making the most of AsyncDisplayKit -permalink: /guide/4/ -prev: guide/3/ -next: guide/5/ ---- - -## A note on optimisation - -AsyncDisplayKit is powerful and flexible, but it is not a panacea. If your app -has a complex image- or text-heavy user interface, ASDK can definitely help -improve its performance — but if you're blocking the main thread on -network requests, you should consider rearchitecting a few things first. :] - -So why is it worthwhile to change the way we do view layout and rendering, -given that UIKit has always been locked to the main thread and performant iOS -apps have been shipping since iPhone's launch? - -### Modern animations - -Until iOS 7, static animations (à la `+[UIView -animateWithDuration:animations:]`) were the standard. The post-skeuomorphism -redesign brought with it highly-interactive, physics-based animations, with -springs joining the ranks of constant animation functions like -`UIViewAnimationOptionCurveEaseInOut`. - -Classic animations aren't actually executed in your app. They're executed -out-of-process, in the high-priority Core Animation render server. Thanks to -pre-emptive multitasking, an app can block its main thread continuously without -causing the animation to drop a single frame. - -Critically, dynamic animations can't be offloaded the same way, and both -[pop](https://github.com/facebook/pop) and UIKit Dynamics execute physics -simulations on your app's main thread. This is because executing arbitrary -code in the render server would introduce unacceptable latency, even if it -could be done securely. - -Physics-based animations are often interactive, letting you start an animation -and interrupt it before it completes. Paper lets you fling objects across the -screen and catch them before they land, or grab a view that's being pulled by a -spring and tear it off. This requires processing touch events and updating -animation targets in realtime — even short delays for inter-process -communication would shatter the illusion. - -(Fun fact: Inertial scrolling is also a physics animation! UIScrollView has -always implemented its animations on the main thread, which is why stuttery -scrolling is the hallmark of a slow app.) - -### The main-thread bottleneck - -Physics animations aren't the only thing that need to happen on the main -thread. The main thread's [run -loop](https://developer.apple.com/library/ios/documentation/cocoa/conceptual/multithreading/runloopmanagement/runloopmanagement.html) -is responsible for handling touch events and initiating drawing operations -— and with UIKit in the mix, it also has to render text, decode images, -and do any other custom drawing (e.g., using Core Graphics). - -If an iteration of the main thread's run loop takes too long, it will drop an -animation frame and may fail to handle touch events in time. Each iteration of -the run loop must complete within 16ms in order to drive 60fps animations, and -your own code typically has less than 10ms to execute. This means that the -best way to keep your app smooth and responsive is to do as little work on the -main thread as possible. - -What's more, the main thread only executes on one core! Single-threaded view -hierarchies can't take advantage of the multicore CPUs in all modern iOS -devices. This is important for more than just performance reasons — it's -also critical for battery life. Running the CPU on all cores for a short time -is preferable to running one core for an extended amount of time: if the -processor can *race to sleep* by finishing its work and idling faster, it can -spend more time in a low-power mode, improving battery life. - -## When to go asynchronous - -AsyncDisplayKit really shines when used fully asynchronously, shifting both -measurement and rendering passes off the main thread and onto multiple cores. -This requires a completely node-based hierarchy. Just as degrading from -UIViews to CALayers disables view-specific functionality like touch handling -from that point on, degrading from nodes to views disables async behaviour. - -You don't, however, need to convert your app's entire view hierarchy to nodes. -In fact, you shouldn't! Asynchronously bringing up your app's core UI, like -navigation elements or tab bars, would be a very confusing experience. Those -elements of your apps can still be nodes, but should be fully synchronous to -guarantee a fully-usable interface as quickly as possible. (This is why -UIWindow has no node equivalent.) - -There are two key situations where asynchronous hierarchies excel: - -1. *Parallelisation*. Measuring and rendering UITableViewCells (or your app's - equivalent, e.g., story cards in Paper) are embarrassingly parallel - problems. Table cells typically have a fixed width and variable height - determined by their contents — the argument to `-measure:` for one - cell doesn't depend on any other cells' calculations, so we can enqueue an - arbitrary number of cell measurement passes at once. - -2. *Preloading*. An app with five tabs should synchronously load the first - one so content is ready to go as quickly as possible. Once this is - complete and the CPU is idle, why not asynchronously prepare the other tabs - so the user doesn't have to wait? This is inconvenient with views, but - very easy with nodes. - -Paper's asynchronous rendering starts at the story strip. You should profile -your app and watch how people use it in the wild to decide what combination of -synchrony and asynchrony yields the best user experience. - -## Additional optimisations - -Complex hierarchies — even when rendered asynchronously — can -impose a cost because of the sheer number of views involved. Working around -this can be painful, but AsyncDisplayKit makes it easy! - -* *Layer-backing*. In some cases, you can substantially improve your app's - performance by using layers instead of views. Manually converting - view-based code to layers is laborious due to the difference in APIs. - Worse, if at some point you need to enable touch handling or other - view-specific functionality, you have to manually convert everything back - (and risk regressions!). - - With nodes, converting an entire subtree from views to layers is as simple - as... - - rootNode.layerBacked = YES; - - ...and if you need to go back, it's as simple as deleting one line. We - recommend enabling layer-backing as a matter of course in any custom node - that doesn't need touch handling. - -* *Precompositing*. Flattening an entire view hierarchy into a single layer - also improves performance, but comes with a hit to maintainability and - hierarchy-based reasoning. Nodes can do this for you too! - - rootNode.shouldRasterizeDescendants = YES; - - ...will cause the entire node hierarchy from that point on to be rendered - into one layer. - -Next up: AsyncDisplayKit, under the hood. diff --git a/docs/guide/5-under-the-hood.md b/docs/guide/5-under-the-hood.md deleted file mode 100644 index 01229ec3ff..0000000000 --- a/docs/guide/5-under-the-hood.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -layout: docs -title: Under the hood -permalink: /guide/5/ -prev: guide/4/ ---- - -## Node architecture - -*(Skip to the next section if you're not interested in AsyncDisplayKit implementation details.)* - -We've described nodes as an abstraction over views and layers, and shown how to -interact with the underlying UIViews and CALayers when necessary. Nodes don't -wrap or vend their UIKit counterparts, though — an ASImageNode's `.view` -is not a UIImageView! So how do nodes work? - -**NOTE:** Classes whose names begin with `_` are private. Don't use them -directly! - -Creating a node doesn't create its underlying view-layer pair. This is why you -can create nodes cheaply and on background threads. When you use a UIView or -CALayer property on a node, you're actually interacting with a proxy object, -[`_ASPendingState`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Private/_ASPendingState.h), -that's preconfigured to match UIView and CALayer defaults. - -The first access to a node's `.view` or `.layer` property causes both to be -initialised and configured with the node's current state. If it has subnodes, -they are recursively loaded as well. Once a node has been loaded, the proxy -object is destroyed and the node becomes main-thread-affined — its -properties will update the underlying view directly. (Layer-backed nodes do -the same, not loading views.) - -Nodes are powered by -[`_ASDisplayLayer`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/_ASDisplayLayer.h) -and -[`_ASDisplayView`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Details/_ASDisplayView.h). -These are lightweight to create and add to their respective hierarchies, and -provide integration points that allow nodes to act as full-fledged views or -layers. It's possible to create nodes that are backed by custom view or layer -classes, but doing so is strongly discouraged as it disables the majority of -ASDK's functionality. - -When Core Animation asks an `_ASDisplayLayer` to draw itself, the request is -forwarded to its node. Unless asynchronous display has been disabled, the -actual draw call won't happen immediately or on the main thread. Instead, a -display block will be added to a background queue. These blocks are executed -in parallel, but you can enable `ASDISPLAYNODE_DELAY_DISPLAY` in -[`ASDisplayNode(AsyncDisplay)`](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/Private/ASDisplayNode%2BAsyncDisplay.mm) -to serialise the render system for debugging. - -Common UIView subclass hooks are forwarded from `_ASDisplayView` to its -underlying node, including touch handling, hit-testing, and gesture recogniser -delegate calls. Because an `_ASDisplayView`'s layer is an `_ASDisplayLayer`, -view-backed nodes also participate in asynchronous display. - -## In practice - -What does this mean for your custom nodes? - -You can implement methods like `-touchesBegan:withEvent:` / -`touchesMoved:withEvent:` / `touchesEnded:withEvent:` / -`touchesCancelled:withEvent:` in your nodes exactly as you would in a UIView -subclass. If you find you need a subclass hook that hasn't already been -provided, please file an issue on GitHub — or add it yourself and submit a -pull request! - -If you need to interact or configure your node's underlying view or layer, -don't do so in `-init`. Instead, override `-didLoad` and check if you're -layer-backed: - -```objective-c -- (void)didLoad -{ - [super didLoad]; - - // add a gesture recogniser, if we have a view to add it to - if (!self.layerBacked) { - _gestureRecogniser = [[UITapGestureRecognizer alloc] initWithTarget:self - action:@selector(_tap:)]; - [self.view addGestureRecognizer:_gestureRecogniser]; - } -} -``` - -## *fin.* - -Thanks for reading! If you have any questions, please file a GitHub issue or -post in the [Facebook group](https://www.facebook.com/groups/551597518288687). -We'd love to hear from you. diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index ff8065921a..0000000000 --- a/docs/index.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -layout: page -title: Smooth asynchronous user interfaces for iOS apps ---- - -![logo]({{ site.baseurl }}/assets/logo.png) - -AsyncDisplayKit is an iOS framework that keeps even the most complex user -interfaces smooth and responsive. It was originally built to make Facebook's -[Paper](https://facebook.com/paper) possible, and goes hand-in-hand with -[pop](https://github.com/facebook/pop)'s physics-based animations — but -it's just as powerful with UIKit Dynamics and conventional app designs. - - -
-### Quick start - -ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: - -```ruby -pod 'AsyncDisplayKit' -``` - -(ASDK can also be used as a regular static library: Copy the project to your -codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace. Add -`libAsyncDisplayKit.a`, AssetsLibrary, and Photos to the "Link Binary With -Libraries" build phase. Include `-lc++ -ObjC` in your project linker flags.) - -Import the framework header, or create an [Objective-C bridging -header](https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/MixandMatch.html) -if you're using Swift: - -```objective-c -#import -``` - -AsyncDisplayKit Nodes are a thread-safe abstraction layer over UIViews and -CALayers: - -![logo]({{ site.baseurl }}/assets/node-view-layer.png) - -You can construct entire node hierarchies in parallel, or instantiate and size -a single node on a background thread — for example, you could do -something like this in a UIViewController: - -```objective-c -dispatch_async(_backgroundQueue, ^{ - ASTextNode *node = [[ASTextNode alloc] init]; - node.attributedString = [[NSAttributedString alloc] initWithString:@"hello!" - attributes:nil]; - [node measure:CGSizeMake(screenWidth, FLT_MAX)]; - node.frame = (CGRect){ CGPointZero, node.calculatedSize }; - - // self.view isn't a node, so we can only use it on the main thread - dispatch_async(dispatch_get_main_queue(), ^{ - [self.view addSubview:node.view]; - }); -}); -``` - -AsyncDisplayKit at a glance: - -* `ASImageNode` and `ASTextNode` are drop-in replacements for UIImageView and - UITextView. -* `ASMultiplexImageNode` can load and display progressively higher-quality - variants of an image over a slow cell network, letting you quickly show a - low-resolution photo while the full size downloads. -* `ASNetworkImageNode` is a simpler, single-image counterpart to the Multiplex - node. -* `ASTableView` and `ASCollectionView` are a node-aware UITableView and - UICollectionView, respectively, that can asynchronously preload cell nodes - — from loading network data to rendering — all without blocking - the main thread. - -You can also easily [create your own -nodes](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASDisplayNode%2BSubclasses.h) -to implement node hierarchies or custom drawing. - - -
-### Learn more - -* Read the [Getting Started guide]({{ site.baseurl }}/guide) -* Get the [sample projects](https://github.com/facebook/AsyncDisplayKit/tree/master/examples) -* Browse the [API reference]({{ site.baseurl }}/appledoc) -* Watch the [NSLondon talk](http://vimeo.com/103589245) or the [NSSpain talk](https://www.youtube.com/watch?v=RY_X7l1g79Q) From cf010176b417940c99a2e4f7c0bd1eb40bfae91f Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 10 Jul 2016 19:06:40 -0700 Subject: [PATCH 113/247] Update .gitignore --- .gitignore | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.gitignore b/.gitignore index 84de6767f4..253f8380d5 100644 --- a/.gitignore +++ b/.gitignore @@ -17,10 +17,6 @@ Pods DerivedData build -docs/_site -docs/htdocs -docs/.sass-cache - *.swp *.lock From 1d93dbc0b30b3846532f1b1915b9d0a15f246b72 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 10 Jul 2016 20:12:36 -0700 Subject: [PATCH 114/247] Add files via upload --- Default-568h@2x.png | Bin 0 -> 17520 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Default-568h@2x.png diff --git a/Default-568h@2x.png b/Default-568h@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1547a98454a45fe958e45470a1e9594e3a8906fd GIT binary patch literal 17520 zcmeI3&u`;I6vw9vhb5>d4j{zA$_fDzj(<0aNm5GErIkpxYKyiNhuw)iPOK)jv7ILE zX$2=vNSqMjuzvyn01^l!&fGb11%VKUJ#d1togeN?GIZ5NXr+nN#&6zy-^_g8%(HXw zC;NNvt`}Y|AcWR;cUlJs-FSe|v%$?9wB^z7;a&RmT(ENzA@uwU$=@3K;>(v1dh1j7 z=r}%Zzh_$hpoDF|LrUX8Kzk!p+Z+ejIwi5tAzjz27ytPB+oIsw_2ONlEw_Uv>A5=> zAvwI*JF+fLt*TwzY!qr^lLi=&7z^V;-;2y~y_m)|>2=a96@|1*d|EGVB?Ah_?R}x? zheR++hG@x(E|jY!#ZdH$@}{85iYCdLq-dg|nsU`t3}NyqHVX8r7TS(^(7HVtj#~9% zFOCCKl18IZX{43>uq!FmYE_a|NmWJKLyXS77>`9Sx|Ic)#%Ynr3f&-feNRZ@;*LLz z>&0R+(Cjl=*C3b;&fF^pra5W1XJap&?_jWW=qTPkqX;HQmnx&9^MFVPB=U!$MYhlAQf@66Bj z|2*0AP^5)p(x97B7Zq7l^dnU^wW=wXMY(LsaxO^L6U1oyw(FcPiJ@0aSV{SoJJ@kVxmu}Iuwgikil?D-@`ccMLYI~~+|Tt%X8*WD zED5tP)Q%g`&3T^Nv~=sHh3t@gc)4}z=(}k_3UC;a_F@aa3oW;+{SC2935s!7CvQTNS)j=ZPiAOjjTV1**{`H_| zAunrS?3$F+{l5DjWFf+5*UNz+E2@mEy0~GKv8b12B32ERh~*YY# zOjVy2r2i=g^Zje}u-7GaLz*sY+VE7R?Mk)pnrX}5N1pbyWoPhmDV$dD#nM?z9v)0u zc4-N~X}MEs(n8yO!({!Blk(Xgrv1yROh1y6{GUkkZYVurOY?3hoh#q>+_*t+dFez! zb54~!;beEB3SG^ek1L%$16wZRDjn z*F>6SEBEA_md>n|K9|#<1k&s`!9rD?-Fcqm#e7XqGAfA02LV9XCdb9*1H2p;0Kzso zE;b+F<+uP4w#jj^`2a7+1%R+kj*HC)csVWrgl%$MY(ButaRDG~ljCCZ0bY&^0AZUP z7n=|8a$Eoi+vK>|e1MnZ0zlX%$HnFYyc`z*!ZtZBHXq>SxBw8g$#Jpy058V{fUr%D zi_HgkIW7Q%ZE{>}KETUy0U&IX<6`pxUXBX@VVfKmn-B1ETmT5$HaRXfAK>M<01&pxak2RTFUJLduuUee!u%~;;?Y-YNAw-q_19i`o4$W5 zSUU%8gf3o1=)uPb{q;Bf{sp0-jL@(55i&nV=tcjtdq3Pp=;jBzt*xW+PrrSqtWo9n z4mH~~(86W|0m0Z!mC3H;oB2JPKLYv26X|1**9Ztu0edguN}{{Z>Z BpTqzF literal 0 HcmV?d00001 From 2317e17c539b01d3b41d5fcf0acdb5cd1eb89a5c Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Sun, 10 Jul 2016 21:17:32 -0700 Subject: [PATCH 115/247] Remove UIKit call from -init!1 --- examples/ASDKgram/Sample/PhotoFeedNodeController.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ASDKgram/Sample/PhotoFeedNodeController.m b/examples/ASDKgram/Sample/PhotoFeedNodeController.m index f99e6356d2..2a44028fdc 100644 --- a/examples/ASDKgram/Sample/PhotoFeedNodeController.m +++ b/examples/ASDKgram/Sample/PhotoFeedNodeController.m @@ -38,6 +38,8 @@ #pragma mark - Lifecycle +// -init is often called off the main thread in ASDK. Therefore it is imperative that no UIKit objects are accessed. +// Examples of common errors include accessing the node’s view or creating a gesture recognizer. - (instancetype)init { _tableNode = [[ASTableNode alloc] init]; @@ -50,17 +52,19 @@ _tableNode.dataSource = self; _tableNode.delegate = self; - _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; } return self; } -// do any ASDK view stuff in loadView +// -loadView is guaranteed to be called on the main thread and is the appropriate place to +// set up an UIKit objects you may be using. - (void)loadView { [super loadView]; + _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; + _photoFeed = [[PhotoFeedModel alloc] initWithPhotoFeedModelType:PhotoFeedModelTypePopular imageSize:[self imageSizeForScreenWidth]]; [self refreshFeed]; From 012c927cd87529544ed1f079b7f3ff6bc184895b Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sun, 10 Jul 2016 23:01:54 -0700 Subject: [PATCH 116/247] [ASLayout] Small optimization to eliminate one method call in an extremely hot codepath. This was observed with quantitative profiling results. We have some opportunities to micro-optimize the layout objects. --- AsyncDisplayKit/Layout/ASLayout.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/Layout/ASLayout.mm b/AsyncDisplayKit/Layout/ASLayout.mm index 4733ac7c1d..89077eaa2d 100644 --- a/AsyncDisplayKit/Layout/ASLayout.mm +++ b/AsyncDisplayKit/Layout/ASLayout.mm @@ -113,6 +113,7 @@ extern BOOL CGPointIsNull(CGPoint point) return [self layoutWithLayoutableObject:layoutableObject constrainedSizeRange:sizeRange size:size + position:CGPointNull sublayouts:nil]; } From 69ca67b5784b58c4ff37e4c83e148c41ea922606 Mon Sep 17 00:00:00 2001 From: George A Date: Mon, 11 Jul 2016 10:43:19 +0200 Subject: [PATCH 117/247] Code cleaning and fixes based on code review. --- AsyncDisplayKit/ASMapNode.mm | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index ad4371d248..699368ba79 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -24,7 +24,6 @@ MKMapSnapshotter *_snapshotter; BOOL _snapshotAfterLayout; NSArray *_annotations; -// CLLocationCoordinate2D _centerCoordinateOfMap; } @end @@ -46,7 +45,6 @@ _needsMapReloadOnBoundsChange = YES; _liveMap = NO; -// _centerCoordinateOfMap = kCLLocationCoordinate2DInvalid; _annotations = @[]; _showAnnotationsOptions = ASMapNodeShowAnnotationsOptionsIgnored; return self; @@ -161,18 +159,9 @@ - (void)setRegion:(MKCoordinateRegion)region { - MKMapSnapshotOptions * __weak oldOptions = self.options; - MKMapSnapshotOptions * options = [[MKMapSnapshotOptions alloc] init]; - options.camera = oldOptions.camera; - options.mapRect = oldOptions.mapRect; - options.mapType = oldOptions.mapType; - options.showsPointsOfInterest = oldOptions.showsPointsOfInterest; - options.showsBuildings = oldOptions.showsBuildings; - options.size = oldOptions.size; - options.scale = oldOptions.scale; + MKMapSnapshotOptions * options = [self.options copy]; options.region = region; self.options = options; -// self.options.region = region; } #pragma mark - Snapshotter @@ -282,18 +271,12 @@ BOOL const animated = self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsAnimated; [_mapView showAnnotations:_mapView.annotations animated:animated]; } - -// if (CLLocationCoordinate2DIsValid(_centerCoordinateOfMap)) { -// [_mapView setCenterCoordinate:_centerCoordinateOfMap]; -// } } } - (void)removeLiveMap { - self.userInteractionEnabled = false; - // FIXME: With MKCoordinateRegion, isn't the center coordinate fully specified? Do we need this? -// _centerCoordinateOfMap = _mapView.centerCoordinate; + self.userInteractionEnabled = NO; [_mapView removeFromSuperview]; _mapView = nil; } @@ -336,7 +319,7 @@ CLLocationCoordinate2D topLeftCoord = CLLocationCoordinate2DMake(-90, 180); CLLocationCoordinate2D bottomRightCoord = CLLocationCoordinate2DMake(90, -180); - for (id annotation in _annotations) { + for (id annotation in annotations) { topLeftCoord = CLLocationCoordinate2DMake(fmax(topLeftCoord.latitude, annotation.coordinate.latitude), fmin(topLeftCoord.longitude, annotation.coordinate.longitude)); bottomRightCoord = CLLocationCoordinate2DMake(fmin(bottomRightCoord.latitude, annotation.coordinate.latitude), From 57ece0f46e3b5f77452fa87e42a4e4df0ced6ee4 Mon Sep 17 00:00:00 2001 From: ricky Date: Mon, 11 Jul 2016 09:54:03 -0700 Subject: [PATCH 118/247] [ASLayoutSpec] Bug where finalLayoutable was not being called for setChildren --- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index 6627587bbb..5cd628f184 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -149,7 +149,7 @@ typedef std::map, std::less> ASCh _children.clear(); [children enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - _children[idx] = obj; + _children[idx] = [self layoutableToAddFromLayoutable:obj]; }]; } From 0696ea87b7ea4d3e4b520cbb58026f243b7b3d13 Mon Sep 17 00:00:00 2001 From: ricky Date: Mon, 11 Jul 2016 09:59:22 -0700 Subject: [PATCH 119/247] fixed trait example --- examples_extra/ASTraitCollection/Sample/KittenNode.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples_extra/ASTraitCollection/Sample/KittenNode.m b/examples_extra/ASTraitCollection/Sample/KittenNode.m index 750bf63a1b..a7f95e91fb 100644 --- a/examples_extra/ASTraitCollection/Sample/KittenNode.m +++ b/examples_extra/ASTraitCollection/Sample/KittenNode.m @@ -155,13 +155,14 @@ static const CGFloat kInnerPadding = 10.0f; { OverrideViewController *overrideVC = [[OverrideViewController alloc] init]; + __weak OverrideViewController *weakOverrideVC = overrideVC; overrideVC.overrideDisplayTraitsWithTraitCollection = ^(UITraitCollection *traitCollection) { ASTraitCollection *asyncTraitCollection = [ASTraitCollection traitCollectionWithDisplayScale:traitCollection.displayScale userInterfaceIdiom:traitCollection.userInterfaceIdiom horizontalSizeClass:UIUserInterfaceSizeClassCompact verticalSizeClass:UIUserInterfaceSizeClassCompact forceTouchCapability:traitCollection.forceTouchCapability - traitCollectionContext:nil]; + containerSize:weakOverrideVC.view.bounds.size]; return asyncTraitCollection; }; From f8e294bc23904eaa65ec041c39d3b5e779062f49 Mon Sep 17 00:00:00 2001 From: CJ Lin Date: Tue, 12 Jul 2016 01:36:41 +0800 Subject: [PATCH 120/247] fix image paths in example_extra/Multiplex --- examples_extra/Multiplex/Sample/ScreenNode.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples_extra/Multiplex/Sample/ScreenNode.m b/examples_extra/Multiplex/Sample/ScreenNode.m index d07574bb41..6471b39737 100644 --- a/examples_extra/Multiplex/Sample/ScreenNode.m +++ b/examples_extra/Multiplex/Sample/ScreenNode.m @@ -95,15 +95,15 @@ - (NSURL *)multiplexImageNode:(ASMultiplexImageNode *)imageNode URLForImageIdentifier:(id)imageIdentifier { if ([imageIdentifier isEqualToString:@"worst"]) { - return [NSURL URLWithString:@"https://raw.githubusercontent.com/facebook/AsyncDisplayKit/master/examples/Multiplex/worst.png"]; + return [NSURL URLWithString:@"https://raw.githubusercontent.com/facebook/AsyncDisplayKit/master/examples_extra/Multiplex/worst.png"]; } if ([imageIdentifier isEqualToString:@"medium"]) { - return [NSURL URLWithString:@"https://raw.githubusercontent.com/facebook/AsyncDisplayKit/master/examples/Multiplex/medium.png"]; + return [NSURL URLWithString:@"https://raw.githubusercontent.com/facebook/AsyncDisplayKit/master/examples_extra/Multiplex/medium.png"]; } if ([imageIdentifier isEqualToString:@"best"]) { - return [NSURL URLWithString:@"https://raw.githubusercontent.com/facebook/AsyncDisplayKit/master/examples/Multiplex/best.png"]; + return [NSURL URLWithString:@"https://raw.githubusercontent.com/facebook/AsyncDisplayKit/master/examples_extra/Multiplex/best.png"]; } // unexpected identifier From 488db475f427acf71368815e2b9ba1e1b8f029d6 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Mon, 11 Jul 2016 11:22:11 -0700 Subject: [PATCH 121/247] Update GITHUB_RULES.md --- .github/GITHUB_RULES.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/GITHUB_RULES.md b/.github/GITHUB_RULES.md index 156168ac16..e81cbf29f3 100644 --- a/.github/GITHUB_RULES.md +++ b/.github/GITHUB_RULES.md @@ -56,6 +56,7 @@ Comment for moving to Ship: @\ The community is planning an exciting long term road map for the project and getting organized around how to deliver these feature requests. -If you are interested in helping contribute to this component or any other, don’t hesitate to send us an email at AsyncDisplayKit@gmail.com or ping us on ASDK's Slack (#1582). If you would like to contribute for a few weeks, we can also add you to our Ship bug tracker so that you can see what everyone is working on and actively coordinate with us. +If you are interested in helping contribute to this component or any other, don’t hesitate to send us an email at AsyncDisplayKit@gmail.com or ping us on
+ASDK's Slack channel. If you would like to contribute for a few weeks, we can also add you to our Ship bug tracker so that you can see what everyone is working on and actively coordinate with us. -As always, keep filing issues and submitting pull requests here on Github and we will only move things to the new tracker if they require long term coordination. \ No newline at end of file +As always, keep filing issues and submitting pull requests here on Github and we will only move things to the new tracker if they require long term coordination. From f9629beabb092e4c01be67095ce6c914be0f0927 Mon Sep 17 00:00:00 2001 From: George A Date: Mon, 11 Jul 2016 20:48:12 +0200 Subject: [PATCH 122/247] [ASMapNode] Defaulting userInteractionEnabled to YES. --- AsyncDisplayKit/ASMapNode.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index 699368ba79..449b091afb 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -42,6 +42,7 @@ } self.backgroundColor = ASDisplayNodeDefaultPlaceholderColor(); self.clipsToBounds = YES; + self.userInteractionEnabled = YES; _needsMapReloadOnBoundsChange = YES; _liveMap = NO; @@ -257,7 +258,6 @@ - (void)addLiveMap { ASDisplayNodeAssertMainThread(); - self.userInteractionEnabled = YES; if (!_mapView) { __weak ASMapNode *weakSelf = self; _mapView = [[MKMapView alloc] initWithFrame:CGRectZero]; @@ -276,7 +276,6 @@ - (void)removeLiveMap { - self.userInteractionEnabled = NO; [_mapView removeFromSuperview]; _mapView = nil; } From 41e26374e374de960b0057430fd4b7223001f08f Mon Sep 17 00:00:00 2001 From: George A Date: Mon, 11 Jul 2016 20:52:48 +0200 Subject: [PATCH 123/247] Removed debugging messages from ASMapNode's sample, they are no longer needed. --- examples/ASMapNode/Sample/MapHandlerNode.m | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/examples/ASMapNode/Sample/MapHandlerNode.m b/examples/ASMapNode/Sample/MapHandlerNode.m index e3308291c6..8a78445bb2 100644 --- a/examples/ASMapNode/Sample/MapHandlerNode.m +++ b/examples/ASMapNode/Sample/MapHandlerNode.m @@ -171,20 +171,6 @@ MKCoordinateSpanMake(deltaLat, deltaLon)); _mapNode.region = region; - -// MKMapSnapshotOptions * __weak oldOptions = _mapNode.options; -// MKMapSnapshotOptions * options = [[MKMapSnapshotOptions alloc] init]; -// options.camera = oldOptions.camera; -// options.mapRect = oldOptions.mapRect; -// options.mapType = oldOptions.mapType; -// options.showsPointsOfInterest = oldOptions.showsPointsOfInterest; -// options.showsBuildings = oldOptions.showsBuildings; -// options.size = oldOptions.size; -// options.scale = oldOptions.scale; -// options.region = region; -// _mapNode.options = options; - - NSLog(@"Region updated"); } -(void)toggleLiveMap @@ -193,7 +179,6 @@ NSString * const liveMapStr = [self liveMapStr]; [_liveMapToggleButton setTitle:liveMapStr withFont:nil withColor:[UIColor blueColor] forState:ASControlStateNormal]; [_liveMapToggleButton setTitle:liveMapStr withFont:[UIFont systemFontOfSize:14] withColor:[UIColor blueColor] forState:ASControlStateHighlighted]; - NSLog(@"UserInteractionEnabled: %i", _mapNode.userInteractionEnabled); } #pragma mark - Helpers From 93ee42db5758fd1e946b3856918aba4491e67d7c Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 11 Jul 2016 17:04:20 -0700 Subject: [PATCH 124/247] Remove assert in visibleStateDidChange: in ASCellNode (#1899) This assertion is failing in some apps and will be enabled soon. --- AsyncDisplayKit/ASCellNode.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index dce2c936bd..9290fa1432 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -272,7 +272,8 @@ { [super visibleStateDidChange:isVisible]; - ASDisplayNodeAssert(self.isNodeLoaded, @"Node should be loaded in order for it to become visible or invisible. If not in this situation, we shouldn't trigger creating the view."); + // NOTE: This assertion is failing in some apps and will be enabled soon. + // ASDisplayNodeAssert(self.isNodeLoaded, @"Node should be loaded in order for it to become visible or invisible. If not in this situation, we shouldn't trigger creating the view."); UIView *view = self.view; CGRect cellFrame = CGRectZero; From 7f4737217edb67f57f342fa41fdb8f818fec8559 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 11 Jul 2016 17:04:47 -0700 Subject: [PATCH 125/247] Change from MutexLocker / MutexUnlocker to lock() and unlock() directly on property lock (#1900) For performance reasons change to directly lock and unlock calls on the property lock instance --- AsyncDisplayKit/ASDisplayNode.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 31c770cae6..f6f5e06cbc 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1055,9 +1055,10 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)__setNeedsLayout { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + _propertyLock.lock(); if ([self _hasDirtyLayout]) { + _propertyLock.unlock(); return; } @@ -1065,7 +1066,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) if (_supernode) { ASDisplayNode *supernode = _supernode; - ASDN::MutexUnlocker u(_propertyLock); + _propertyLock.unlock(); // Cause supernode's layout to be invalidated // We need to release the lock to prevent a deadlock [supernode setNeedsLayout]; @@ -1090,6 +1091,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) CGFloat yDelta = (newSize.height - oldSize.height) * anchorPoint.y; self.position = CGPointMake(oldPosition.x + xDelta, oldPosition.y + yDelta); } + _propertyLock.unlock(); } - (void)__setNeedsDisplay From 6b44b5ac05adb8c776a1aed747291f8c80309d34 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 11 Jul 2016 20:22:45 -0700 Subject: [PATCH 126/247] [ASTableView] Add retainedLayer a la collection view (#1896) --- AsyncDisplayKit/ASTableView.mm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 517554fb90..5e9f128b38 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -11,6 +11,7 @@ #import "ASTableViewInternal.h" #import "ASAssert.h" +#import "ASAvailability.h" #import "ASBatchFetching.h" #import "ASCellNode+Internal.h" #import "ASChangeSetDataController.h" @@ -111,6 +112,15 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; CGFloat _contentOffsetAdjustment; CGPoint _deceleratingVelocity; + + /** + * Our layer, retained. Under iOS < 9, when table views are removed from the hierarchy, + * their layers may be deallocated and become dangling pointers. This puts the table view + * into a very dangerous state where pretty much any call will crash it. So we manually retain our layer. + * + * You should never access this, and it will be nil under iOS >= 9. + */ + CALayer *_retainedLayer; CGFloat _nodesConstrainedWidth; BOOL _ignoreNodesConstrainedWidthChange; @@ -235,6 +245,10 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; self.strongTableNode = tableNode; } + if (!AS_AT_LEAST_IOS9) { + _retainedLayer = self.layer; + } + return self; } From 396583dbaaa27750b1a9c58b1ad77e7ed9caa7dd Mon Sep 17 00:00:00 2001 From: George A Date: Tue, 12 Jul 2016 08:01:17 +0200 Subject: [PATCH 127/247] [ASMapNode] Protected showAnnotationsOptions with a lock. --- AsyncDisplayKit/ASMapNode.mm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index 449b091afb..bf3d1c8e52 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -33,6 +33,7 @@ @synthesize mapDelegate = _mapDelegate; @synthesize options = _options; @synthesize liveMap = _liveMap; +@synthesize showAnnotationsOptions = _showAnnotationsOptions; #pragma mark - Lifecycle - (instancetype)init @@ -267,8 +268,9 @@ [weakSelf setNeedsLayout]; [weakSelf.view addSubview:_mapView]; - if (self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { - BOOL const animated = self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsAnimated; + ASMapNodeShowAnnotationsOptions showAnnotationsOptions = self.showAnnotationsOptions; + if (showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { + BOOL const animated = showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsAnimated; [_mapView showAnnotations:_mapView.annotations animated:animated]; } } @@ -292,16 +294,17 @@ ASDN::MutexLocker l(_propertyLock); _annotations = annotations; + ASMapNodeShowAnnotationsOptions showAnnotationsOptions = self.showAnnotationsOptions; if (self.isLiveMap) { [_mapView removeAnnotations:_mapView.annotations]; [_mapView addAnnotations:annotations]; - if (self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { - BOOL const animated = self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsAnimated; + if (showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { + BOOL const animated = showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsAnimated; [_mapView showAnnotations:_mapView.annotations animated:animated]; } } else { - if (self.showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { + if (showAnnotationsOptions & ASMapNodeShowAnnotationsOptionsZoomed) { self.region = [self regionToFitAnnotations:annotations]; } else { @@ -333,6 +336,16 @@ return region; } +-(ASMapNodeShowAnnotationsOptions)showAnnotationsOptions { + ASDN::MutexLocker l(_propertyLock); + return _showAnnotationsOptions; +} + +-(void)setShowAnnotationsOptions:(ASMapNodeShowAnnotationsOptions)showAnnotationsOptions { + ASDN::MutexLocker l(_propertyLock); + _showAnnotationsOptions = showAnnotationsOptions; +} + #pragma mark - Layout - (void)setSnapshotSizeWithReloadIfNeeded:(CGSize)snapshotSize { From 4b331be1e831934aae90a7903bee17fabeaa8a1d Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Tue, 12 Jul 2016 21:25:22 +0700 Subject: [PATCH 128/247] Correctly compare and update title of ASButtonNode --- AsyncDisplayKit/ASButtonNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 54c30ad47e..47bdc4ef21 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -184,7 +184,7 @@ newTitle = _normalAttributedTitle; } - if ((_titleNode != nil || newTitle.length > 0) && newTitle != self.titleNode.attributedString) { + if ((_titleNode != nil || newTitle.length > 0) && [self.titleNode.attributedString isEqualToAttributedString:newTitle] == NO) { _titleNode.attributedString = newTitle; self.accessibilityLabel = _titleNode.accessibilityLabel; [self setNeedsLayout]; From dc2255d5d8c70ff96ee37f8ecb1eaaee7a981a91 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Tue, 12 Jul 2016 06:42:40 -0700 Subject: [PATCH 129/247] Fix setNeedsLayout triggered from subnode will not trigger relayout --- AsyncDisplayKit/ASDisplayNode.mm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index f6f5e06cbc..58b24a5b76 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1055,13 +1055,15 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)__setNeedsLayout { ASDisplayNodeAssertThreadAffinity(self); + _propertyLock.lock(); - if ([self _hasDirtyLayout]) { + if (_layout == nil) { + // Can't proceed without a layout as no constrained size would be available _propertyLock.unlock(); return; } - + [self invalidateCalculatedLayout]; if (_supernode) { @@ -1091,6 +1093,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) CGFloat yDelta = (newSize.height - oldSize.height) * anchorPoint.y; self.position = CGPointMake(oldPosition.x + xDelta, oldPosition.y + yDelta); } + _propertyLock.unlock(); } From edb4e45c244c697d6f76b7718576550490b1d881 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 3 May 2016 16:44:09 -0700 Subject: [PATCH 130/247] [ASRangeController] Update synchronously when possible --- AsyncDisplayKit/ASCellNode.mm | 4 + AsyncDisplayKit/ASCollectionView.mm | 43 ++++-- AsyncDisplayKit/ASTableView.mm | 138 ++++++++++-------- AsyncDisplayKit/Details/ASRangeController.h | 21 ++- AsyncDisplayKit/Details/ASRangeController.mm | 108 ++++++++------ ...SRangeControllerUpdateRangeProtocol+Beta.h | 3 +- 6 files changed, 196 insertions(+), 121 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index 9290fa1432..1f618805ae 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -272,6 +272,10 @@ { [super visibleStateDidChange:isVisible]; + if (isVisible && self.neverShowPlaceholders) { + [self recursivelyEnsureDisplaySynchronously:YES]; + } + // NOTE: This assertion is failing in some apps and will be enabled soon. // ASDisplayNodeAssert(self.isNodeLoaded, @"Node should be loaded in order for it to become visible or invisible. If not in this situation, we shouldn't trigger creating the view."); UIView *view = self.view; diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index d835a88a1f..857245573f 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -639,11 +639,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; [_asyncDelegate collectionView:self willDisplayNodeForItemAtIndexPath:indexPath]; } - [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection]; + [_rangeController setNeedsUpdate]; - if (cellNode.neverShowPlaceholders) { - [cellNode recursivelyEnsureDisplaySynchronously:YES]; - } if (ASSubclassOverridesSelector([ASCellNode class], [cellNode class], @selector(cellNodeVisibilityEvent:inScrollView:withCellFrame:))) { [_cellsForVisibilityUpdates addObject:cell]; } @@ -651,8 +648,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(_ASCollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath { - [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection]; - ASCellNode *cellNode = [cell node]; if (_asyncDelegateFlags.asyncDelegateCollectionViewDidEndDisplayingNodeForItemAtIndexPath) { @@ -660,9 +655,9 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; [_asyncDelegate collectionView:self didEndDisplayingNode:cellNode forItemAtIndexPath:indexPath]; } - if ([_cellsForVisibilityUpdates containsObject:cell]) { - [_cellsForVisibilityUpdates removeObject:cell]; - } + [_rangeController setNeedsUpdate]; + + [_cellsForVisibilityUpdates removeObject:cell]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -844,6 +839,13 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; // To ensure _maxSizeForNodesConstrainedSize is up-to-date for every usage, this call to super must be done last [super layoutSubviews]; + + // Update range controller immediately if possible & needed. + // Calling -updateIfNeeded in here with self.window == nil (early in the collection view's life) + // may cause UICollectionView data related crashes. We'll update in -didMoveToWindow anyway. + if (self.window != nil) { + [_rangeController updateIfNeeded]; + } } @@ -1030,13 +1032,17 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (NSArray *)visibleNodeIndexPathsForRangeController:(ASRangeController *)rangeController { ASDisplayNodeAssertMainThread(); - - // Calling visibleNodeIndexPathsForRangeController: will trigger UIKit to call reloadData if it never has, which can result + // Calling -indexPathsForVisibleItems will trigger UIKit to call reloadData if it never has, which can result // in incorrect layout if performed at zero size. We can use the fact that nothing can be visible at zero size to return fast. BOOL isZeroSized = CGRectEqualToRect(self.bounds, CGRectZero); return isZeroSized ? @[] : [self indexPathsForVisibleItems]; } +- (ASScrollDirection)scrollDirectionForRangeController:(ASRangeController *)rangeController +{ + return self.scrollDirection; +} + - (CGSize)viewportSizeForRangeController:(ASRangeController *)rangeController { ASDisplayNodeAssertMainThread(); @@ -1085,9 +1091,13 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; block(); } } completion:^(BOOL finished){ + // Flush any range changes that happened as part of the update animations ending. + [_rangeController updateIfNeeded]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:numberOfUpdateBlocks]; if (completion) { completion(finished); } }]; + // Flush any range changes that happened as part of submitting the update. + [_rangeController updateIfNeeded]; }); [_batchUpdateBlocks removeAllObjects]; @@ -1114,6 +1124,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } else { [UIView performWithoutAnimation:^{ [super insertItemsAtIndexPaths:indexPaths]; + // Flush any range changes that happened as part of submitting the update. + [_rangeController updateIfNeeded]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }]; } @@ -1134,6 +1146,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } else { [UIView performWithoutAnimation:^{ [super deleteItemsAtIndexPaths:indexPaths]; + // Flush any range changes that happened as part of submitting the update. + [_rangeController updateIfNeeded]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }]; } @@ -1154,6 +1168,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } else { [UIView performWithoutAnimation:^{ [super insertSections:indexSet]; + // Flush any range changes that happened as part of submitting the update. + [_rangeController updateIfNeeded]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }]; } @@ -1174,6 +1190,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } else { [UIView performWithoutAnimation:^{ [super deleteSections:indexSet]; + // Flush any range changes that happened as part of submitting the update. + [_rangeController updateIfNeeded]; [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }]; } @@ -1275,7 +1293,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; // Updating the visible node index paths only for not range managed nodes. Range managed nodes will get their // their update in the layout pass if (![node supportsRangeManagedInterfaceState]) { - [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:self.scrollDirection]; + [_rangeController setNeedsUpdate]; + [_rangeController updateIfNeeded]; } } diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 5e9f128b38..80bf807308 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -23,6 +23,7 @@ #import "ASLayout.h" #import "_ASDisplayLayer.h" #import "ASTableNode.h" +#import "ASEqualityHelpers.h" static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; @@ -126,6 +127,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; BOOL _ignoreNodesConstrainedWidthChange; BOOL _queuedNodeHeightUpdate; BOOL _isDeallocating; + BOOL _performingBatchUpdates; NSMutableSet *_cellsForVisibilityUpdates; struct { @@ -468,6 +470,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; // To ensure _nodesConstrainedWidth is up-to-date for every usage, this call to super must be done last [super layoutSubviews]; + [_rangeController updateIfNeeded]; } #pragma mark - @@ -644,35 +647,29 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; [_asyncDelegate tableView:self willDisplayNodeForRowAtIndexPath:indexPath]; } - [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:[self scrollDirection]]; - - if (cellNode.neverShowPlaceholders) { - [cellNode recursivelyEnsureDisplaySynchronously:YES]; - } + [_rangeController setNeedsUpdate]; if (ASSubclassOverridesSelector([ASCellNode class], [cellNode class], @selector(cellNodeVisibilityEvent:inScrollView:withCellFrame:))) { [_cellsForVisibilityUpdates addObject:cell]; } } -- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(_ASTableViewCell *)cell forRowAtIndexPath:(NSIndexPath*)indexPath +- (void)tableView:(UITableView *)tableView didEndDisplayingCell:(_ASTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { - if ([_pendingVisibleIndexPath isEqual:indexPath]) { + if (ASObjectIsEqual(_pendingVisibleIndexPath, indexPath)) { _pendingVisibleIndexPath = nil; } ASCellNode *cellNode = [cell node]; - [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:[self scrollDirection]]; + [_rangeController setNeedsUpdate]; if (_asyncDelegateFlags.asyncDelegateTableViewDidEndDisplayingNodeForRowAtIndexPath) { ASDisplayNodeAssertNotNil(cellNode, @"Expected node associated with removed cell not to be nil."); [_asyncDelegate tableView:self didEndDisplayingNode:cellNode forRowAtIndexPath:indexPath]; } - if ([_cellsForVisibilityUpdates containsObject:cell]) { - [_cellsForVisibilityUpdates removeObject:cell]; - } + [_cellsForVisibilityUpdates removeObject:cell]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -866,61 +863,38 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; return @[]; } - // In this case we cannot use indexPathsForVisibleRows in this case to get all the visible index paths as apparently - // in a grouped UITableView it would return index paths for cells that are over the edge of the visible area. - // Unfortunatly this means we never get a call for -tableView:cellForRowAtIndexPath: for that cells, but we will mark - // mark them as visible in the range controller - NSMutableArray *visibleIndexPaths = [NSMutableArray array]; - for (id cell in self.visibleCells) { - [visibleIndexPaths addObject:[self indexPathForCell:cell]]; + // NOTE: A prior comment claimed that `indexPathsForVisibleRows` may return extra index paths for grouped-style + // tables. This is seen as an acceptable issue for the time being. + + NSIndexPath *pendingVisibleIndexPath = _pendingVisibleIndexPath; + if (pendingVisibleIndexPath == nil) { + return self.indexPathsForVisibleRows; } - if (_pendingVisibleIndexPath) { - NSMutableSet *indexPaths = [NSMutableSet setWithArray:visibleIndexPaths]; - - BOOL (^isAfter)(NSIndexPath *, NSIndexPath *) = ^BOOL(NSIndexPath *indexPath, NSIndexPath *anchor) { - if (!anchor || !indexPath) { - return NO; - } - if (indexPath.section == anchor.section) { - return (indexPath.row == anchor.row+1); // assumes that indexes are valid - - } else if (indexPath.section > anchor.section && indexPath.row == 0) { - if (anchor.row != [_dataController numberOfRowsInSection:anchor.section] -1) { - return NO; // anchor is not at the end of the section - } - - NSInteger nextSection = anchor.section+1; - while([_dataController numberOfRowsInSection:nextSection] == 0) { - ++nextSection; - } - - return indexPath.section == nextSection; - } - - return NO; - }; - - BOOL (^isBefore)(NSIndexPath *, NSIndexPath *) = ^BOOL(NSIndexPath *indexPath, NSIndexPath *anchor) { - return isAfter(anchor, indexPath); - }; - - if ([indexPaths containsObject:_pendingVisibleIndexPath]) { - _pendingVisibleIndexPath = nil; // once it has shown up in visibleIndexPaths, we can stop tracking it - } else if (!isBefore(_pendingVisibleIndexPath, visibleIndexPaths.firstObject) && - !isAfter(_pendingVisibleIndexPath, visibleIndexPaths.lastObject)) { - _pendingVisibleIndexPath = nil; // not contiguous, ignore. - } else { - [indexPaths addObject:_pendingVisibleIndexPath]; - - [visibleIndexPaths removeAllObjects]; - [visibleIndexPaths addObjectsFromArray:[indexPaths.allObjects sortedArrayUsingSelector:@selector(compare:)]]; - } - } + NSMutableArray *visibleIndexPaths = [self.indexPathsForVisibleRows mutableCopy]; + [visibleIndexPaths sortUsingSelector:@selector(compare:)]; + + BOOL isPendingIndexPathVisible = (NSNotFound != [visibleIndexPaths indexOfObject:pendingVisibleIndexPath inSortedRange:NSMakeRange(0, visibleIndexPaths.count) options:kNilOptions usingComparator:^(id _Nonnull obj1, id _Nonnull obj2) { + return [obj1 compare:obj2]; + }]); + if (isPendingIndexPathVisible) { + _pendingVisibleIndexPath = nil; // once it has shown up in visibleIndexPaths, we can stop tracking it + } else if ([self isIndexPath:visibleIndexPaths.firstObject immediateSuccessorOfIndexPath:pendingVisibleIndexPath]) { + [visibleIndexPaths insertObject:pendingVisibleIndexPath atIndex:0]; + } else if ([self isIndexPath:pendingVisibleIndexPath immediateSuccessorOfIndexPath:visibleIndexPaths.lastObject]) { + [visibleIndexPaths addObject:pendingVisibleIndexPath]; + } else { + _pendingVisibleIndexPath = nil; // not contiguous, ignore. + } return visibleIndexPaths; } +- (ASScrollDirection)scrollDirectionForRangeController:(ASRangeController *)rangeController +{ + return self.scrollDirection; +} + - (NSArray *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray *)indexPaths { return [_dataController nodesAtIndexPaths:indexPaths]; @@ -953,6 +927,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; return; // if the asyncDataSource has become invalid while we are processing, ignore this request to avoid crashes } + _performingBatchUpdates = YES; [super beginUpdates]; if (_automaticallyAdjustsContentOffset) { @@ -978,8 +953,10 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; ASPerformBlockWithoutAnimation(!animated, ^{ [super endUpdates]; + [_rangeController updateIfNeeded]; }); + _performingBatchUpdates = NO; if (completion) { completion(YES); } @@ -1005,6 +982,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; NSLog(@"-[super insertRowsAtIndexPaths]: %@", indexPaths); } [super insertRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; + if (!_performingBatchUpdates) { + [_rangeController updateIfNeeded]; + } [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -1028,6 +1008,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; NSLog(@"-[super deleteRowsAtIndexPaths]: %@", indexPaths); } [super deleteRowsAtIndexPaths:indexPaths withRowAnimation:(UITableViewRowAnimation)animationOptions]; + if (!_performingBatchUpdates) { + [_rangeController updateIfNeeded]; + } [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexPaths.count]; }); @@ -1052,6 +1035,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; NSLog(@"-[super insertSections]: %@", indexSet); } [super insertSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; + if (!_performingBatchUpdates) { + [_rangeController updateIfNeeded]; + } [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); } @@ -1071,6 +1057,9 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; NSLog(@"-[super deleteSections]: %@", indexSet); } [super deleteSections:indexSet withRowAnimation:(UITableViewRowAnimation)animationOptions]; + if (!_performingBatchUpdates) { + [_rangeController updateIfNeeded]; + } [self _scheduleCheckForBatchFetchingForNumberOfChanges:indexSet.count]; }); } @@ -1232,6 +1221,32 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; [_rangeController clearFetchedData]; } +#pragma mark - Helper Methods + +- (BOOL)isIndexPath:(NSIndexPath *)indexPath immediateSuccessorOfIndexPath:(NSIndexPath *)anchor +{ + if (!anchor || !indexPath) { + return NO; + } + if (indexPath.section == anchor.section) { + return (indexPath.row == anchor.row+1); // assumes that indexes are valid + + } else if (indexPath.section > anchor.section && indexPath.row == 0) { + if (anchor.row != [_dataController numberOfRowsInSection:anchor.section] -1) { + return NO; // anchor is not at the end of the section + } + + NSInteger nextSection = anchor.section+1; + while([_dataController numberOfRowsInSection:nextSection] == 0) { + ++nextSection; + } + + return indexPath.section == nextSection; + } + + return NO; +} + #pragma mark - _ASDisplayView behavior substitutions // Need these to drive interfaceState so we know when we are visible, if not nested in another range-managing element. // Because our superclass is a true UIKit class, we cannot also subclass _ASDisplayView. @@ -1255,7 +1270,8 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; // Updating the visible node index paths only for not range managed nodes. Range managed nodes will get their // their update in the layout pass if (![node supportsRangeManagedInterfaceState]) { - [_rangeController visibleNodeIndexPathsDidChangeWithScrollDirection:[self scrollDirection]]; + [_rangeController setNeedsUpdate]; + [_rangeController updateIfNeeded]; } } diff --git a/AsyncDisplayKit/Details/ASRangeController.h b/AsyncDisplayKit/Details/ASRangeController.h index 6341e1dd17..e4a883395d 100644 --- a/AsyncDisplayKit/Details/ASRangeController.h +++ b/AsyncDisplayKit/Details/ASRangeController.h @@ -40,12 +40,18 @@ NS_ASSUME_NONNULL_BEGIN /** * Notify the range controller that the visible range has been updated. * This is the primary input call that drives updating the working ranges, and triggering their actions. - * - * @param scrollDirection The current scroll direction of the scroll view. + * The ranges will be updated in the next turn of the main loop, or when -updateIfNeeded is called. * * @see [ASRangeControllerDelegate rangeControllerVisibleNodeIndexPaths:] */ -- (void)visibleNodeIndexPathsDidChangeWithScrollDirection:(ASScrollDirection)scrollDirection; +- (void)setNeedsUpdate; + +/** + * Update the ranges immediately, if -setNeedsUpdate has been called since the last update. + * This is useful because the ranges must be updated immediately after a cell is added + * into a table/collection to satisfy interface state API guarantees. + */ +- (void)updateIfNeeded; /** * Add the sized node for `indexPath` as a subview of `contentView`. @@ -101,6 +107,13 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSArray *)visibleNodeIndexPathsForRangeController:(ASRangeController *)rangeController; +/** + * @param rangeController Sender. + * + * @returns the current scroll direction of the view using this range controller. + */ +- (ASScrollDirection)scrollDirectionForRangeController:(ASRangeController *)rangeController; + /** * @param rangeController Sender. * @@ -222,4 +235,4 @@ NS_ASSUME_NONNULL_BEGIN @end -NS_ASSUME_NONNULL_END \ No newline at end of file +NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 5dfa056503..dc051decc8 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -19,17 +19,23 @@ #import "ASDisplayNode+FrameworkPrivate.h" #import "ASCellNode.h" +#define AS_RANGECONTROLLER_LOG_UPDATE_FREQ 0 + @interface ASRangeController () { BOOL _rangeIsValid; - BOOL _queuedRangeUpdate; + BOOL _needsRangeUpdate; BOOL _layoutControllerImplementsSetVisibleIndexPaths; - ASScrollDirection _scrollDirection; NSSet *_allPreviousIndexPaths; ASLayoutRangeMode _currentRangeMode; BOOL _didUpdateCurrentRange; BOOL _didRegisterForNodeDisplayNotifications; CFAbsoluteTime _pendingDisplayNodesTimestamp; + +#if AS_RANGECONTROLLER_LOG_UPDATE_FREQ + NSUInteger _updateCountThisFrame; + CADisplayLink *_displayLink; +#endif } @end @@ -52,11 +58,20 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; [[[self class] allRangeControllersWeakSet] addObject:self]; +#if AS_RANGECONTROLLER_LOG_UPDATE_FREQ + _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(_updateCountDisplayLinkDidFire)]; + [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes]; +#endif + return self; } - (void)dealloc { +#if AS_RANGECONTROLLER_LOG_UPDATE_FREQ + [_displayLink invalidate]; +#endif + if (_didRegisterForNodeDisplayNotifications) { [[NSNotificationCenter defaultCenter] removeObserver:self name:ASRenderingEngineDidDisplayScheduledNodesNotification object:nil]; } @@ -94,12 +109,25 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; return selfInterfaceState; } -- (void)visibleNodeIndexPathsDidChangeWithScrollDirection:(ASScrollDirection)scrollDirection +- (void)setNeedsUpdate { - _scrollDirection = scrollDirection; + if (!_needsRangeUpdate) { + _needsRangeUpdate = YES; + + __weak __typeof__(self) weakSelf = self; + dispatch_async(dispatch_get_main_queue(), ^{ + [weakSelf updateIfNeeded]; + }); + } +} - // Perform update immediately, so that cells receive a visibleStateDidChange: call before their first pixel is visible. - [self scheduleRangeUpdate]; +- (void)updateIfNeeded +{ + if (_needsRangeUpdate) { + _needsRangeUpdate = NO; + + [self _updateVisibleNodeIndexPaths]; + } } - (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode @@ -107,70 +135,52 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; if (_currentRangeMode != rangeMode) { _currentRangeMode = rangeMode; _didUpdateCurrentRange = YES; - - [self scheduleRangeUpdate]; - } -} -- (void)scheduleRangeUpdate -{ - if (_queuedRangeUpdate) { - return; + [self setNeedsUpdate]; } - - // coalesce these events -- handling them multiple times per runloop is noisy and expensive - _queuedRangeUpdate = YES; - - dispatch_async(dispatch_get_main_queue(), ^{ - [self performRangeUpdate]; - }); -} - -- (void)performRangeUpdate -{ - // Call this version if you want the update to occur immediately, such as on app suspend, as another runloop may not occur. - ASDisplayNodeAssertMainThread(); - _queuedRangeUpdate = YES; // For now, set this flag as _update... expects it and clears it. - [self _updateVisibleNodeIndexPaths]; } - (void)setLayoutController:(id)layoutController { _layoutController = layoutController; _layoutControllerImplementsSetVisibleIndexPaths = [_layoutController respondsToSelector:@selector(setVisibleNodeIndexPaths:)]; - if (_layoutController && _queuedRangeUpdate) { - [self performRangeUpdate]; + if (layoutController && _dataSource) { + [self updateIfNeeded]; } } - (void)setDataSource:(id)dataSource { _dataSource = dataSource; - if (_dataSource && _queuedRangeUpdate) { - [self performRangeUpdate]; + if (dataSource && _layoutController) { + [self updateIfNeeded]; } } - (void)_updateVisibleNodeIndexPaths { ASDisplayNodeAssert(_layoutController, @"An ASLayoutController is required by ASRangeController"); - if (!_queuedRangeUpdate || !_layoutController || !_dataSource) { + if (!_layoutController || !_dataSource) { return; } +#if AS_RANGECONTROLLER_LOG_UPDATE_FREQ + _updateCountThisFrame += 1; +#endif + // allNodes is a 2D array: it contains arrays for each section, each containing nodes. NSArray *allNodes = [_dataSource completedNodes]; NSUInteger numberOfSections = [allNodes count]; // TODO: Consider if we need to use this codepath, or can rely on something more similar to the data & display ranges - // Example: ... = [_layoutController indexPathsForScrolling:_scrollDirection rangeType:ASLayoutRangeTypeVisible]; + // Example: ... = [_layoutController indexPathsForScrolling:scrollDirection rangeType:ASLayoutRangeTypeVisible]; NSArray *visibleNodePaths = [_dataSource visibleNodeIndexPathsForRangeController:self]; if (visibleNodePaths.count == 0) { // if we don't have any visibleNodes currently (scrolled before or after content)... - _queuedRangeUpdate = NO; return; // don't do anything for this update, but leave _rangeIsValid == NO to make sure we update it later } + ASScrollDirection scrollDirection = [_dataSource scrollDirectionForRangeController:self]; [_layoutController setViewportSize:[_dataSource viewportSizeForRangeController:self]]; // the layout controller needs to know what the current visible indices are to calculate range offsets @@ -203,7 +213,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; if (ASRangeTuningParametersEqualToRangeTuningParameters(parametersFetchData, ASRangeTuningParametersZero)) { fetchDataIndexPaths = visibleIndexPaths; } else { - fetchDataIndexPaths = [_layoutController indexPathsForScrolling:_scrollDirection + fetchDataIndexPaths = [_layoutController indexPathsForScrolling:scrollDirection rangeMode:rangeMode rangeType:ASLayoutRangeTypeFetchData]; } @@ -217,7 +227,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; } else if (ASRangeTuningParametersEqualToRangeTuningParameters(parametersDisplay, parametersFetchData)) { displayIndexPaths = fetchDataIndexPaths; } else { - displayIndexPaths = [_layoutController indexPathsForScrolling:_scrollDirection + displayIndexPaths = [_layoutController indexPathsForScrolling:scrollDirection rangeMode:rangeMode rangeType:ASLayoutRangeTypeDisplay]; } @@ -322,7 +332,6 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; } _rangeIsValid = YES; - _queuedRangeUpdate = NO; #if ASRangeControllerLoggingEnabled // NSSet *visibleNodePathsSet = [NSSet setWithArray:visibleNodePaths]; @@ -363,7 +372,7 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; [[NSNotificationCenter defaultCenter] removeObserver:self name:ASRenderingEngineDidDisplayScheduledNodesNotification object:nil]; _didRegisterForNodeDisplayNotifications = NO; - [self scheduleRangeUpdate]; + [self setNeedsUpdate]; } } @@ -509,7 +518,8 @@ static ASLayoutRangeMode __rangeModeForMemoryWarnings = ASLayoutRangeModeVisible for (ASRangeController *rangeController in allRangeControllers) { BOOL isDisplay = ASInterfaceStateIncludesDisplay([rangeController interfaceState]); [rangeController updateCurrentRangeWithMode:isDisplay ? ASLayoutRangeModeMinimum : __rangeModeForMemoryWarnings]; - [rangeController performRangeUpdate]; + [rangeController setNeedsUpdate]; + [rangeController updateIfNeeded]; } #if ASRangeControllerLoggingEnabled @@ -531,7 +541,8 @@ static ASLayoutRangeMode __rangeModeForMemoryWarnings = ASLayoutRangeModeVisible __ApplicationState = UIApplicationStateBackground; for (ASRangeController *rangeController in allRangeControllers) { // Trigger a range update immediately, as we may not be allowed by the system to run the update block scheduled by changing range mode. - [rangeController performRangeUpdate]; + [rangeController setNeedsUpdate]; + [rangeController updateIfNeeded]; } #if ASRangeControllerLoggingEnabled @@ -546,7 +557,8 @@ static ASLayoutRangeMode __rangeModeForMemoryWarnings = ASLayoutRangeModeVisible for (ASRangeController *rangeController in allRangeControllers) { BOOL isVisible = ASInterfaceStateIncludesVisible([rangeController interfaceState]); [rangeController updateCurrentRangeWithMode:isVisible ? ASLayoutRangeModeMinimum : ASLayoutRangeModeVisibleOnly]; - [rangeController performRangeUpdate]; + [rangeController setNeedsUpdate]; + [rangeController updateIfNeeded]; } #if ASRangeControllerLoggingEnabled @@ -556,6 +568,16 @@ static ASLayoutRangeMode __rangeModeForMemoryWarnings = ASLayoutRangeModeVisible #pragma mark - Debugging +#if AS_RANGECONTROLLER_LOG_UPDATE_FREQ +- (void)_updateCountDisplayLinkDidFire +{ + if (_updateCountThisFrame > 1) { + NSLog(@"ASRangeController %p updated %lu times this frame.", self, (unsigned long)_updateCountThisFrame); + } + _updateCountThisFrame = 0; +} +#endif + - (NSString *)descriptionWithIndexPaths:(NSArray *)indexPaths { NSMutableString *description = [NSMutableString stringWithFormat:@"%@ %@", [super description], @" allPreviousIndexPaths:\n"]; diff --git a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h index 831246f33f..86230f84f8 100644 --- a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h +++ b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h @@ -13,7 +13,8 @@ @protocol ASRangeControllerUpdateRangeProtocol /** - * Updates the current range mode of the range controller for at least the next range update. + * Updates the current range mode of the range controller for at least the next range update + * and, if the new mode is different from the previous mode, enqueues a range update. */ - (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode; From 2e19d11350cdd88902765cea5eec4047d8498130 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 12 Jul 2016 13:50:20 -0700 Subject: [PATCH 131/247] Reduce block invocations, other small performance bumps --- AsyncDisplayKit/ASVideoPlayerNode.mm | 4 +- .../Details/ASCollectionDataController.mm | 40 +++++++++------- AsyncDisplayKit/Details/ASDataController.mm | 48 +++++++++++-------- .../Details/ASFlowLayoutController.mm | 4 +- .../Details/NSIndexSet+ASHelpers.m | 26 +++++----- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 8 ++-- .../Private/ASMultidimensionalArrayUtils.mm | 6 ++- .../Private/_ASHierarchyChangeSet.m | 44 ++++++++++------- 8 files changed, 103 insertions(+), 77 deletions(-) diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index 100485d539..00a0165a44 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -303,9 +303,9 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; - (void)removeControls { NSArray *controls = [_cachedControls allValues]; - [controls enumerateObjectsUsingBlock:^(ASDisplayNode *_Nonnull node, NSUInteger idx, BOOL * _Nonnull stop) { + for (ASDisplayNode *node in controls) { [node removeFromSupernode]; - }]; + } [self cleanCachedControls]; } diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index 2a0978cbbd..944e6cbcbe 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -117,16 +117,18 @@ - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { for (NSString *kind in [self supplementaryKinds]) { - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet([self editingNodesOfKind:kind], [NSIndexSet indexSetWithIndex:section]); - NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths([self editingNodesOfKind:kind], indexPaths); + NSMutableArray *editingNodes = [self editingNodesOfKind:kind]; + NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(editingNodes, [NSIndexSet indexSetWithIndex:section]); + NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(editingNodes, indexPaths); [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; // update the section of indexpaths - NSIndexPath *sectionIndexPath = [[NSIndexPath alloc] initWithIndex:newSection]; NSMutableArray *updatedIndexPaths = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; - [indexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) { - [updatedIndexPaths addObject:[sectionIndexPath indexPathByAddingIndex:[indexPath indexAtPosition:indexPath.length - 1]]]; - }]; + for (NSIndexPath *indexPath in indexPaths) { + NSUInteger newItem = [indexPath indexAtPosition:indexPath.length - 1]; + NSIndexPath *mappedIndexPath = [NSIndexPath indexPathForItem:newItem inSection:newSection]; + [updatedIndexPaths addObject:mappedIndexPath]; + } [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; } } @@ -204,12 +206,13 @@ id environment = [self.environmentDelegate dataControllerEnvironment]; ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; - [sections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { - NSUInteger rowNum = [self.collectionDataSource dataController:self supplementaryNodesOfKind:kind inSection:idx]; - NSIndexPath *sectionIndex = [[NSIndexPath alloc] initWithIndex:idx]; - for (NSUInteger i = 0; i < rowNum; i++) { - NSIndexPath *indexPath = [sectionIndex indexPathByAddingIndex:i]; - [self _populateSupplementaryNodeOfKind:kind atIndexPath:indexPath mutableContexts:contexts environmentTraitCollection:environmentTraitCollection]; + [sections enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + for (NSUInteger sec = range.location; sec < NSMaxRange(range); sec++) { + NSUInteger itemCount = [self.collectionDataSource dataController:self supplementaryNodesOfKind:kind inSection:sec]; + for (NSUInteger i = 0; i < itemCount; i++) { + NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sec]; + [self _populateSupplementaryNodeOfKind:kind atIndexPath:indexPath mutableContexts:contexts environmentTraitCollection:environmentTraitCollection]; + } } }]; } @@ -224,12 +227,13 @@ [sections addIndex:indexPath.section]; } - [sections enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { - NSUInteger rowNum = [self.collectionDataSource dataController:self supplementaryNodesOfKind:kind inSection:idx]; - NSIndexPath *sectionIndex = [[NSIndexPath alloc] initWithIndex:idx]; - for (NSUInteger i = 0; i < rowNum; i++) { - NSIndexPath *indexPath = [sectionIndex indexPathByAddingIndex:i]; - [self _populateSupplementaryNodeOfKind:kind atIndexPath:indexPath mutableContexts:contexts environmentTraitCollection:environmentTraitCollection]; + [sections enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + for (NSUInteger sec = range.location; sec < NSMaxRange(range); sec++) { + NSUInteger itemCount = [self.collectionDataSource dataController:self supplementaryNodesOfKind:kind inSection:sec]; + for (NSUInteger i = 0; i < itemCount; i++) { + NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sec]; + [self _populateSupplementaryNodeOfKind:kind atIndexPath:indexPath mutableContexts:contexts environmentTraitCollection:environmentTraitCollection]; + } } }]; } diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index fba864966e..2d085ccb22 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -302,8 +302,9 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; _editingNodes[kind] = editingNodes; [_mainSerialQueue performBlockOnMainThread:^{ - NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(_completedNodes[kind], indexPaths); - ASDeleteElementsInMultidimensionalArrayAtIndexPaths(_completedNodes[kind], indexPaths); + NSMutableArray *allNodes = _completedNodes[kind]; + NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(allNodes, indexPaths); + ASDeleteElementsInMultidimensionalArrayAtIndexPaths(allNodes, indexPaths); if (completionBlock) { completionBlock(nodes, indexPaths); } @@ -512,17 +513,19 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; NSMutableArray *contexts = [NSMutableArray array]; - [indexSet enumerateIndexesUsingBlock:^(NSUInteger sectionIndex, BOOL *stop) { - NSUInteger rowNum = [_dataSource dataController:self rowsInSection:sectionIndex]; - for (NSUInteger i = 0; i < rowNum; i++) { - NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sectionIndex]; - ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; - - ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; - [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock - indexPath:indexPath - constrainedSize:constrainedSize - environmentTraitCollection:environmentTraitCollection]]; + [indexSet enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + for (NSUInteger sectionIndex = range.location; sectionIndex < NSMaxRange(range); sectionIndex++) { + NSUInteger itemCount = [_dataSource dataController:self rowsInSection:sectionIndex]; + for (NSUInteger i = 0; i < itemCount; i++) { + NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sectionIndex]; + ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; + + ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:ASDataControllerRowNodeKind atIndexPath:indexPath]; + [contexts addObject:[[ASIndexedNodeContext alloc] initWithNodeBlock:nodeBlock + indexPath:indexPath + constrainedSize:constrainedSize + environmentTraitCollection:environmentTraitCollection]]; + } } }]; return contexts; @@ -564,10 +567,12 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // Running these commands may result in blocking on an _editingTransactionQueue operation that started even before -beginUpdates. // Each subsequent command in the queue will also wait on the full asynchronous completion of the prior command's edit transaction. LOG(@"endUpdatesWithCompletion - %zd blocks to run", _pendingEditCommandBlocks.count); - [_pendingEditCommandBlocks enumerateObjectsUsingBlock:^(dispatch_block_t block, NSUInteger idx, BOOL *stop) { - LOG(@"endUpdatesWithCompletion - running block #%zd", idx); + NSUInteger i = 0; + for (dispatch_block_t block in _pendingEditCommandBlocks) { + LOG(@"endUpdatesWithCompletion - running block #%zd", i); block(); - }]; + i += 1; + } [_pendingEditCommandBlocks removeAllObjects]; [_editingTransactionQueue addOperationWithBlock:^{ @@ -861,8 +866,8 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [_editingTransactionQueue addOperationWithBlock:^{ LOG(@"Edit Transaction - moveRow: %@ > %@", indexPath, newIndexPath); - NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(_editingNodes[ASDataControllerRowNodeKind], @[indexPath]); NSArray *indexPaths = @[indexPath]; + NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(_editingNodes[ASDataControllerRowNodeKind], indexPaths); [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; // Don't re-calculate size for moving @@ -876,12 +881,13 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; - (NSArray *)indexPathsForEditingNodesOfKind:(NSString *)kind { - return _editingNodes[kind] != nil ? ASIndexPathsForTwoDimensionalArray(_editingNodes[kind]) : nil; + NSArray *nodes = _editingNodes[kind]; + return nodes != nil ? ASIndexPathsForTwoDimensionalArray(nodes) : nil; } - (NSMutableArray *)editingNodesOfKind:(NSString *)kind { - return _editingNodes[kind] != nil ? _editingNodes[kind] : [NSMutableArray array]; + return _editingNodes[kind] ? : [NSMutableArray array]; } - (NSMutableArray *)completedNodesOfKind:(NSString *)kind @@ -958,7 +964,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; - (void)dealloc { ASDisplayNodeAssertMainThread(); - [_completedNodes enumerateKeysAndObjectsUsingBlock:^(NSString *kind, NSMutableArray *sections, BOOL *stop) { + for (NSMutableArray *sections in [_completedNodes objectEnumerator]) { for (NSArray *section in sections) { for (ASCellNode *node in section) { if (node.isNodeLoaded) { @@ -970,7 +976,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; } } } - }]; + } } @end diff --git a/AsyncDisplayKit/Details/ASFlowLayoutController.mm b/AsyncDisplayKit/Details/ASFlowLayoutController.mm index 82078240b0..c89e187c8f 100644 --- a/AsyncDisplayKit/Details/ASFlowLayoutController.mm +++ b/AsyncDisplayKit/Details/ASFlowLayoutController.mm @@ -113,11 +113,11 @@ range.start = currentIndexPath; range.end = currentIndexPath; - [indexPaths enumerateObjectsUsingBlock:^(NSIndexPath *indexPath, NSUInteger idx, BOOL *stop) { + for (NSIndexPath *indexPath in indexPaths) { currentIndexPath = [indexPath ASIndexPathValue]; range.start = ASIndexPathMinimum(range.start, currentIndexPath); range.end = ASIndexPathMaximum(range.end, currentIndexPath); - }]; + } return range; } diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m index fa636ad8c8..f05acafa5f 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -15,10 +15,12 @@ - (NSIndexSet *)as_indexesByMapping:(NSUInteger (^)(NSUInteger))block { NSMutableIndexSet *result = [NSMutableIndexSet indexSet]; - [self enumerateIndexesUsingBlock:^(NSUInteger idx, __unused BOOL * _Nonnull stop) { - NSUInteger newIndex = block(idx); - if (newIndex != NSNotFound) { - [result addIndex:newIndex]; + [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + for (NSUInteger i = range.location; i < NSMaxRange(range); i++) { + NSUInteger newIndex = block(i); + if (newIndex != NSNotFound) { + [result addIndex:newIndex]; + } } }]; return result; @@ -49,11 +51,13 @@ - (NSUInteger)as_indexChangeByInsertingItemsBelowIndex:(NSUInteger)index { __block NSUInteger newIndex = index; - [self enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL * _Nonnull stop) { - if (idx <= newIndex) { - newIndex += 1; - } else { - *stop = YES; + [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + for (NSUInteger i = range.location; i < NSMaxRange(range); i++) { + if (i <= newIndex) { + newIndex += 1; + } else { + *stop = YES; + } } }]; return newIndex - index; @@ -64,9 +68,9 @@ NSMutableString *result = [NSMutableString stringWithString:@"{ "]; [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { if (range.length == 1) { - [result appendFormat:@"%lu ", (unsigned long)range.location]; + [result appendFormat:@"%zu ", range.location]; } else { - [result appendFormat:@"%lu-%lu ", (unsigned long)range.location, (unsigned long)NSMaxRange(range)]; + [result appendFormat:@"%zu-%zu ", range.location, NSMaxRange(range) - 1]; } }]; [result appendString:@"}"]; diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index 5cd628f184..eafcdc6970 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -148,9 +148,11 @@ typedef std::map, std::less> ASCh ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); _children.clear(); - [children enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { - _children[idx] = [self layoutableToAddFromLayoutable:obj]; - }]; + NSUInteger i = 0; + for (id child in children) { + _children[i] = [self layoutableToAddFromLayoutable:child]; + i += 1; + } } - (id)childForIndex:(NSUInteger)index diff --git a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm index eea54f5028..a251ed7fc6 100644 --- a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm +++ b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm @@ -171,8 +171,10 @@ NSArray *ASFindElementsInMultidimensionalArrayAtIndexPaths(NSMutableArray *mutab NSArray *ASIndexPathsForMultidimensionalArrayAtIndexSet(NSArray *multidimensionalArray, NSIndexSet *indexSet) { NSMutableArray *res = [NSMutableArray array]; - [indexSet enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { - ASRecursivelyFindIndexPathsForMultidimensionalArray(multidimensionalArray[idx], [NSIndexPath indexPathWithIndex:idx], res); + [indexSet enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + for (NSUInteger i = range.location; i < NSMaxRange(range); i++) { + ASRecursivelyFindIndexPathsForMultidimensionalArray(multidimensionalArray[i], [NSIndexPath indexPathWithIndex:i], res); + } }]; return res; diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m index d1b54438a0..8486160bc1 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m @@ -314,8 +314,10 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) NSMutableIndexSet *allIndexes = [NSMutableIndexSet new]; for (_ASHierarchySectionChange *change in changes) { - [change.indexSet enumerateIndexesUsingBlock:^(NSUInteger idx, __unused BOOL *stop) { - animationOptions[@(idx)] = @(change.animationOptions); + [change.indexSet enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + for (NSUInteger i = range.location; i < NSMaxRange(range); i++) { + animationOptions[@(i)] = @(change.animationOptions); + } }]; [allIndexes addIndexes:change.indexSet]; } @@ -326,24 +328,30 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) __block ASDataControllerAnimationOptions currentOptions = 0; NSMutableIndexSet *currentIndexes = [NSMutableIndexSet indexSet]; - NSEnumerationOptions options = type == _ASHierarchyChangeTypeDelete ? NSEnumerationReverse : kNilOptions; + BOOL reverse = type == _ASHierarchyChangeTypeDelete; + NSEnumerationOptions options = reverse ? NSEnumerationReverse : kNilOptions; - [allIndexes enumerateIndexesWithOptions:options usingBlock:^(NSUInteger idx, __unused BOOL * stop) { - ASDataControllerAnimationOptions options = [animationOptions[@(idx)] integerValue]; - - // End the previous group if needed. - if (options != currentOptions && currentIndexes.count > 0) { - _ASHierarchySectionChange *change = [[_ASHierarchySectionChange alloc] initWithChangeType:type indexSet:[currentIndexes copy] animationOptions:currentOptions]; - [result addObject:change]; - [currentIndexes removeAllIndexes]; + [allIndexes enumerateRangesWithOptions:options usingBlock:^(NSRange range, BOOL * _Nonnull stop) { + NSInteger increment = reverse ? -1 : 1; + NSUInteger start = reverse ? NSMaxRange(range) - 1 : range.location; + NSInteger limit = reverse ? range.location - 1 : NSMaxRange(range); + for (NSInteger i = start; i != limit; i += increment) { + ASDataControllerAnimationOptions options = [animationOptions[@(i)] integerValue]; + + // End the previous group if needed. + if (options != currentOptions && currentIndexes.count > 0) { + _ASHierarchySectionChange *change = [[_ASHierarchySectionChange alloc] initWithChangeType:type indexSet:[currentIndexes copy] animationOptions:currentOptions]; + [result addObject:change]; + [currentIndexes removeAllIndexes]; + } + + // Start a new group if needed. + if (currentIndexes.count == 0) { + currentOptions = options; + } + + [currentIndexes addIndex:i]; } - - // Start a new group if needed. - if (currentIndexes.count == 0) { - currentOptions = options; - } - - [currentIndexes addIndex:idx]; }]; // Finish up the last group. From 6aad142f2e4557176ce9c1c14c85b61dfc57b99e Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 12 Jul 2016 14:10:47 -0700 Subject: [PATCH 132/247] [ASCollectionDataController] Some optimizations --- .../Details/ASCollectionDataController.mm | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index 944e6cbcbe..b0f033d017 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -88,8 +88,7 @@ - (void)willInsertSections:(NSIndexSet *)sections { - NSArray *keys = _pendingContexts.allKeys; - for (NSString *kind in keys) { + for (NSString *kind in _pendingContexts) { NSMutableArray *contexts = _pendingContexts[kind]; NSMutableArray *sectionArray = [NSMutableArray arrayWithCapacity:sections.count]; for (NSUInteger i = 0; i < sections.count; i++) { @@ -100,8 +99,8 @@ [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; - [_pendingContexts removeObjectForKey:kind]; } + [_pendingContexts removeAllObjects]; } - (void)willDeleteSections:(NSIndexSet *)sections @@ -116,9 +115,10 @@ - (void)willMoveSection:(NSInteger)section toSection:(NSInteger)newSection { + NSIndexSet *sectionAsIndexSet = [NSIndexSet indexSetWithIndex:section]; for (NSString *kind in [self supplementaryKinds]) { NSMutableArray *editingNodes = [self editingNodesOfKind:kind]; - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(editingNodes, [NSIndexSet indexSetWithIndex:section]); + NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(editingNodes, sectionAsIndexSet); NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(editingNodes, indexPaths); [self deleteNodesOfKind:kind atIndexPaths:indexPaths completion:nil]; @@ -145,15 +145,14 @@ - (void)willInsertRowsAtIndexPaths:(NSArray *)indexPaths { - NSArray *keys = _pendingContexts.allKeys; - for (NSString *kind in keys) { + for (NSString *kind in _pendingContexts) { NSMutableArray *contexts = _pendingContexts[kind]; [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; - [_pendingContexts removeObjectForKey:kind]; } + [_pendingContexts removeAllObjects]; } - (void)prepareForDeleteRowsAtIndexPaths:(NSArray *)indexPaths @@ -174,15 +173,18 @@ // If any of the contexts remain after the deletion, re-insert them, e.g. // UICollectionElementKindSectionHeader remains even if item 0 is deleted. - NSArray *contexts = [_pendingContexts[kind] filteredArrayUsingPredicate:[NSPredicate predicateWithBlock:^(ASIndexedNodeContext *context, NSDictionary *_) { - return [deletedIndexPaths containsObject:context.indexPath]; - }]]; - - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + NSMutableArray *reinsertedContexts = [NSMutableArray array]; + for (ASIndexedNodeContext *context in _pendingContexts[kind]) { + if ([deletedIndexPaths containsObject:context.indexPath]) { + [reinsertedContexts addObject:context]; + } + } + + [self batchLayoutNodesFromContexts:reinsertedContexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; - [_pendingContexts removeObjectForKey:kind]; } + [_pendingContexts removeAllObjects]; } - (void)_populateSupplementaryNodesOfKind:(NSString *)kind withMutableContexts:(NSMutableArray *)contexts @@ -190,12 +192,12 @@ id environment = [self.environmentDelegate dataControllerEnvironment]; ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; - NSUInteger sectionCount = [self.collectionDataSource dataController:self numberOfSectionsForSupplementaryNodeOfKind:kind]; + id source = self.collectionDataSource; + NSUInteger sectionCount = [source dataController:self numberOfSectionsForSupplementaryNodeOfKind:kind]; for (NSUInteger i = 0; i < sectionCount; i++) { - NSIndexPath *sectionIndexPath = [[NSIndexPath alloc] initWithIndex:i]; - NSUInteger rowCount = [self.collectionDataSource dataController:self supplementaryNodesOfKind:kind inSection:i]; + NSUInteger rowCount = [source dataController:self supplementaryNodesOfKind:kind inSection:i]; for (NSUInteger j = 0; j < rowCount; j++) { - NSIndexPath *indexPath = [sectionIndexPath indexPathByAddingIndex:j]; + NSIndexPath *indexPath = [NSIndexPath indexPathForItem:j inSection:i]; [self _populateSupplementaryNodeOfKind:kind atIndexPath:indexPath mutableContexts:contexts environmentTraitCollection:environmentTraitCollection]; } } From 9cd606d1823ec10a24c72fd1dd3de1f711565643 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 12 Jul 2016 14:14:19 -0700 Subject: [PATCH 133/247] Two more small performance wins --- AsyncDisplayKit/ASControlNode.mm | 2 +- AsyncDisplayKit/ASVideoPlayerNode.mm | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASControlNode.mm b/AsyncDisplayKit/ASControlNode.mm index ef1bad52c6..34333ea0dd 100644 --- a/AsyncDisplayKit/ASControlNode.mm +++ b/AsyncDisplayKit/ASControlNode.mm @@ -330,7 +330,7 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v NSMutableSet *targets = [[NSMutableSet alloc] init]; // Look at each event... - for (NSMapTable *eventDispatchTable in [_controlEventDispatchTable allValues]) + for (NSMapTable *eventDispatchTable in [_controlEventDispatchTable objectEnumerator]) { // and each event's targets... for (id target in eventDispatchTable) diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index 00a0165a44..7d1dc889d9 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -302,8 +302,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; - (void)removeControls { - NSArray *controls = [_cachedControls allValues]; - for (ASDisplayNode *node in controls) { + for (ASDisplayNode *node in [_cachedControls objectEnumerator]) { [node removeFromSupernode]; } From 8eb25e737b98bc520c4bbc5a53c51a05e935cabb Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 12 Jul 2016 15:17:57 -0700 Subject: [PATCH 134/247] [ASCollectionDataController] Use block-based enumeration with dictionaries --- .../Details/ASCollectionDataController.mm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index b0f033d017..f3bcede28c 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -88,8 +88,7 @@ - (void)willInsertSections:(NSIndexSet *)sections { - for (NSString *kind in _pendingContexts) { - NSMutableArray *contexts = _pendingContexts[kind]; + [_pendingContexts enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray * _Nonnull contexts, BOOL * _Nonnull stop) { NSMutableArray *sectionArray = [NSMutableArray arrayWithCapacity:sections.count]; for (NSUInteger i = 0; i < sections.count; i++) { [sectionArray addObject:[NSMutableArray array]]; @@ -99,7 +98,7 @@ [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; - } + }]; [_pendingContexts removeAllObjects]; } @@ -145,13 +144,12 @@ - (void)willInsertRowsAtIndexPaths:(NSArray *)indexPaths { - for (NSString *kind in _pendingContexts) { - NSMutableArray *contexts = _pendingContexts[kind]; - + [_pendingContexts enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray * _Nonnull contexts, BOOL * _Nonnull stop) { [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; - } + }]; + [_pendingContexts removeAllObjects]; } From 0a9b308f2c31ca7a87a737ec477c57220cf1d168 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Tue, 12 Jul 2016 15:28:30 -0700 Subject: [PATCH 135/247] [_ASHierarchyChangeSet] Use std::unordered_map rather than dictionary --- AsyncDisplayKit.xcodeproj/project.pbxproj | 12 ++++++------ ...rarchyChangeSet.m => _ASHierarchyChangeSet.mm} | 15 +++++++++------ 2 files changed, 15 insertions(+), 12 deletions(-) rename AsyncDisplayKit/Private/{_ASHierarchyChangeSet.m => _ASHierarchyChangeSet.mm} (97%) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 6838f16632..a2f6965f13 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -281,8 +281,8 @@ AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; }; AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; }; AC026B701BD57DBF00BBC17E /* _ASHierarchyChangeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */; }; - AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */; }; - AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */; }; + AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */; }; + AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */; }; AC3C4A521A1139C100143C57 /* ASCollectionView.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC3C4A501A1139C100143C57 /* ASCollectionView.mm */; }; AC47D9421B3B891B00AAEE9D /* ASCellNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC6456071B0A335000CF11B8 /* ASCellNode.mm */; }; AC47D9461B3BB41900AAEE9D /* ASRelativeSize.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC47D9441B3BB41900AAEE9D /* ASRelativeSize.mm */; }; @@ -1020,7 +1020,7 @@ AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASChangeSetDataController.h; sourceTree = ""; }; AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASChangeSetDataController.m; sourceTree = ""; }; AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _ASHierarchyChangeSet.h; sourceTree = ""; }; - AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = _ASHierarchyChangeSet.m; sourceTree = ""; }; + AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _ASHierarchyChangeSet.mm; sourceTree = ""; }; AC21EC0F1B3D0BF600C8B19A /* ASStackLayoutDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASStackLayoutDefines.h; path = AsyncDisplayKit/Layout/ASStackLayoutDefines.h; sourceTree = ""; }; AC3C4A4F1A1139C100143C57 /* ASCollectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = ASCollectionView.h; sourceTree = ""; }; AC3C4A501A1139C100143C57 /* ASCollectionView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASCollectionView.mm; sourceTree = ""; }; @@ -1473,7 +1473,7 @@ 058D0A03195D050800B7D73C /* _ASCoreAnimationExtras.h */, 058D0A04195D050800B7D73C /* _ASCoreAnimationExtras.mm */, AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */, - AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.m */, + AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */, 058D0A05195D050800B7D73C /* _ASPendingState.h */, 058D0A06195D050800B7D73C /* _ASPendingState.mm */, 058D0A07195D050800B7D73C /* _ASScopeTimer.h */, @@ -2054,7 +2054,7 @@ 257754B41BEE44CD00737CA5 /* ASTextKitTailTruncater.mm in Sources */, 68B8A4E31CBDB958007E4543 /* ASWeakProxy.m in Sources */, 69E1006F1CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */, - AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */, + AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */, 257754BF1BEE458E00737CA5 /* ASTextKitCoreTextAdditions.m in Sources */, 058D0A18195D050800B7D73C /* _ASDisplayLayer.mm in Sources */, 68355B3C1CB57A5A001D4E68 /* ASImageContainerProtocolCategories.m in Sources */, @@ -2220,7 +2220,7 @@ 9B92C8851BC2EB6E00EE46B2 /* ASCollectionDataController.mm in Sources */, B350623D1B010EFD0018CF92 /* _ASAsyncTransaction.mm in Sources */, B35062401B010EFD0018CF92 /* _ASAsyncTransactionContainer.m in Sources */, - AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.m in Sources */, + AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */, B35062421B010EFD0018CF92 /* _ASAsyncTransactionGroup.m in Sources */, B350624A1B010EFD0018CF92 /* _ASCoreAnimationExtras.mm in Sources */, 68EE0DC01C1B4ED300BA1B99 /* ASMainSerialQueue.mm in Sources */, diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm similarity index 97% rename from AsyncDisplayKit/Private/_ASHierarchyChangeSet.m rename to AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm index 8486160bc1..104c58ebb7 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.m +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm @@ -14,6 +14,7 @@ #import "ASInternalHelpers.h" #import "NSIndexSet+ASHelpers.h" #import "ASAssert.h" +#import NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) { @@ -308,18 +309,20 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) _ASHierarchyChangeType type = [changes.firstObject changeType]; // Lookup table [Int: AnimationOptions] - NSMutableDictionary *animationOptions = [NSMutableDictionary new]; + __block std::unordered_map animationOptions; - // All changed indexes, sorted + // All changed indexes NSMutableIndexSet *allIndexes = [NSMutableIndexSet new]; for (_ASHierarchySectionChange *change in changes) { - [change.indexSet enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { + ASDataControllerAnimationOptions options = change.animationOptions; + NSIndexSet *indexes = change.indexSet; + [indexes enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { for (NSUInteger i = range.location; i < NSMaxRange(range); i++) { - animationOptions[@(i)] = @(change.animationOptions); + animationOptions[i] = options; } }]; - [allIndexes addIndexes:change.indexSet]; + [allIndexes addIndexes:indexes]; } // Create new changes by grouping sorted changes by animation option @@ -336,7 +339,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) NSUInteger start = reverse ? NSMaxRange(range) - 1 : range.location; NSInteger limit = reverse ? range.location - 1 : NSMaxRange(range); for (NSInteger i = start; i != limit; i += increment) { - ASDataControllerAnimationOptions options = [animationOptions[@(i)] integerValue]; + ASDataControllerAnimationOptions options = animationOptions[i]; // End the previous group if needed. if (options != currentOptions && currentIndexes.count > 0) { From 12697f158f5cce99ca9bff3f7bea5c7f40e6be94 Mon Sep 17 00:00:00 2001 From: Fedor Vetoshko Date: Wed, 13 Jul 2016 15:58:15 +0300 Subject: [PATCH 136/247] AsyncDisplayKitOverview collection nodes size fix --- .../Sample/Node Containers/OverviewASCollectionNode.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/AsyncDisplayKitOverview/Sample/Node Containers/OverviewASCollectionNode.m b/examples/AsyncDisplayKitOverview/Sample/Node Containers/OverviewASCollectionNode.m index f0950db089..d406f3b170 100644 --- a/examples/AsyncDisplayKitOverview/Sample/Node Containers/OverviewASCollectionNode.m +++ b/examples/AsyncDisplayKitOverview/Sample/Node Containers/OverviewASCollectionNode.m @@ -66,9 +66,9 @@ }; } -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath +- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - return CGSizeMake(100, 100); + return ASSizeRangeMakeExactSize(CGSizeMake(100, 100)); } @end From e30c76c5ad1eeb486dbf1c64ef458d26d643b5c2 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 13 Jul 2016 10:13:31 -0700 Subject: [PATCH 137/247] Remove deprecated selected and highlighted methods (#1909) --- AsyncDisplayKit/ASCellNode.h | 10 ---------- AsyncDisplayKit/ASCellNode.mm | 10 ---------- 2 files changed, 20 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index fe919c23d5..5aba8ec1b3 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -124,16 +124,6 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { @end -@interface ASCellNode (Deprecated) - -/** - * Previous versions of ASDK did not include "is" in the name of the getter for these properties. - * These older accessor methods don't match UIKit naming, and will be removed in a future version. - */ -- (BOOL)selected ASDISPLAYNODE_DEPRECATED; -- (BOOL)highlighted ASDISPLAYNODE_DEPRECATED; - -@end /** * Simple label-style cell node. Read its source for an example of custom s. diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index 1f618805ae..f9db96452c 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -215,16 +215,6 @@ } } -- (BOOL)selected -{ - return self.isSelected; -} - -- (BOOL)highlighted -{ - return self.isSelected; -} - #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wobjc-missing-super-calls" From 3b429f446e8f2166f9350292fd65f02fd727c816 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 13 Jul 2016 12:10:25 -0700 Subject: [PATCH 138/247] Fix building framework in Xcode --- AsyncDisplayKit.xcodeproj/project.pbxproj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 6838f16632..3136febe88 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -2418,6 +2418,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + DEFINES_MODULE = NO; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -2459,6 +2460,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; + DEFINES_MODULE = NO; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_GENERATE_TEST_COVERAGE_FILES = YES; @@ -2584,7 +2586,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2620,7 +2622,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2661,6 +2663,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; + DEFINES_MODULE = NO; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_GENERATE_TEST_COVERAGE_FILES = YES; @@ -2754,7 +2757,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; + DEFINES_MODULE = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; From 793e15132f78abe64708b36ff416ee0fe669e942 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 13 Jul 2016 15:06:56 -0700 Subject: [PATCH 139/247] Revert "Fix building framework in Xcode" This reverts commit 3b429f446e8f2166f9350292fd65f02fd727c816. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 3136febe88..6838f16632 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -2418,7 +2418,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; - DEFINES_MODULE = NO; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -2460,7 +2459,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; - DEFINES_MODULE = NO; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_GENERATE_TEST_COVERAGE_FILES = YES; @@ -2586,7 +2584,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = NO; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2622,7 +2620,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = NO; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -2663,7 +2661,6 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; - DEFINES_MODULE = NO; ENABLE_NS_ASSERTIONS = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_GENERATE_TEST_COVERAGE_FILES = YES; @@ -2757,7 +2754,7 @@ COPY_PHASE_STRIP = NO; CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = NO; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; From 35c860c183e14f20f2e579ccd8ce8ebf0ff05e35 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Wed, 15 Jun 2016 22:11:24 -0700 Subject: [PATCH 140/247] Refactor usage of ASCollectionViewLayoutInspecting - Fix not using itemSize of UICollectionViewFlowLayout - Move automatic constrained size calculation to the ASCollectionViewFlowLayoutInspector - Provide a null layout inspector for throwing exceptions if a custom UICollectionView is given but no ASCollectionViewLayoutInspecting - Fix not checking for optional layout inspecting data source methods are implemented or not - Improving tests around ASCollectionViewLayoutInspecting --- AsyncDisplayKit/ASCollectionView.mm | 66 ++++------- .../ASCollectionViewFlowLayoutInspector.h | 27 ++++- .../ASCollectionViewFlowLayoutInspector.m | 109 ++++++++++++++---- AsyncDisplayKitTests/ASCollectionViewTests.m | 5 +- 4 files changed, 138 insertions(+), 69 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 857245573f..0d29f7335d 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -38,7 +38,6 @@ typedef NS_ENUM(NSUInteger, ASCollectionViewInvalidationStyle) { }; static const NSUInteger kASCollectionViewAnimationNone = UITableViewRowAnimationNone; -static const ASSizeRange kInvalidSizeRange = {CGSizeZero, CGSizeZero}; static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; #pragma mark - @@ -95,7 +94,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; ASCollectionDataController *_dataController; ASRangeController *_rangeController; ASCollectionViewLayoutController *_layoutController; - ASCollectionViewFlowLayoutInspector *_flowLayoutInspector; + id _defaultLayoutInspector; NSMutableSet *_cellsForVisibilityUpdates; id _layoutFacilitator; @@ -246,11 +245,19 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; // and should not trigger a relayout. _ignoreMaxSizeChange = CGSizeEqualToSize(_maxSizeForNodesConstrainedSize, CGSizeZero); - // Register the default layout inspector delegate for flow layouts only, custom layouts - // will need to roll their own ASCollectionViewLayoutInspecting implementation and set a layout delegate if ([layout asdk_isFlowLayout]) { - _layoutInspector = [self flowLayoutInspector]; + // Register the default layout inspector delegate for flow layouts only + UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)self.collectionViewLayout; + ASDisplayNodeAssertNotNil(layout, @"Collection view layout must be a flow layout to use the built-in inspector"); + _defaultLayoutInspector = [[ASCollectionViewFlowLayoutInspector alloc] initWithCollectionView:self flowLayout:layout]; + } else { + // Custom layouts will need to roll their own ASCollectionViewLayoutInspecting implementation and set a layout + // delegate. In the meantime ASDK provides a null layout inspector that does not provide any implementation + // and throws an exception for methods that should be implemented in the + _defaultLayoutInspector = [[ASCollectionViewNullLayoutInspector alloc] init]; } + _layoutInspector = _defaultLayoutInspector; + _layoutFacilitator = layoutFacilitator; _proxyDelegate = [[ASCollectionViewProxy alloc] initWithTarget:nil interceptor:self]; @@ -281,19 +288,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; [self setAsyncDataSource:nil]; } -/** - * A layout inspector implementation specific for the sizing behavior of UICollectionViewFlowLayouts - */ -- (ASCollectionViewFlowLayoutInspector *)flowLayoutInspector -{ - if (_flowLayoutInspector == nil) { - UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)self.collectionViewLayout; - ASDisplayNodeAssertNotNil(layout, @"Collection view layout must be a flow layout to use the built-in inspector"); - _flowLayoutInspector = [[ASCollectionViewFlowLayoutInspector alloc] initWithCollectionView:self flowLayout:layout]; - } - return _flowLayoutInspector; -} - #pragma mark - #pragma mark Overrides. @@ -379,6 +373,10 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } super.dataSource = (id)_proxyDataSource; + + if ([_layoutInspector respondsToSelector:@selector(didChangeCollectionViewDataSource:)]) { + [_layoutInspector didChangeCollectionViewDataSource:asyncDataSource]; + } } - (void)setAsyncDelegate:(id)asyncDelegate @@ -411,7 +409,9 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; super.delegate = (id)_proxyDelegate; - [_layoutInspector didChangeCollectionViewDelegate:asyncDelegate]; + if ([_layoutInspector respondsToSelector:@selector(didChangeCollectionViewDelegate:)]) { + [_layoutInspector didChangeCollectionViewDelegate:asyncDelegate]; + } } - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType @@ -943,30 +943,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (ASSizeRange)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - ASSizeRange constrainedSize = kInvalidSizeRange; - if (_layoutInspector) { - constrainedSize = [_layoutInspector collectionView:self constrainedSizeForNodeAtIndexPath:indexPath]; - } - - if (!ASSizeRangeEqualToSizeRange(constrainedSize, kInvalidSizeRange)) { - return constrainedSize; - } - - // TODO: Move this logic into the flow layout inspector. Create a simple inspector for non-flow layouts that don't - // implement a custom inspector. - if (_asyncDataSourceFlags.asyncDataSourceConstrainedSizeForNode) { - constrainedSize = [_asyncDataSource collectionView:self constrainedSizeForNodeAtIndexPath:indexPath]; - } else { - CGSize maxSize = CGSizeEqualToSize(_maxSizeForNodesConstrainedSize, CGSizeZero) ? self.bounds.size : _maxSizeForNodesConstrainedSize; - if (ASScrollDirectionContainsHorizontalDirection([self scrollableDirections])) { - maxSize.width = FLT_MAX; - } else { - maxSize.height = FLT_MAX; - } - constrainedSize = ASSizeRangeMake(CGSizeZero, maxSize); - } - - return constrainedSize; + return [_layoutInspector collectionView:self constrainedSizeForNodeAtIndexPath:indexPath]; } - (NSUInteger)dataController:(ASDataController *)dataController rowsInSection:(NSUInteger)section @@ -1006,19 +983,16 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (ASSizeRange)dataController:(ASCollectionDataController *)dataController constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { - ASDisplayNodeAssert(_layoutInspector != nil, @"To support supplementary nodes in ASCollectionView, it must have a layoutDelegate for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); return [_layoutInspector collectionView:self constrainedSizeForSupplementaryNodeOfKind:kind atIndexPath:indexPath]; } - (NSUInteger)dataController:(ASCollectionDataController *)dataController supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section { - ASDisplayNodeAssert(_layoutInspector != nil, @"To support supplementary nodes in ASCollectionView, it must have a layoutDelegate for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); return [_layoutInspector collectionView:self supplementaryNodesOfKind:kind inSection:section]; } - (NSUInteger)dataController:(ASCollectionDataController *)dataController numberOfSectionsForSupplementaryNodeOfKind:(NSString *)kind; { - ASDisplayNodeAssert(_layoutInspector != nil, @"To support supplementary nodes in ASCollectionView, it must have a layoutDelegate for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); return [_layoutInspector collectionView:self numberOfSectionsForSupplementaryNodeOfKind:kind]; } diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h index 661f140628..697c562d03 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h @@ -14,12 +14,15 @@ #import @class ASCollectionView; +@protocol ASCollectionDataSource; @protocol ASCollectionDelegate; +NS_ASSUME_NONNULL_BEGIN + @protocol ASCollectionViewLayoutInspecting /** - * Provides the size range needed to measure the collection view's item. + * Asks the inspector to provide a constarained size range for the given collection view node. */ - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath; @@ -47,12 +50,32 @@ */ - (void)didChangeCollectionViewDelegate:(id)delegate; +/** + * Allow the inspector to respond to dataSource changes. + * + * @discussion A great time to update perform selector caches! + */ +- (void)didChangeCollectionViewDataSource:(id)dataSource; + @end +/** + * Simple "Null Object" inspector for non-flow layouts that does throws exceptions if methods are called + * from + */ +@interface ASCollectionViewNullLayoutInspector : NSObject + +@end + +/** + * A layout inspector implementation specific for the sizing behavior of UICollectionViewFlowLayouts + */ @interface ASCollectionViewFlowLayoutInspector : NSObject -@property (nonatomic, weak) UICollectionViewFlowLayout *layout; +@property (nonatomic, weak, readonly) UICollectionViewFlowLayout *layout; - (instancetype)initWithCollectionView:(ASCollectionView *)collectionView flowLayout:(UICollectionViewFlowLayout *)flowLayout; @end + +NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m index f217571193..43f62f2d26 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m @@ -8,29 +8,72 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import - #import "ASCollectionViewFlowLayoutInspector.h" #import "ASCollectionView.h" #import "ASAssert.h" #import "ASEqualityHelpers.h" +#define kDefaultItemSize CGSizeMake(50, 50) + +#pragma mark - ASCollectionViewNullLayoutInspector + +@implementation ASCollectionViewNullLayoutInspector + +- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath +{ + ASDisplayNodeAssert(NO, @"To support a custom collection view layout in ASCollectionView, it must have a layoutInspector for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); + return ASSizeRangeMake(CGSizeZero, CGSizeZero); +} + +- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath +{ + ASDisplayNodeAssert(NO, @"To support supplementary nodes in ASCollectionView, it must have a layoutInspector for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); + return ASSizeRangeMake(CGSizeZero, CGSizeZero); +} + +- (NSUInteger)collectionView:(ASCollectionView *)collectionView numberOfSectionsForSupplementaryNodeOfKind:(NSString *)kind +{ + ASDisplayNodeAssert(NO, @"To support supplementary nodes in ASCollectionView, it must have a layoutInspector for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); + return 0; +} + +- (NSUInteger)collectionView:(ASCollectionView *)collectionView supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section +{ + ASDisplayNodeAssert(NO, @"To support supplementary nodes in ASCollectionView, it must have a layoutInspector for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); + return 0; +} + +@end + + +#pragma mark - ASCollectionViewFlowLayoutInspector + +@interface ASCollectionViewFlowLayoutInspector () +@property (nonatomic, weak) UICollectionViewFlowLayout *layout; +@end + @implementation ASCollectionViewFlowLayoutInspector { - BOOL _delegateImplementsReferenceSizeForHeader; - BOOL _delegateImplementsReferenceSizeForFooter; + struct { + unsigned int implementsReferenceSizeForHeader:1; + unsigned int implementsReferenceSizeForFooter:1; + } _delegateFlags; + + struct { + unsigned int implementsConstrainedSizeForNodeAtIndexPath:1; + unsigned int implementsNumberOfSectionsInCollectionView:1; + } _dataSourceFlags; } #pragma mark - Accessors - (instancetype)initWithCollectionView:(ASCollectionView *)collectionView flowLayout:(UICollectionViewFlowLayout *)flowLayout; { + NSParameterAssert(collectionView); + NSParameterAssert(flowLayout); + self = [super init]; - - if (flowLayout == nil) { - ASDisplayNodeAssert(NO, @"Should never create a layout inspector without a layout"); - } - if (self != nil) { + [self didChangeCollectionViewDataSource:collectionView.asyncDataSource]; [self didChangeCollectionViewDelegate:collectionView.asyncDelegate]; _layout = flowLayout; } @@ -40,11 +83,20 @@ - (void)didChangeCollectionViewDelegate:(id)delegate; { if (delegate == nil) { - _delegateImplementsReferenceSizeForHeader = NO; - _delegateImplementsReferenceSizeForFooter = NO; + memset(&_delegateFlags, 0, sizeof(_delegateFlags)); } else { - _delegateImplementsReferenceSizeForHeader = [delegate respondsToSelector:@selector(collectionView:layout:referenceSizeForHeaderInSection:)]; - _delegateImplementsReferenceSizeForFooter = [delegate respondsToSelector:@selector(collectionView:layout:referenceSizeForFooterInSection:)]; + _delegateFlags.implementsReferenceSizeForHeader = [delegate respondsToSelector:@selector(collectionView:layout:referenceSizeForHeaderInSection:)]; + _delegateFlags.implementsReferenceSizeForFooter = [delegate respondsToSelector:@selector(collectionView:layout:referenceSizeForFooterInSection:)]; + } +} + +- (void)didChangeCollectionViewDataSource:(id)dataSource +{ + if (dataSource == nil) { + memset(&_dataSourceFlags, 0, sizeof(_dataSourceFlags)); + } else { + _dataSourceFlags.implementsConstrainedSizeForNodeAtIndexPath = [dataSource respondsToSelector:@selector(collectionView:constrainedSizeForNodeAtIndexPath:)]; + _dataSourceFlags.implementsNumberOfSectionsInCollectionView = [dataSource respondsToSelector:@selector(numberOfSectionsInCollectionView:)]; } } @@ -52,8 +104,25 @@ - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - // TODO: Provide constrained size for flow layout item nodes - return ASSizeRangeMake(CGSizeZero, CGSizeZero); + // First check if delegate provides a constrained size + if (_dataSourceFlags.implementsConstrainedSizeForNodeAtIndexPath) { + return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath]; + } + + // Check if item size as constrained size is given + CGSize itemSize = _layout.itemSize; + if (!CGSizeEqualToSize(itemSize, kDefaultItemSize)) { + return ASSizeRangeMake(itemSize, itemSize); + } + + // No constrained size is given try to let the cells layout itself as far as possible based on the scrollable direction + CGSize maxSize = collectionView.bounds.size; + if (ASScrollDirectionContainsHorizontalDirection([collectionView scrollableDirections])) { + maxSize.width = FLT_MAX; + } else { + maxSize.height = FLT_MAX; + } + return ASSizeRangeMake(CGSizeZero, maxSize); } - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath @@ -61,16 +130,16 @@ CGSize constrainedSize; CGSize supplementarySize = [self sizeForSupplementaryViewOfKind:kind inSection:indexPath.section collectionView:collectionView]; if (_layout.scrollDirection == UICollectionViewScrollDirectionVertical) { - constrainedSize = CGSizeMake(collectionView.bounds.size.width, supplementarySize.height); + constrainedSize = CGSizeMake(CGRectGetWidth(collectionView.bounds), supplementarySize.height); } else { - constrainedSize = CGSizeMake(supplementarySize.height, collectionView.bounds.size.height); + constrainedSize = CGSizeMake(supplementarySize.height, CGRectGetHeight(collectionView.bounds)); } return ASSizeRangeMake(CGSizeZero, constrainedSize); } - (NSUInteger)collectionView:(ASCollectionView *)collectionView numberOfSectionsForSupplementaryNodeOfKind:(NSString *)kind { - if ([collectionView.asyncDataSource respondsToSelector:@selector(numberOfSectionsInCollectionView:)]) { + if (_dataSourceFlags.implementsNumberOfSectionsInCollectionView) { return [collectionView.asyncDataSource numberOfSectionsInCollectionView:collectionView]; } else { return 1; @@ -87,13 +156,13 @@ - (CGSize)sizeForSupplementaryViewOfKind:(NSString *)kind inSection:(NSUInteger)section collectionView:(ASCollectionView *)collectionView { if (ASObjectIsEqual(kind, UICollectionElementKindSectionHeader)) { - if (_delegateImplementsReferenceSizeForHeader) { + if (_delegateFlags.implementsReferenceSizeForHeader) { return [[self delegateForCollectionView:collectionView] collectionView:collectionView layout:_layout referenceSizeForHeaderInSection:section]; } else { return [self.layout headerReferenceSize]; } } else if (ASObjectIsEqual(kind, UICollectionElementKindSectionFooter)) { - if (_delegateImplementsReferenceSizeForFooter) { + if (_delegateFlags.implementsReferenceSizeForFooter) { return [[self delegateForCollectionView:collectionView] collectionView:collectionView layout:_layout referenceSizeForFooterInSection:section]; } else { return [self.layout footerReferenceSize]; diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index e4c7c8819a..45d70f6643 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -128,7 +128,10 @@ { UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init]; ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; - XCTAssert(collectionView.layoutInspector == nil, @"should not set a layout delegate for custom layouts"); + XCTAssert(collectionView.layoutInspector != nil, @"should automatically set a layout delegate for custom layouts"); + XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewNullLayoutInspector class]], @"should have a null layout inspector by default if no layout inspector is given for a custom layout"); + XCTAssertThrows([collectionView.layoutInspector collectionView:collectionView constrainedSizeForNodeAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]], @"should throw an exception for methods"); + XCTAssertThrows([collectionView.layoutInspector collectionView:collectionView supplementaryNodesOfKind:UICollectionElementKindSectionHeader inSection:0], @"should throw an exception for methods"); } - (void)testThatRegisteringASupplementaryNodeStoresItForIntrospection From 9fb3129a0ef53b08b8412313ec4f2baf4d6e0945 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 17 Jun 2016 13:26:05 -0700 Subject: [PATCH 141/247] Add default ASCollectionViewLayoutInspecting for custom ASCollectionViewLayout --- AsyncDisplayKit/ASCollectionView.mm | 2 +- .../ASCollectionViewFlowLayoutInspector.h | 13 ++-- .../ASCollectionViewFlowLayoutInspector.m | 68 ++++++++++++++----- AsyncDisplayKitTests/ASCollectionViewTests.m | 8 +-- 4 files changed, 64 insertions(+), 27 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 0d29f7335d..1e21c387c3 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -254,7 +254,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; // Custom layouts will need to roll their own ASCollectionViewLayoutInspecting implementation and set a layout // delegate. In the meantime ASDK provides a null layout inspector that does not provide any implementation // and throws an exception for methods that should be implemented in the - _defaultLayoutInspector = [[ASCollectionViewNullLayoutInspector alloc] init]; + _defaultLayoutInspector = [[ASCollectionViewDefaultCustomLayoutInspector alloc] initWithCollectionView:self]; } _layoutInspector = _defaultLayoutInspector; diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h index 697c562d03..6197ca3187 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h @@ -60,10 +60,14 @@ NS_ASSUME_NONNULL_BEGIN @end /** - * Simple "Null Object" inspector for non-flow layouts that does throws exceptions if methods are called - * from + * A layout inspector for non-flow layouts that returns a constrained size to let the cells layout itself as + * far as possible based on the scrollable direction of the collection view. It throws exceptions for delegate + * methods that are related to supplementary node's management. */ -@interface ASCollectionViewNullLayoutInspector : NSObject +@interface ASCollectionViewDefaultCustomLayoutInspector : NSObject + +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)initWithCollectionView:(ASCollectionView *)collectionView NS_DESIGNATED_INITIALIZER; @end @@ -74,7 +78,8 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, weak, readonly) UICollectionViewFlowLayout *layout; -- (instancetype)initWithCollectionView:(ASCollectionView *)collectionView flowLayout:(UICollectionViewFlowLayout *)flowLayout; +- (instancetype)init NS_UNAVAILABLE; +- (instancetype)initWithCollectionView:(ASCollectionView *)collectionView flowLayout:(UICollectionViewFlowLayout *)flowLayout NS_DESIGNATED_INITIALIZER; @end diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m index 43f62f2d26..e960ec0610 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m @@ -15,14 +15,57 @@ #define kDefaultItemSize CGSizeMake(50, 50) -#pragma mark - ASCollectionViewNullLayoutInspector +#pragma mark - Helper Functions -@implementation ASCollectionViewNullLayoutInspector +// Returns a constrained size to let the cells layout itself as far as possible based on the scrollable direction +// of the collection view +static ASSizeRange ASDefaultConstrainedSizeForNodeForCollectionView(ASCollectionView *collectionView) { + CGSize maxSize = collectionView.bounds.size; + if (ASScrollDirectionContainsHorizontalDirection(collectionView.scrollableDirections)) { + maxSize.width = FLT_MAX; + } else { + maxSize.height = FLT_MAX; + } + return ASSizeRangeMake(CGSizeZero, maxSize); +} + +#pragma mark - ASCollectionViewDefaultCustomLayoutInspector + +@implementation ASCollectionViewDefaultCustomLayoutInspector { + struct { + unsigned int implementsConstrainedSizeForNodeAtIndexPath:1; + } _dataSourceFlags; +} + +#pragma mark Lifecycle + +- (instancetype)initWithCollectionView:(ASCollectionView *)collectionView +{ + self = [super init]; + if (self != nil) { + [self didChangeCollectionViewDataSource:collectionView.asyncDataSource]; + } + return self; +} + +#pragma mark ASCollectionViewLayoutInspecting + +- (void)didChangeCollectionViewDataSource:(id)dataSource +{ + if (dataSource == nil) { + memset(&_dataSourceFlags, 0, sizeof(_dataSourceFlags)); + } else { + _dataSourceFlags.implementsConstrainedSizeForNodeAtIndexPath = [dataSource respondsToSelector:@selector(collectionView:constrainedSizeForNodeAtIndexPath:)]; + } +} - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - ASDisplayNodeAssert(NO, @"To support a custom collection view layout in ASCollectionView, it must have a layoutInspector for layout inspection. (See ASCollectionViewFlowLayoutInspector for an example.)"); - return ASSizeRangeMake(CGSizeZero, CGSizeZero); + if (_dataSourceFlags.implementsConstrainedSizeForNodeAtIndexPath) { + return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath]; + } + + return ASDefaultConstrainedSizeForNodeForCollectionView(collectionView); } - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath @@ -64,7 +107,7 @@ } _dataSourceFlags; } -#pragma mark - Accessors +#pragma mark Lifecycle - (instancetype)initWithCollectionView:(ASCollectionView *)collectionView flowLayout:(UICollectionViewFlowLayout *)flowLayout; { @@ -80,6 +123,8 @@ return self; } +#pragma mark ASCollectionViewLayoutInspecting + - (void)didChangeCollectionViewDelegate:(id)delegate; { if (delegate == nil) { @@ -100,29 +145,18 @@ } } -#pragma mark - ASCollectionViewLayoutInspecting - - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - // First check if delegate provides a constrained size if (_dataSourceFlags.implementsConstrainedSizeForNodeAtIndexPath) { return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath]; } - // Check if item size as constrained size is given CGSize itemSize = _layout.itemSize; if (!CGSizeEqualToSize(itemSize, kDefaultItemSize)) { return ASSizeRangeMake(itemSize, itemSize); } - // No constrained size is given try to let the cells layout itself as far as possible based on the scrollable direction - CGSize maxSize = collectionView.bounds.size; - if (ASScrollDirectionContainsHorizontalDirection([collectionView scrollableDirections])) { - maxSize.width = FLT_MAX; - } else { - maxSize.height = FLT_MAX; - } - return ASSizeRangeMake(CGSizeZero, maxSize); + return ASDefaultConstrainedSizeForNodeForCollectionView(collectionView); } - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 45d70f6643..6de68d4d79 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -124,14 +124,12 @@ XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default"); } -- (void)testThatItDoesNotSetALayoutInspectorForCustomLayouts +- (void)testThatISetALayoutInspectorForCustomLayouts { UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init]; ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; - XCTAssert(collectionView.layoutInspector != nil, @"should automatically set a layout delegate for custom layouts"); - XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewNullLayoutInspector class]], @"should have a null layout inspector by default if no layout inspector is given for a custom layout"); - XCTAssertThrows([collectionView.layoutInspector collectionView:collectionView constrainedSizeForNodeAtIndexPath:[NSIndexPath indexPathForItem:0 inSection:0]], @"should throw an exception for methods"); - XCTAssertThrows([collectionView.layoutInspector collectionView:collectionView supplementaryNodesOfKind:UICollectionElementKindSectionHeader inSection:0], @"should throw an exception for methods"); + XCTAssert(collectionView.layoutInspector != nil, @"should automatically set a layout delegate for flow layouts"); + XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewDefaultCustomLayoutInspector class]], @"should have a flow layout inspector by default"); } - (void)testThatRegisteringASupplementaryNodeStoresItForIntrospection From 30bb2ee93d7e68a8122e9745851c1a3bd7b18e26 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 24 Jun 2016 10:15:04 -0700 Subject: [PATCH 142/247] Address comments from @levi --- AsyncDisplayKit/ASCollectionView.mm | 66 ++++++++++++++----- .../ASCollectionViewFlowLayoutInspector.h | 2 +- .../ASCollectionViewFlowLayoutInspector.m | 12 ++-- AsyncDisplayKitTests/ASCollectionViewTests.m | 2 +- 4 files changed, 58 insertions(+), 24 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 1e21c387c3..b42ac741e0 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -95,6 +95,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; ASRangeController *_rangeController; ASCollectionViewLayoutController *_layoutController; id _defaultLayoutInspector; + id _layoutInspector; NSMutableSet *_cellsForVisibilityUpdates; id _layoutFacilitator; @@ -156,6 +157,11 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; unsigned int asyncDataSourceNumberOfSectionsInCollectionView:1; unsigned int asyncDataSourceCollectionViewConstrainedSizeForNodeAtIndexPath:1; } _asyncDataSourceFlags; + + struct { + unsigned int layoutInspectorDidChangeCollectionViewDataSource:1; + unsigned int layoutInspectorDidChangeCollectionViewDelegate:1; + } _layoutInspectorFlags; } // Used only when ASCollectionView is created directly rather than through ASCollectionNode. @@ -245,21 +251,11 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; // and should not trigger a relayout. _ignoreMaxSizeChange = CGSizeEqualToSize(_maxSizeForNodesConstrainedSize, CGSizeZero); - if ([layout asdk_isFlowLayout]) { - // Register the default layout inspector delegate for flow layouts only - UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)self.collectionViewLayout; - ASDisplayNodeAssertNotNil(layout, @"Collection view layout must be a flow layout to use the built-in inspector"); - _defaultLayoutInspector = [[ASCollectionViewFlowLayoutInspector alloc] initWithCollectionView:self flowLayout:layout]; - } else { - // Custom layouts will need to roll their own ASCollectionViewLayoutInspecting implementation and set a layout - // delegate. In the meantime ASDK provides a null layout inspector that does not provide any implementation - // and throws an exception for methods that should be implemented in the - _defaultLayoutInspector = [[ASCollectionViewDefaultCustomLayoutInspector alloc] initWithCollectionView:self]; - } - _layoutInspector = _defaultLayoutInspector; - _layoutFacilitator = layoutFacilitator; + // Trigger creating the layout inspector + [self layoutInspector]; + _proxyDelegate = [[ASCollectionViewProxy alloc] initWithTarget:nil interceptor:self]; super.delegate = (id)_proxyDelegate; @@ -373,8 +369,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } super.dataSource = (id)_proxyDataSource; - - if ([_layoutInspector respondsToSelector:@selector(didChangeCollectionViewDataSource:)]) { + + if (_layoutInspectorFlags.layoutInspectorDidChangeCollectionViewDataSource) { [_layoutInspector didChangeCollectionViewDataSource:asyncDataSource]; } } @@ -409,11 +405,49 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; super.delegate = (id)_proxyDelegate; - if ([_layoutInspector respondsToSelector:@selector(didChangeCollectionViewDelegate:)]) { + if (_layoutInspectorFlags.layoutInspectorDidChangeCollectionViewDelegate) { [_layoutInspector didChangeCollectionViewDelegate:asyncDelegate]; } } +- (void)setCollectionViewLayout:(UICollectionViewLayout *)collectionViewLayout +{ + [super setCollectionViewLayout:collectionViewLayout]; + + // Trigger recreation of layout inspector with new collection view layout + if (_layoutInspector != nil) { + _layoutInspector = nil; + [self layoutInspector]; + } +} + +- (id)layoutInspector +{ + if (_layoutInspector == nil) { + UICollectionViewFlowLayout *layout = (UICollectionViewFlowLayout *)self.collectionViewLayout; + if ([layout asdk_isFlowLayout]) { + // Register the default layout inspector delegate for flow layouts only + _defaultLayoutInspector = [[ASCollectionViewFlowLayoutInspector alloc] initWithCollectionView:self flowLayout:layout]; + } else { + // Register the default layout inspector delegate for custom collection view layouts + _defaultLayoutInspector = [[ASCollectionViewLayoutInspector alloc] initWithCollectionView:self]; + } + + // Explicitly call the setter to wire up the _layoutInspectorFlags + self.layoutInspector = _defaultLayoutInspector; + } + + return _layoutInspector; +} + +- (void)setLayoutInspector:(id)layoutInspector +{ + _layoutInspector = layoutInspector; + + _layoutInspectorFlags.layoutInspectorDidChangeCollectionViewDataSource = [_layoutInspector respondsToSelector:@selector(didChangeCollectionViewDataSource:)]; + _layoutInspectorFlags.layoutInspectorDidChangeCollectionViewDelegate = [_layoutInspector respondsToSelector:@selector(didChangeCollectionViewDelegate:)]; +} + - (void)setTuningParameters:(ASRangeTuningParameters)tuningParameters forRangeType:(ASLayoutRangeType)rangeType { [_rangeController setTuningParameters:tuningParameters forRangeMode:ASLayoutRangeModeFull rangeType:rangeType]; diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h index 6197ca3187..1fc5d46935 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h @@ -64,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN * far as possible based on the scrollable direction of the collection view. It throws exceptions for delegate * methods that are related to supplementary node's management. */ -@interface ASCollectionViewDefaultCustomLayoutInspector : NSObject +@interface ASCollectionViewLayoutInspector : NSObject - (instancetype)init NS_UNAVAILABLE; - (instancetype)initWithCollectionView:(ASCollectionView *)collectionView NS_DESIGNATED_INITIALIZER; diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m index e960ec0610..721acc5174 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m @@ -19,7 +19,7 @@ // Returns a constrained size to let the cells layout itself as far as possible based on the scrollable direction // of the collection view -static ASSizeRange ASDefaultConstrainedSizeForNodeForCollectionView(ASCollectionView *collectionView) { +static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView *collectionView) { CGSize maxSize = collectionView.bounds.size; if (ASScrollDirectionContainsHorizontalDirection(collectionView.scrollableDirections)) { maxSize.width = FLT_MAX; @@ -29,9 +29,9 @@ static ASSizeRange ASDefaultConstrainedSizeForNodeForCollectionView(ASCollection return ASSizeRangeMake(CGSizeZero, maxSize); } -#pragma mark - ASCollectionViewDefaultCustomLayoutInspector +#pragma mark - ASCollectionViewLayoutInspector -@implementation ASCollectionViewDefaultCustomLayoutInspector { +@implementation ASCollectionViewLayoutInspector { struct { unsigned int implementsConstrainedSizeForNodeAtIndexPath:1; } _dataSourceFlags; @@ -65,7 +65,7 @@ static ASSizeRange ASDefaultConstrainedSizeForNodeForCollectionView(ASCollection return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath]; } - return ASDefaultConstrainedSizeForNodeForCollectionView(collectionView); + return NodeConstrainedSizeWithCollectionView(collectionView); } - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath @@ -152,11 +152,11 @@ static ASSizeRange ASDefaultConstrainedSizeForNodeForCollectionView(ASCollection } CGSize itemSize = _layout.itemSize; - if (!CGSizeEqualToSize(itemSize, kDefaultItemSize)) { + if (CGSizeEqualToSize(itemSize, kDefaultItemSize) == NO) { return ASSizeRangeMake(itemSize, itemSize); } - return ASDefaultConstrainedSizeForNodeForCollectionView(collectionView); + return NodeConstrainedSizeWithCollectionView(collectionView); } - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index 6de68d4d79..d67c6561c1 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -129,7 +129,7 @@ UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init]; ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; XCTAssert(collectionView.layoutInspector != nil, @"should automatically set a layout delegate for flow layouts"); - XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewDefaultCustomLayoutInspector class]], @"should have a flow layout inspector by default"); + XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewLayoutInspector class]], @"should have a default layout inspector by default"); } - (void)testThatRegisteringASupplementaryNodeStoresItForIntrospection From d82a2e810fb5e47b34c72b1beba0db88be573422 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 27 Jun 2016 11:52:48 -0700 Subject: [PATCH 143/247] Move methods regarding supplementary nodes to optional in ASCollectionViewLayoutInspecting --- AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h index 1fc5d46935..7a9f26e680 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h @@ -26,6 +26,8 @@ NS_ASSUME_NONNULL_BEGIN */ - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath; +@optional + /** * Asks the inspector to provide a constrained size range for the given supplementary node. */ @@ -41,8 +43,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSUInteger)collectionView:(ASCollectionView *)collectionView supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section; -@optional - /** * Allow the inspector to respond to delegate changes. * From 8b3ec83bfd40589ca8fd2d35bb54e3301c2f5f99 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 8 Jul 2016 11:47:46 -0700 Subject: [PATCH 144/247] Small name changes --- .../Details/ASCollectionViewFlowLayoutInspector.m | 6 +++--- AsyncDisplayKitTests/ASCollectionViewTests.m | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m index 721acc5174..480dbb1514 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m @@ -19,7 +19,7 @@ // Returns a constrained size to let the cells layout itself as far as possible based on the scrollable direction // of the collection view -static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView *collectionView) { +static inline ASSizeRange NodeConstrainedSizeForScrollDirection(ASCollectionView *collectionView) { CGSize maxSize = collectionView.bounds.size; if (ASScrollDirectionContainsHorizontalDirection(collectionView.scrollableDirections)) { maxSize.width = FLT_MAX; @@ -65,7 +65,7 @@ static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView return [collectionView.asyncDataSource collectionView:collectionView constrainedSizeForNodeAtIndexPath:indexPath]; } - return NodeConstrainedSizeWithCollectionView(collectionView); + return NodeConstrainedSizeForScrollDirection(collectionView); } - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath @@ -156,7 +156,7 @@ static inline ASSizeRange NodeConstrainedSizeWithCollectionView(ASCollectionView return ASSizeRangeMake(itemSize, itemSize); } - return NodeConstrainedSizeWithCollectionView(collectionView); + return NodeConstrainedSizeForScrollDirection(collectionView); } - (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index d67c6561c1..f1fbed1aa0 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -124,7 +124,7 @@ XCTAssert([collectionView.layoutInspector isKindOfClass:[ASCollectionViewFlowLayoutInspector class]], @"should have a flow layout inspector by default"); } -- (void)testThatISetALayoutInspectorForCustomLayouts +- (void)testThatADefaultLayoutInspectorIsProvidedForCustomLayouts { UICollectionViewLayout *layout = [[UICollectionViewLayout alloc] init]; ASCollectionView *collectionView = [[ASCollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; From ce98e563524e3bd32d4544b41ef78f7cf357fa89 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sun, 10 Jul 2016 20:59:27 -0700 Subject: [PATCH 145/247] Use getter of layout inspector to create it lazily and not have to create it at initialization time --- AsyncDisplayKit/ASCollectionView.mm | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index b42ac741e0..7d57011c74 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -253,9 +253,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; _layoutFacilitator = layoutFacilitator; - // Trigger creating the layout inspector - [self layoutInspector]; - _proxyDelegate = [[ASCollectionViewProxy alloc] initWithTarget:nil interceptor:self]; super.delegate = (id)_proxyDelegate; @@ -371,7 +368,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; super.dataSource = (id)_proxyDataSource; if (_layoutInspectorFlags.layoutInspectorDidChangeCollectionViewDataSource) { - [_layoutInspector didChangeCollectionViewDataSource:asyncDataSource]; + [self.layoutInspector didChangeCollectionViewDataSource:asyncDataSource]; } } @@ -406,7 +403,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; super.delegate = (id)_proxyDelegate; if (_layoutInspectorFlags.layoutInspectorDidChangeCollectionViewDelegate) { - [_layoutInspector didChangeCollectionViewDelegate:asyncDelegate]; + [self.layoutInspector didChangeCollectionViewDelegate:asyncDelegate]; } } @@ -977,7 +974,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (ASSizeRange)dataController:(ASDataController *)dataController constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath { - return [_layoutInspector collectionView:self constrainedSizeForNodeAtIndexPath:indexPath]; + return [self.layoutInspector collectionView:self constrainedSizeForNodeAtIndexPath:indexPath]; } - (NSUInteger)dataController:(ASDataController *)dataController rowsInSection:(NSUInteger)section @@ -1017,17 +1014,17 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (ASSizeRange)dataController:(ASCollectionDataController *)dataController constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { - return [_layoutInspector collectionView:self constrainedSizeForSupplementaryNodeOfKind:kind atIndexPath:indexPath]; + return [self.layoutInspector collectionView:self constrainedSizeForSupplementaryNodeOfKind:kind atIndexPath:indexPath]; } - (NSUInteger)dataController:(ASCollectionDataController *)dataController supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section { - return [_layoutInspector collectionView:self supplementaryNodesOfKind:kind inSection:section]; + return [self.layoutInspector collectionView:self supplementaryNodesOfKind:kind inSection:section]; } - (NSUInteger)dataController:(ASCollectionDataController *)dataController numberOfSectionsForSupplementaryNodeOfKind:(NSString *)kind; { - return [_layoutInspector collectionView:self numberOfSectionsForSupplementaryNodeOfKind:kind]; + return [self.layoutInspector collectionView:self numberOfSectionsForSupplementaryNodeOfKind:kind]; } #pragma mark - ASRangeControllerDataSource From 3591f7a7c147002f930ae6b3b27990d64f7d93fb Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 14 Jul 2016 10:56:52 -0700 Subject: [PATCH 146/247] [ASViewController] Allow VC to conform to range updating protocol, log message if impossible to update --- AsyncDisplayKit/ASViewController.h | 7 ++++++- AsyncDisplayKit/ASViewController.mm | 25 ++++++++++++++++++++----- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.h b/AsyncDisplayKit/ASViewController.h index 170de10c8f..a16932ccf1 100644 --- a/AsyncDisplayKit/ASViewController.h +++ b/AsyncDisplayKit/ASViewController.h @@ -64,7 +64,12 @@ typedef ASTraitCollection * _Nonnull (^ASDisplayTraitsForTraitWindowSizeBlock)(C @interface ASViewController (ASRangeControllerUpdateRangeProtocol) -/// Automatically adjust range mode based on view events if the containing node confirms to the ASRangeControllerUpdateRangeProtocol +/** + * Automatically adjust range mode based on view events. If you set this to YES, the view controller or its node + * must conform to the ASRangeControllerUpdateRangeProtocol. + * + * Default value is NO. + */ @property (nonatomic, assign) BOOL automaticallyAdjustRangeModeBasedOnViewEvents; @end diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index bfdaefbe7c..82d8951175 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -27,6 +27,9 @@ BOOL _automaticallyAdjustRangeModeBasedOnViewEvents; BOOL _parentManagesVisibilityDepth; NSInteger _visibilityDepth; + BOOL _selfConformsToRangeModeProtocol; + BOOL _nodeConformsToRangeModeProtocol; + BOOL _didCheckRangeModeProtocolConformance; } - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil @@ -172,17 +175,29 @@ ASVisibilityDepthImplementation; - (void)setAutomaticallyAdjustRangeModeBasedOnViewEvents:(BOOL)automaticallyAdjustRangeModeBasedOnViewEvents { _automaticallyAdjustRangeModeBasedOnViewEvents = automaticallyAdjustRangeModeBasedOnViewEvents; + if (automaticallyAdjustRangeModeBasedOnViewEvents && !_didCheckRangeModeProtocolConformance) { + _selfConformsToRangeModeProtocol = [self conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]; + _nodeConformsToRangeModeProtocol = [_node conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]; + _didCheckRangeModeProtocolConformance = YES; + if (!_selfConformsToRangeModeProtocol && !_nodeConformsToRangeModeProtocol) { + NSLog(@"Warning: automaticallyAdjustRangeModeBasedOnViewEvents set to YES in %@, but range mode updating is not possible because neither view controller nor node %@ conform to ASRangeControllerUpdateRangeProtocol.", self, _node); + } + } } - (void)updateCurrentRangeModeWithModeIfPossible:(ASLayoutRangeMode)rangeMode { if (!_automaticallyAdjustRangeModeBasedOnViewEvents) { return; } - if (![_node conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]) { - return; + + if (_selfConformsToRangeModeProtocol) { + id rangeUpdater = (id)self; + [rangeUpdater updateCurrentRangeWithMode:rangeMode]; + } + + if (_nodeConformsToRangeModeProtocol) { + id rangeUpdater = (id)_node; + [rangeUpdater updateCurrentRangeWithMode:rangeMode]; } - - id updateRangeNode = (id)_node; - [updateRangeNode updateCurrentRangeWithMode:rangeMode]; } #pragma mark - Layout Helpers From 65e194c7c64ab4d6a228e33f7c271b486cc53011 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 14 Jul 2016 11:06:22 -0700 Subject: [PATCH 147/247] [Tests] Add failing tests for weird conformance issue --- AsyncDisplayKitTests/ASCollectionViewTests.m | 11 +++++++++++ AsyncDisplayKitTests/ASTableViewTests.m | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.m index e4c7c8819a..dc51607a70 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.m @@ -13,6 +13,7 @@ #import "ASCollectionDataController.h" #import "ASCollectionViewFlowLayoutInspector.h" #import "ASCellNode.h" +#import "ASCollectionNode.h" @interface ASTextCellNodeWithSetSelectedCounter : ASTextCellNode @@ -240,4 +241,14 @@ XCTAssertTrue(ASRangeTuningParametersEqualToRangeTuningParameters(preloadParams, [collectionView tuningParametersForRangeType:ASLayoutRangeTypeFetchData])); } +/** + * This may seem silly, but we had issues where the runtime sometimes wouldn't correctly report + * conformances declared on categories. + */ +- (void)testThatCollectionNodeConformsToExpectedProtocols +{ + ASCollectionNode *node = [[ASCollectionNode alloc] initWithFrame:CGRectZero collectionViewLayout:[[UICollectionViewFlowLayout alloc] init]]; + XCTAssert([node conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]); +} + @end diff --git a/AsyncDisplayKitTests/ASTableViewTests.m b/AsyncDisplayKitTests/ASTableViewTests.m index 42b7a870d2..af85fb78c1 100644 --- a/AsyncDisplayKitTests/ASTableViewTests.m +++ b/AsyncDisplayKitTests/ASTableViewTests.m @@ -15,6 +15,7 @@ #import "ASDisplayNode+Subclasses.h" #import "ASChangeSetDataController.h" #import "ASCellNode.h" +#import "ASTableNode.h" #define NumberOfSections 10 #define NumberOfRowsPerSection 20 @@ -518,4 +519,14 @@ }]; } +/** + * This may seem silly, but we had issues where the runtime sometimes wouldn't correctly report + * conformances declared on categories. + */ +- (void)testThatTableNodeConformsToExpectedProtocols +{ + ASTableNode *node = [[ASTableNode alloc] initWithStyle:UITableViewStylePlain]; + XCTAssert([node conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]); +} + @end From bd0254f30648d98cb0322fdd88f487e577be3f5b Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 14 Jul 2016 11:26:18 -0700 Subject: [PATCH 148/247] [ASRangeControllerUpdateRangeProtocol] BREAKING Remove +setRangeModeForMemoryWarnings:, replace with global method --- AsyncDisplayKit/ASDisplayNode+Beta.h | 10 ++++++++++ AsyncDisplayKit/Details/ASRangeController.mm | 9 +++++++++ .../ASRangeControllerUpdateRangeProtocol+Beta.h | 17 ----------------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode+Beta.h b/AsyncDisplayKit/ASDisplayNode+Beta.h index 428f95f34c..eb76bb470c 100644 --- a/AsyncDisplayKit/ASDisplayNode+Beta.h +++ b/AsyncDisplayKit/ASDisplayNode+Beta.h @@ -9,6 +9,7 @@ // #import "ASContextTransitioning.h" +#import "ASLayoutRangeType.h" NS_ASSUME_NONNULL_BEGIN @@ -116,6 +117,15 @@ ASDISPLAYNODE_EXTERN_C_END */ - (void)hierarchyDisplayDidFinish; +/** + * Only ASLayoutRangeModeVisibleOnly or ASLayoutRangeModeLowMemory are recommended. Default is ASLayoutRangeModeVisibleOnly, + * because this is the only way to ensure an application will not have blank / flashing views as the user navigates back after + * a memory warning. Apps that wish to use the more effective / aggressive ASLayoutRangeModeLowMemory may need to take steps + * to mitigate this behavior, including: restoring a larger range mode to the next controller before the user navigates there, + * enabling .neverShowPlaceholders on ASCellNodes so that the navigation operation is blocked on redisplay completing, etc. + */ ++ (void)setRangeModeForMemoryWarnings:(ASLayoutRangeMode)rangeMode; + @end NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index dc051decc8..e002364441 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -599,3 +599,12 @@ static ASLayoutRangeMode __rangeModeForMemoryWarnings = ASLayoutRangeModeVisible } @end + +@implementation ASDisplayNode (RangeModeConfiguring) + ++ (void)setRangeModeForMemoryWarnings:(ASLayoutRangeMode)rangeMode +{ + [ASRangeController setRangeModeForMemoryWarnings:rangeMode]; +} + +@end diff --git a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h index 86230f84f8..13f03b3e12 100644 --- a/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h +++ b/AsyncDisplayKit/Details/ASRangeControllerUpdateRangeProtocol+Beta.h @@ -18,21 +18,4 @@ */ - (void)updateCurrentRangeWithMode:(ASLayoutRangeMode)rangeMode; -/** - * Only ASLayoutRangeModeVisibleOnly or ASLayoutRangeModeLowMemory are recommended. Default is ASLayoutRangeModeVisibleOnly, - * because this is the only way to ensure an application will not have blank / flashing views as the user navigates back after - * a memory warning. Apps that wish to use the more effective / aggressive ASLayoutRangeModeLowMemory may need to take steps - * to mitigate this behavior, including: restoring a larger range mode to the next controller before the user navigates there, - * enabling .neverShowPlaceholders on ASCellNodes so that the navigation operation is blocked on redisplay completing, etc. - */ -+ (void)setRangeModeForMemoryWarnings:(ASLayoutRangeMode)rangeMode; - @end - - - - - - - - From b0a2ba0f6db6efa1eaaee9b9ddc648dce4dcb379 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 14 Jul 2016 11:27:32 -0700 Subject: [PATCH 149/247] [ASTableNode/ASCollectionNode] Make them conform directly to range updating protocol --- AsyncDisplayKit/ASCollectionNode.h | 6 +----- AsyncDisplayKit/ASTableNode.h | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionNode.h b/AsyncDisplayKit/ASCollectionNode.h index 9c304695e9..d3ec3df0c4 100644 --- a/AsyncDisplayKit/ASCollectionNode.h +++ b/AsyncDisplayKit/ASCollectionNode.h @@ -27,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN * ASCollectionNode is a node based class that wraps an ASCollectionView. It can be used * as a subnode of another node, and provide room for many (great) features and improvements later on. */ -@interface ASCollectionNode : ASDisplayNode +@interface ASCollectionNode : ASDisplayNode - (instancetype)initWithCollectionViewLayout:(UICollectionViewLayout *)layout; - (instancetype)initWithFrame:(CGRect)frame collectionViewLayout:(UICollectionViewLayout *)layout; @@ -111,8 +111,4 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface ASCollectionNode (ASRangeControllerUpdateRangeProtocol) - -@end - NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/ASTableNode.h b/AsyncDisplayKit/ASTableNode.h index e9508cfaf2..eb446a6cf3 100644 --- a/AsyncDisplayKit/ASTableNode.h +++ b/AsyncDisplayKit/ASTableNode.h @@ -22,7 +22,7 @@ * ASTableNode is a node based class that wraps an ASTableView. It can be used * as a subnode of another node, and provide room for many (great) features and improvements later on. */ -@interface ASTableNode : ASDisplayNode +@interface ASTableNode : ASDisplayNode - (instancetype)init; // UITableViewStylePlain - (instancetype)initWithStyle:(UITableViewStyle)style; @@ -34,7 +34,3 @@ @property (weak, nonatomic) id dataSource; @end - -@interface ASTableNode (ASRangeControllerUpdateRangeProtocol) - -@end From 787fd8b90b09761d56ec4016390569044644a103 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 14 Jul 2016 11:32:50 -0700 Subject: [PATCH 150/247] [ASViewController] Defer range update conformance check until the actual range update --- AsyncDisplayKit/ASViewController.mm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index 82d8951175..3eee5ee731 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -175,7 +175,13 @@ ASVisibilityDepthImplementation; - (void)setAutomaticallyAdjustRangeModeBasedOnViewEvents:(BOOL)automaticallyAdjustRangeModeBasedOnViewEvents { _automaticallyAdjustRangeModeBasedOnViewEvents = automaticallyAdjustRangeModeBasedOnViewEvents; - if (automaticallyAdjustRangeModeBasedOnViewEvents && !_didCheckRangeModeProtocolConformance) { +} + +- (void)updateCurrentRangeModeWithModeIfPossible:(ASLayoutRangeMode)rangeMode +{ + if (!_automaticallyAdjustRangeModeBasedOnViewEvents) { return; } + + if (!_didCheckRangeModeProtocolConformance) { _selfConformsToRangeModeProtocol = [self conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]; _nodeConformsToRangeModeProtocol = [_node conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]; _didCheckRangeModeProtocolConformance = YES; @@ -183,11 +189,6 @@ ASVisibilityDepthImplementation; NSLog(@"Warning: automaticallyAdjustRangeModeBasedOnViewEvents set to YES in %@, but range mode updating is not possible because neither view controller nor node %@ conform to ASRangeControllerUpdateRangeProtocol.", self, _node); } } -} - -- (void)updateCurrentRangeModeWithModeIfPossible:(ASLayoutRangeMode)rangeMode -{ - if (!_automaticallyAdjustRangeModeBasedOnViewEvents) { return; } if (_selfConformsToRangeModeProtocol) { id rangeUpdater = (id)self; From 6e8772a68d91ba41ed4c6be566cc1b394b92898d Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 14 Jul 2016 06:14:25 -0700 Subject: [PATCH 151/247] Fix sizing of root node in ASViewController for modal presentation and root view controller --- AsyncDisplayKit/ASViewController.mm | 43 ++++++++++++++++++----------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index bfdaefbe7c..d18621942c 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -88,19 +88,7 @@ [super viewWillLayoutSubviews]; [_node measureWithSizeRange:[self nodeConstrainedSize]]; - if (!AS_AT_LEAST_IOS9) { - [self _legacyHandleViewDidLayoutSubviews]; - } -} - -- (void)_legacyHandleViewDidLayoutSubviews -{ - // In modal presentation the view does not automatic resize in iOS7 and iOS8. As workaround we adjust the frame of the - // view manually - if (self.presentingViewController != nil) { - CGSize maxConstrainedSize = [self nodeConstrainedSize].max; - _node.frame = (CGRect){.origin = CGPointZero, .size = maxConstrainedSize}; - } + [self _legacyHandleViewDidLayoutSubviewsIfNecessary]; } - (void)viewDidLayoutSubviews @@ -197,13 +185,27 @@ ASVisibilityDepthImplementation; } } +- (ASInterfaceState)interfaceState +{ + return _node.interfaceState; +} + +#pragma mark - Legacy Layout Handling + +- (BOOL)_shouldLayoutTheLegacyWay +{ + BOOL isModal = (self.presentingViewController != nil && self.presentedViewController == nil); + BOOL isRootViewController = self.view.window.rootViewController == self; + return isModal || isRootViewController; +} + - (ASSizeRange)_legacyConstrainedSize { // In modal presentation the view does not have the right bounds in iOS7 and iOS8. As workaround using the superviews // view bounds UIView *view = self.view; CGSize viewSize = view.bounds.size; - if (self.presentingViewController != nil) { + if ([self _shouldLayoutTheLegacyWay]) { UIView *superview = view.superview; if (superview != nil) { viewSize = superview.bounds.size; @@ -212,9 +214,18 @@ ASVisibilityDepthImplementation; return ASSizeRangeMake(viewSize, viewSize); } -- (ASInterfaceState)interfaceState +- (void)_legacyHandleViewDidLayoutSubviewsIfNecessary { - return _node.interfaceState; + if (AS_AT_LEAST_IOS9) { + return; + } + + // In modal presentation or as root viw controller the view does not automatic resize in iOS7 and iOS8. + // As workaround we adjust the frame of the view manually + if ([self _shouldLayoutTheLegacyWay]) { + CGSize maxConstrainedSize = [self nodeConstrainedSize].max; + _node.frame = (CGRect){.origin = CGPointZero, .size = maxConstrainedSize}; + } } #pragma mark - ASEnvironmentTraitCollection From cd46791f9d2d3bc90ccdbc6da6b4bf3ae808fe57 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 14 Jul 2016 14:50:54 -0700 Subject: [PATCH 152/247] Move check for iOS 9 from an early return to an earlier check to prevent objc_msgSend --- AsyncDisplayKit/ASViewController.mm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index d18621942c..cef7753c83 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -88,7 +88,9 @@ [super viewWillLayoutSubviews]; [_node measureWithSizeRange:[self nodeConstrainedSize]]; - [self _legacyHandleViewDidLayoutSubviewsIfNecessary]; + if (!AS_AT_LEAST_IOS9) { + [self _legacyHandleViewDidLayoutSubviews]; + } } - (void)viewDidLayoutSubviews @@ -214,12 +216,8 @@ ASVisibilityDepthImplementation; return ASSizeRangeMake(viewSize, viewSize); } -- (void)_legacyHandleViewDidLayoutSubviewsIfNecessary +- (void)_legacyHandleViewDidLayoutSubviews { - if (AS_AT_LEAST_IOS9) { - return; - } - // In modal presentation or as root viw controller the view does not automatic resize in iOS7 and iOS8. // As workaround we adjust the frame of the view manually if ([self _shouldLayoutTheLegacyWay]) { From 92e16fb7a615ed69caf1975b8a6dff47d282d1cf Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Thu, 14 Jul 2016 14:25:44 -0700 Subject: [PATCH 153/247] Share ASDK's PINRemoteImage cache with default instance of PINRemoteImage --- .../Details/ASPINRemoteImageDownloader.m | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m index 99fad4ecc4..a62424ca4d 100644 --- a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m +++ b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m @@ -30,6 +30,19 @@ #import #if PIN_ANIMATED_AVAILABLE +@interface ASPINRemoteImageManager : PINRemoteImageManager +@end + +@implementation ASPINRemoteImageManager + +//Share image cache with sharedImageManager image cache. +- (PINCache *)defaultImageCache +{ + return [[PINRemoteImageManager sharedImageManager] cache]; +} + +@end + @interface ASPINRemoteImageDownloader () @end @@ -82,7 +95,7 @@ - (PINRemoteImageManager *)sharedPINRemoteImageManager { - static PINRemoteImageManager *sharedPINRemoteImageManager = nil; + static ASPINRemoteImageManager *sharedPINRemoteImageManager = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -102,9 +115,9 @@ userInfo:nil]; @throw e; } - sharedPINRemoteImageManager = [[PINRemoteImageManager alloc] initWithSessionConfiguration:nil alternativeRepresentationProvider:self]; + sharedPINRemoteImageManager = [[ASPINRemoteImageManager alloc] initWithSessionConfiguration:nil alternativeRepresentationProvider:self]; #else - sharedPINRemoteImageManager = [[PINRemoteImageManager alloc] initWithSessionConfiguration:nil]; + sharedPINRemoteImageManager = [[ASPINRemoteImageManager alloc] initWithSessionConfiguration:nil]; #endif }); return sharedPINRemoteImageManager; From aaea4a4d85c9fa1577e176c321abf1a008aecb62 Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Thu, 14 Jul 2016 14:35:22 -0700 Subject: [PATCH 154/247] Class was in wrong #ifdef, thank you @schneider! --- .../Details/ASPINRemoteImageDownloader.m | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m index a62424ca4d..0fdfb22655 100644 --- a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m +++ b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m @@ -30,18 +30,6 @@ #import #if PIN_ANIMATED_AVAILABLE -@interface ASPINRemoteImageManager : PINRemoteImageManager -@end - -@implementation ASPINRemoteImageManager - -//Share image cache with sharedImageManager image cache. -- (PINCache *)defaultImageCache -{ - return [[PINRemoteImageManager sharedImageManager] cache]; -} - -@end @interface ASPINRemoteImageDownloader () @@ -81,6 +69,19 @@ @end #endif +@interface ASPINRemoteImageManager : PINRemoteImageManager +@end + +@implementation ASPINRemoteImageManager + +//Share image cache with sharedImageManager image cache. +- (PINCache *)defaultImageCache +{ + return [[PINRemoteImageManager sharedImageManager] cache]; +} + +@end + @implementation ASPINRemoteImageDownloader + (instancetype)sharedDownloader From fe63b7b65f1318bad667e2a5bb2198ffab48a923 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 14 Jul 2016 15:10:49 -0700 Subject: [PATCH 155/247] Use fast enumeration in a couple places --- AsyncDisplayKit/ASDisplayNodeExtras.mm | 5 +++-- AsyncDisplayKit/Private/ASLayoutTransition.mm | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNodeExtras.mm b/AsyncDisplayKit/ASDisplayNodeExtras.mm index d9601ba9d6..19f199bd5b 100644 --- a/AsyncDisplayKit/ASDisplayNodeExtras.mm +++ b/AsyncDisplayKit/ASDisplayNodeExtras.mm @@ -80,8 +80,9 @@ extern void ASDisplayNodePerformBlockOnEveryNodeBFS(ASDisplayNode *node, void(^b block(node); // Add all subnodes to process in next step - for (int i = 0; i < node.subnodes.count; i++) - queue.push(node.subnodes[i]); + for (ASDisplayNode *subnode in node.subnodes) { + queue.push(subnode); + } } } diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index e719f9a60e..f054eea660 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -38,8 +38,8 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { } // Add all sublayouts to process in next step - for (int i = 0; i < layout.sublayouts.count; i++) { - queue.push(layout.sublayouts[0]); + for (ASLayout *sublayout in layout.sublayouts) { + queue.push(sublayout); } } From bbc957bce5801f32f794adcbae9866e2cfb06f0d Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 14 Jul 2016 14:38:57 -0700 Subject: [PATCH 156/247] Throw away all subcomponents of the text kit renderer if constraints are changing Throw away the all subcomponents to create them with the new constrained size new as well as let the truncater do it's job again for the new constrained size. This is necessary as after a truncation did happen the context would use the truncated string and not the original string to truncate based on the new constrained size --- AsyncDisplayKit/ASTextNode.mm | 7 +++++-- AsyncDisplayKit/TextKit/ASTextKitRenderer.mm | 16 ++++++++-------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 28fb35764a..a8c91761b8 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -326,8 +326,10 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; if (layout != nil) { ASDN::MutexLocker l(_propertyLock); - _constrainedSize = layout.size; - _renderer.constrainedSize = layout.size; + if (CGSizeEqualToSize(_constrainedSize, layout.size) == NO) { + _constrainedSize = layout.size; + _renderer.constrainedSize = layout.size; + } } } @@ -397,6 +399,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // Tell the display node superclasses that the cached layout is incorrect now [self invalidateCalculatedLayout]; + // Force display to create renderer with new size and redisplay with new string [self setNeedsDisplay]; diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm index 4cbb3552d7..020f825781 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm @@ -123,14 +123,14 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet() if (!CGSizeEqualToSize(constrainedSize, _constrainedSize)) { _sizeIsCalculated = NO; _constrainedSize = constrainedSize; - // If the context isn't created yet, it will be initialized with the appropriate size when next accessed. - if (_context || _fontSizeAdjuster) { - // If we're updating an existing context, make sure to use the same inset logic used during initialization. - // This codepath allows us to reuse the - CGSize shadowConstrainedSize = [[self shadower] insetSizeWithConstrainedSize:constrainedSize]; - if (_context) _context.constrainedSize = shadowConstrainedSize; - if (_fontSizeAdjuster) _fontSizeAdjuster.constrainedSize = shadowConstrainedSize; - } + + // Throw away the all subcomponents to create them with the new constrained size new as well as let the + // truncater do it's job again for the new constrained size. This is necessary as after a truncation did happen + // the context would use the truncated string and not the original string to truncate based on the new + // constrained size + _context = nil; + _truncater = nil; + _fontSizeAdjuster = nil; } } From cac0cce0b04821f99149060d339c669d3d4799f4 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 14 Jul 2016 16:11:28 -0700 Subject: [PATCH 157/247] [ASLayoutTransition] Make findNodesInLayoutAtIndexesWithFilteredNodes faster --- AsyncDisplayKit/Private/ASLayoutTransition.mm | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index f054eea660..921008dc07 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -199,21 +199,27 @@ static inline void findNodesInLayoutAtIndexesWithFilteredNodes(ASLayout *layout, NSArray * __strong *storedNodes, std::vector *storedPositions) { - NSMutableArray *nodes = [NSMutableArray array]; + NSMutableArray *nodes = [NSMutableArray arrayWithCapacity:indexes.count]; std::vector positions = std::vector(); - NSUInteger idx = [indexes firstIndex]; - while (idx != NSNotFound) { - ASDisplayNode *node = (ASDisplayNode *)layout.sublayouts[idx].layoutableObject; - ASDisplayNodeCAssert(node, @"A flattened layout must consist exclusively of node sublayouts"); - // Ignore the odd case in which a non-node sublayout is accessed and the type cast fails - if (node != nil) { - BOOL notFiltered = (filteredNodes == nil || [filteredNodes indexOfObjectIdenticalTo:node] == NSNotFound); - if (notFiltered) { - [nodes addObject:node]; - positions.push_back(idx); + // From inspection, this is how enumerateObjectsAtIndexes: works under the hood + NSUInteger firstIndex = indexes.firstIndex; + NSUInteger lastIndex = indexes.lastIndex; + NSUInteger idx = 0; + for (ASLayout *sublayout in layout.sublayouts) { + if (idx > lastIndex) { break; } + if (idx >= firstIndex && [indexes containsIndex:idx]) { + ASDisplayNode *node = (ASDisplayNode *)sublayout.layoutableObject; + ASDisplayNodeCAssert(node, @"A flattened layout must consist exclusively of node sublayouts"); + // Ignore the odd case in which a non-node sublayout is accessed and the type cast fails + if (node != nil) { + BOOL notFiltered = (filteredNodes == nil || [filteredNodes indexOfObjectIdenticalTo:node] == NSNotFound); + if (notFiltered) { + [nodes addObject:node]; + positions.push_back(idx); + } } } - idx = [indexes indexGreaterThanIndex:idx]; + idx += 1; } *storedNodes = nodes; *storedPositions = positions; From 705cc763fdecb7b6d0b691fdc82e340c6f44a641 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 14 Jul 2016 19:30:44 -0700 Subject: [PATCH 158/247] Fix failing ASTextNode tests --- AsyncDisplayKitTests/ASTextNodeTests.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKitTests/ASTextNodeTests.m b/AsyncDisplayKitTests/ASTextNodeTests.m index 6990b786d5..e928a22523 100644 --- a/AsyncDisplayKitTests/ASTextNodeTests.m +++ b/AsyncDisplayKitTests/ASTextNodeTests.m @@ -125,7 +125,7 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) for (NSInteger i = 10; i < 500; i += 50) { CGSize constrainedSize = CGSizeMake(i, i); CGSize calculatedSize = [_textNode measure:constrainedSize]; - CGSize recalculatedSize = [_textNode measure:calculatedSize]; + CGSize recalculatedSize = [_textNode measure:constrainedSize]; XCTAssertTrue(CGSizeEqualToSizeWithIn(calculatedSize, recalculatedSize, 4.0), @"Recalculated size %@ should be same as original size %@", NSStringFromCGSize(recalculatedSize), NSStringFromCGSize(calculatedSize)); } @@ -136,7 +136,7 @@ static BOOL CGSizeEqualToSizeWithIn(CGSize size1, CGSize size2, CGFloat delta) for (CGFloat i = 10; i < 500; i *= 1.3) { CGSize constrainedSize = CGSizeMake(i, i); CGSize calculatedSize = [_textNode measure:constrainedSize]; - CGSize recalculatedSize = [_textNode measure:calculatedSize]; + CGSize recalculatedSize = [_textNode measure:constrainedSize]; XCTAssertTrue(CGSizeEqualToSizeWithIn(calculatedSize, recalculatedSize, 11.0), @"Recalculated size %@ should be same as original size %@", NSStringFromCGSize(recalculatedSize), NSStringFromCGSize(calculatedSize)); } From a8c5ac138d8a167da879df37a02e65b8c6ddab80 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 14 Jul 2016 21:35:58 -0700 Subject: [PATCH 159/247] [ASDisplayNode] Always layout nodes on a background thread (#1907) * Always layout nodes on a background thread * Remove semaphore in ASDataController for allocating nodes and layout * Fix variable not used error * Remove overhead to create subarray of contexts of nodes while layout nodes * Remove extra allocation of allocatedNodes and indexPaths array --- AsyncDisplayKit/ASDisplayNode.mm | 2 +- AsyncDisplayKit/Details/ASDataController.mm | 102 ++++++-------------- 2 files changed, 32 insertions(+), 72 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 58b24a5b76..81c02b9dfc 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -791,7 +791,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) }; // TODO ihm: Can we always push the measure to the background thread and remove the parameter from the API? - if (shouldMeasureAsync) { + if (ASDisplayNodeThreadIsMain()) { ASPerformBlockOnBackgroundThread(transitionBlock); } else { transitionBlock(); diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index fba864966e..36bcc2b489 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -165,16 +165,12 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; return; } - // For any given layout pass that occurs, this method will be called at least twice, once on the main thread and - // the background, to result in complete coverage of both loaded and unloaded nodes - BOOL isMainThread = ASDisplayNodeThreadIsMain(); + // Layout node on whatever thread we are on. We handle the trampoline to the main thread in case the node is + // already loaded for (NSUInteger k = range.location; k < NSMaxRange(range); k++) { ASCellNode *node = nodes[k]; - // Only nodes that are loaded should be layout on the main thread - if (node.isNodeLoaded == isMainThread) { - ASIndexedNodeContext *context = contexts[k]; - [self _layoutNode:node withConstrainedSize:context.constrainedSize]; - } + ASIndexedNodeContext *context = contexts[k]; + [self _layoutNode:node withConstrainedSize:context.constrainedSize]; } } @@ -187,78 +183,42 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; } NSUInteger nodeCount = contexts.count; - NSMutableArray *allocatedNodes = [NSMutableArray arrayWithCapacity:nodeCount]; - dispatch_group_t layoutGroup = dispatch_group_create(); + __strong NSIndexPath **allocatedContextIndexPaths = (__strong NSIndexPath **)calloc(nodeCount, sizeof(NSIndexPath *)); + __strong ASCellNode **allocatedNodeBuffer = (__strong ASCellNode **)calloc(nodeCount, sizeof(ASCellNode *)); for (NSUInteger j = 0; j < nodeCount; j += kASDataControllerSizingCountPerProcessor) { NSInteger batchCount = MIN(kASDataControllerSizingCountPerProcessor, nodeCount - j); - - // Allocate nodes concurrently. - __block NSArray *subarrayOfContexts; - __block NSArray *subarrayOfNodes; - dispatch_block_t allocationBlock = ^{ - __strong ASIndexedNodeContext **allocatedContextBuffer = (__strong ASIndexedNodeContext **)calloc(batchCount, sizeof(ASIndexedNodeContext *)); - __strong ASCellNode **allocatedNodeBuffer = (__strong ASCellNode **)calloc(batchCount, sizeof(ASCellNode *)); - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_apply(batchCount, queue, ^(size_t i) { - unsigned long k = j + i; - ASIndexedNodeContext *context = contexts[k]; - ASCellNode *node = [context allocateNode]; - if (node == nil) { - ASDisplayNodeAssertNotNil(node, @"Node block created nil node; %@, %@", self, self.dataSource); - node = [[ASCellNode alloc] init]; // Fallback to avoid crash for production apps. - } - allocatedNodeBuffer[i] = node; - allocatedContextBuffer[i] = context; - }); - subarrayOfNodes = [NSArray arrayWithObjects:allocatedNodeBuffer count:batchCount]; - subarrayOfContexts = [NSArray arrayWithObjects:allocatedContextBuffer count:batchCount]; - // Nil out buffer indexes to allow arc to free the stored cells. - for (int i = 0; i < batchCount; i++) { - allocatedContextBuffer[i] = nil; - allocatedNodeBuffer[i] = nil; + + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + dispatch_apply(batchCount, queue, ^(size_t i) { + unsigned long k = j + i; + ASIndexedNodeContext *context = contexts[k]; + ASCellNode *node = [context allocateNode]; + if (node == nil) { + ASDisplayNodeAssertNotNil(node, @"Node block created nil node; %@, %@", self, self.dataSource); + node = [[ASCellNode alloc] init]; // Fallback to avoid crash for production apps. } - free(allocatedContextBuffer); - free(allocatedNodeBuffer); - }; - - // Run the allocation block to concurrently create the cell nodes. Then, handle layout for nodes that are already loaded - // (e.g. the dataSource may have provided cells that have been used before), which must do layout on the main thread. - NSRange batchRange = NSMakeRange(0, batchCount); - if (ASDisplayNodeThreadIsMain()) { - dispatch_semaphore_t sema = dispatch_semaphore_create(0); - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - allocationBlock(); - dispatch_semaphore_signal(sema); - }); - dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER); + + allocatedContextIndexPaths[k] = context.indexPath; + allocatedNodeBuffer[k] = node; - [self _layoutNodes:subarrayOfNodes fromContexts:subarrayOfContexts atIndexesOfRange:batchRange ofKind:kind]; - } else { - allocationBlock(); - [_mainSerialQueue performBlockOnMainThread:^{ - [self _layoutNodes:subarrayOfNodes fromContexts:subarrayOfContexts atIndexesOfRange:batchRange ofKind:kind]; - }]; - } - - [allocatedNodes addObjectsFromArray:subarrayOfNodes]; - - dispatch_group_async(layoutGroup, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - // We should already have measured loaded nodes before we left the main thread. Layout the remaining ones on a background thread. - NSRange asyncBatchRange = NSMakeRange(j, batchCount); - [self _layoutNodes:allocatedNodes fromContexts:contexts atIndexesOfRange:asyncBatchRange ofKind:kind]; + [self _layoutNode:node withConstrainedSize:context.constrainedSize]; }); } - - // Block the _editingTransactionQueue from executing a new edit transaction until layout is done & _editingNodes array is updated. - dispatch_group_wait(layoutGroup, DISPATCH_TIME_FOREVER); - if (completionBlock) { - NSMutableArray *indexPaths = [NSMutableArray arrayWithCapacity:nodeCount]; - for (ASIndexedNodeContext *context in contexts) { - [indexPaths addObject:context.indexPath]; - } + // Create nodes and indexPaths array's + NSArray *allocatedNodes = [NSArray arrayWithObjects:allocatedNodeBuffer count:nodeCount]; + NSArray *indexPaths = [NSArray arrayWithObjects:allocatedContextIndexPaths count:nodeCount]; + + // Nil out buffer indexes to allow arc to free the stored cells. + for (int i = 0; i < nodeCount; i++) { + allocatedContextIndexPaths[i] = nil; + allocatedNodeBuffer[i] = nil; + } + free(allocatedContextIndexPaths); + free(allocatedNodeBuffer); + if (completionBlock) { completionBlock(allocatedNodes, indexPaths); } } From 359785ac92e50d51c00018662a0a24f6493b2a47 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 14 Jul 2016 21:51:40 -0700 Subject: [PATCH 160/247] [ASDisplayNode] Add automatic measurement before layout (#1725) * Add automatic measurement before layout * Remove code not needed or addressed in a different PR * Adjust comments and rename __layoutSublayouts to __layoutSubnodes * Check before setting up a placeholder layer if the node should have a placeholder --- AsyncDisplayKit/ASDisplayNode.h | 2 + AsyncDisplayKit/ASDisplayNode.mm | 66 ++++++++++++++++--------- examples/Videos/Sample/ViewController.h | 3 +- examples/Videos/Sample/ViewController.m | 20 ++------ 4 files changed, 51 insertions(+), 40 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.h b/AsyncDisplayKit/ASDisplayNode.h index c0361d0ce6..47e03d09a7 100644 --- a/AsyncDisplayKit/ASDisplayNode.h +++ b/AsyncDisplayKit/ASDisplayNode.h @@ -17,6 +17,8 @@ #import #import +#define ASDisplayNodeLoggingEnabled 0 + @class ASDisplayNode; /** diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 81c02b9dfc..98038f5894 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -53,8 +53,11 @@ NSString * const ASRenderingEngineDidDisplayNodesScheduledBeforeTimestamp = @"AS @end -//#define LOG(...) NSLog(__VA_ARGS__) -#define LOG(...) +#if ASDisplayNodeLoggingEnabled + #define LOG(...) NSLog(__VA_ARGS__) +#else + #define LOG(...) +#endif // Conditionally time these scopes to our debug ivars (only exist in debug/profile builds) #if TIME_DISPLAYNODE_OPS @@ -880,7 +883,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)animateLayoutTransition:(id)context { - [self __layoutSublayouts]; + [self __layoutSubnodes]; [context completeTransition:YES]; } @@ -1114,26 +1117,61 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) ASDisplayNodeAssertMainThread(); ASDN::MutexLocker l(_propertyLock); CGRect bounds = self.bounds; + + [self measureNodeWithBoundsIfNecessary:bounds]; + if (CGRectEqualToRect(bounds, CGRectZero)) { // Performing layout on a zero-bounds view often results in frame calculations // with negative sizes after applying margins, which will cause // measureWithSizeRange: on subnodes to assert. return; } - + // Handle placeholder layer creation in case the size of the node changed after the initial placeholder layer // was created if ([self _shouldHavePlaceholderLayer]) { [self _setupPlaceholderLayerIfNeeded]; } _placeholderLayer.frame = bounds; - + [self layout]; [self layoutDidFinish]; } +- (void)measureNodeWithBoundsIfNecessary:(CGRect)bounds +{ + // Normally measure will be called before layout occurs. If this doesn't happen, nothing is going to call it at all. + // We simply call measureWithSizeRange: using a size range equal to whatever bounds were provided to that element + if (self.supernode == nil && !self.supportsRangeManagedInterfaceState && [self _hasDirtyLayout]) { + if (CGRectEqualToRect(bounds, CGRectZero)) { + LOG(@"Warning: No size given for node before node was trying to layout itself: %@. Please provide a frame for the node.", self); + } else { + [self measureWithSizeRange:ASSizeRangeMake(bounds.size, bounds.size)]; + } + } +} + +- (void)layout +{ + ASDisplayNodeAssertMainThread(); + + if ([self _hasDirtyLayout]) { + return; + } + + [self __layoutSubnodes]; +} + +- (void)__layoutSubnodes +{ + for (ASLayout *subnodeLayout in _layout.sublayouts) { + ((ASDisplayNode *)subnodeLayout.layoutableObject).frame = [subnodeLayout frame]; + } +} + - (void)layoutDidFinish { + // Hook for subclasses } - (CATransform3D)_transformToAncestor:(ASDisplayNode *)ancestor @@ -2463,24 +2501,6 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) [layoutTransition startTransition]; } -- (void)layout -{ - ASDisplayNodeAssertMainThread(); - - if ([self _hasDirtyLayout]) { - return; - } - - [self __layoutSublayouts]; -} - -- (void)__layoutSublayouts -{ - for (ASLayout *subnodeLayout in _layout.sublayouts) { - ((ASDisplayNode *)subnodeLayout.layoutableObject).frame = [subnodeLayout frame]; - } -} - - (void)displayWillStart { ASDisplayNodeAssertMainThread(); diff --git a/examples/Videos/Sample/ViewController.h b/examples/Videos/Sample/ViewController.h index 7cce1c400a..2b35e7f47d 100644 --- a/examples/Videos/Sample/ViewController.h +++ b/examples/Videos/Sample/ViewController.h @@ -14,8 +14,7 @@ // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#import -#import +#import @interface ViewController : UIViewController diff --git a/examples/Videos/Sample/ViewController.m b/examples/Videos/Sample/ViewController.m index e2a6e22b88..1b390386a2 100644 --- a/examples/Videos/Sample/ViewController.m +++ b/examples/Videos/Sample/ViewController.m @@ -16,8 +16,7 @@ // #import "ViewController.h" -#import "ASLayoutSpec.h" -#import "ASStaticLayoutSpec.h" +#import @interface ViewController() @property (nonatomic, strong) ASDisplayNode *rootNode; @@ -28,12 +27,13 @@ #pragma mark - UIViewController -- (void)viewWillAppear:(BOOL)animated +- (void)viewDidLoad { - [super viewWillAppear:animated]; - + [super viewDidLoad]; + // Root node for the view controller _rootNode = [ASDisplayNode new]; + _rootNode.frame = self.view.bounds; _rootNode.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; ASVideoNode *guitarVideoNode = self.guitarVideoNode; @@ -68,16 +68,6 @@ [self.view addSubnode:_rootNode]; } -- (void)viewDidLayoutSubviews -{ - [super viewDidLayoutSubviews]; - - // After all subviews are layed out we have to measure it and move the root node to the right place - CGSize viewSize = self.view.bounds.size; - [self.rootNode measureWithSizeRange:ASSizeRangeMake(viewSize, viewSize)]; - [self.rootNode setNeedsLayout]; -} - #pragma mark - Getter / Setter - (ASVideoNode *)guitarVideoNode; From c403175b91f8dbbf280e8adc6461f101e797163d Mon Sep 17 00:00:00 2001 From: ricky Date: Fri, 15 Jul 2016 08:47:25 -0700 Subject: [PATCH 161/247] [ASTextNode] use accessor for `pointSizeScaleFactors` I have a subclass of `ASTextNode` that uses `pointSizeScaleFactors`. Currently I have to recompute the scale factors any time the font size changes. If `_rendererAttributes` used the property accesor for the scale factors I would only have to create them when asked. I hope this little change can make it in :) --- AsyncDisplayKit/ASTextNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 28fb35764a..625d7cad6e 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -240,7 +240,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; .lineBreakMode = _truncationMode, .maximumNumberOfLines = _maximumNumberOfLines, .exclusionPaths = _exclusionPaths, - .pointSizeScaleFactors = _pointSizeScaleFactors, + .pointSizeScaleFactors = self.pointSizeScaleFactors, .layoutManagerCreationBlock = self.layoutManagerCreationBlock, .textStorageCreationBlock = self.textStorageCreationBlock, }; From 729766a36500e163b2cc59a886d5b464045aeb08 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 15 Jul 2016 08:01:24 -0700 Subject: [PATCH 162/247] Add convenience functions to create relative sizes with percentage --- AsyncDisplayKit/ASDisplayNode.mm | 2 +- AsyncDisplayKit/Layout/ASDimension.h | 13 +++++-------- AsyncDisplayKit/Layout/ASDimension.mm | 5 ++--- AsyncDisplayKit/Layout/ASRelativeSize.h | 18 +++++++++--------- AsyncDisplayKit/Layout/ASRelativeSize.mm | 17 +++++++++++++---- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 98038f5894..7b1a3a5bfd 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2076,7 +2076,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) ASDN::MutexLocker l(_propertyLock); if (! CGSizeEqualToSize(_preferredFrameSize, preferredFrameSize)) { _preferredFrameSize = preferredFrameSize; - self.sizeRange = ASRelativeSizeRangeMake(ASRelativeSizeMakeWithCGSize(_preferredFrameSize), ASRelativeSizeMakeWithCGSize(_preferredFrameSize)); + self.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(_preferredFrameSize); [self invalidateCalculatedLayout]; } } diff --git a/AsyncDisplayKit/Layout/ASDimension.h b/AsyncDisplayKit/Layout/ASDimension.h index e0a043c632..822a1c1963 100644 --- a/AsyncDisplayKit/Layout/ASDimension.h +++ b/AsyncDisplayKit/Layout/ASDimension.h @@ -12,9 +12,7 @@ #import #import -/** - A dimension relative to constraints to be provided in the future. - */ +/** A dimension relative to constraints to be provided in the future. */ typedef NS_ENUM(NSInteger, ASRelativeDimensionType) { /** Just a number. It will always resolve to exactly this amount. This is the default type. */ ASRelativeDimensionTypePoints, @@ -40,7 +38,7 @@ extern ASRelativeDimension const ASRelativeDimensionUnconstrained; ASDISPLAYNODE_EXTERN_C_BEGIN NS_ASSUME_NONNULL_BEGIN -#pragma mark ASRelativeDimension +#pragma mark - ASRelativeDimension extern ASRelativeDimension ASRelativeDimensionMake(ASRelativeDimensionType type, CGFloat value); @@ -56,8 +54,7 @@ extern NSString *NSStringFromASRelativeDimension(ASRelativeDimension dimension); extern CGFloat ASRelativeDimensionResolve(ASRelativeDimension dimension, CGFloat parent); -#pragma mark - -#pragma mark ASSizeRange +#pragma mark - ASSizeRange extern ASSizeRange ASSizeRangeMake(CGSize min, CGSize max); @@ -68,8 +65,8 @@ extern ASSizeRange ASSizeRangeMakeExactSize(CGSize size); extern CGSize ASSizeRangeClamp(ASSizeRange sizeRange, CGSize size); /** - Intersects another size range. If the other size range does not overlap in either dimension, this size range - "wins" by returning a single point within its own range that is closest to the non-overlapping range. + * Intersects another size range. If the other size range does not overlap in either dimension, this size range + * "wins" by returning a single point within its own range that is closest to the non-overlapping range. */ extern ASSizeRange ASSizeRangeIntersect(ASSizeRange sizeRange, ASSizeRange otherSizeRange); diff --git a/AsyncDisplayKit/Layout/ASDimension.mm b/AsyncDisplayKit/Layout/ASDimension.mm index b07e223f87..53b03b7670 100644 --- a/AsyncDisplayKit/Layout/ASDimension.mm +++ b/AsyncDisplayKit/Layout/ASDimension.mm @@ -13,7 +13,7 @@ ASRelativeDimension const ASRelativeDimensionUnconstrained = {}; -#pragma mark ASRelativeDimension +#pragma mark - ASRelativeDimension ASRelativeDimension ASRelativeDimensionMake(ASRelativeDimensionType type, CGFloat value) { @@ -61,8 +61,7 @@ CGFloat ASRelativeDimensionResolve(ASRelativeDimension dimension, CGFloat parent } } -#pragma mark - -#pragma mark ASSizeRange +#pragma mark - ASSizeRange ASSizeRange ASSizeRangeMake(CGSize min, CGSize max) { diff --git a/AsyncDisplayKit/Layout/ASRelativeSize.h b/AsyncDisplayKit/Layout/ASRelativeSize.h index 479b865c43..12f4845531 100644 --- a/AsyncDisplayKit/Layout/ASRelativeSize.h +++ b/AsyncDisplayKit/Layout/ASRelativeSize.h @@ -35,14 +35,16 @@ extern ASRelativeSizeRange const ASRelativeSizeRangeUnconstrained; ASDISPLAYNODE_EXTERN_C_BEGIN NS_ASSUME_NONNULL_BEGIN -#pragma mark - -#pragma mark ASRelativeSize +#pragma mark - ASRelativeSize extern ASRelativeSize ASRelativeSizeMake(ASRelativeDimension width, ASRelativeDimension height); /** Convenience constructor to provide size in Points. */ extern ASRelativeSize ASRelativeSizeMakeWithCGSize(CGSize size); +/** Convenience constructor to provide size in Percentage. */ +extern ASRelativeSize ASRelativeSizeMakeWithPercent(CGFloat percent); + /** Resolve this relative size relative to a parent size. */ extern CGSize ASRelativeSizeResolveSize(ASRelativeSize relativeSize, CGSize parentSize); @@ -50,8 +52,7 @@ extern BOOL ASRelativeSizeEqualToRelativeSize(ASRelativeSize lhs, ASRelativeSize extern NSString *NSStringFromASRelativeSize(ASRelativeSize size); -#pragma mark - -#pragma mark ASRelativeSizeRange +#pragma mark - ASRelativeSizeRange extern ASRelativeSizeRange ASRelativeSizeRangeMake(ASRelativeSize min, ASRelativeSize max); @@ -60,16 +61,15 @@ extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactRelativeSize(ASRelati extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactCGSize(CGSize exact); +extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactPercent(CGFloat percent); + extern ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactRelativeDimensions(ASRelativeDimension exactWidth, ASRelativeDimension exactHeight); extern BOOL ASRelativeSizeRangeEqualToRelativeSizeRange(ASRelativeSizeRange lhs, ASRelativeSizeRange rhs); -/** - Provided a parent size, compute final dimensions for this RelativeSizeRange to arrive at a SizeRange. - */ -extern ASSizeRange ASRelativeSizeRangeResolve(ASRelativeSizeRange relativeSizeRange, - CGSize parentSize); +/** Provided a parent size, compute final dimensions for this RelativeSizeRange to arrive at a SizeRange. */ +extern ASSizeRange ASRelativeSizeRangeResolve(ASRelativeSizeRange relativeSizeRange, CGSize parentSize); NS_ASSUME_NONNULL_END ASDISPLAYNODE_EXTERN_C_END diff --git a/AsyncDisplayKit/Layout/ASRelativeSize.mm b/AsyncDisplayKit/Layout/ASRelativeSize.mm index 9018aedf40..575c1f197e 100644 --- a/AsyncDisplayKit/Layout/ASRelativeSize.mm +++ b/AsyncDisplayKit/Layout/ASRelativeSize.mm @@ -12,8 +12,7 @@ ASRelativeSizeRange const ASRelativeSizeRangeUnconstrained = {}; -#pragma mark - -#pragma mark ASRelativeSize +#pragma mark - ASRelativeSize ASRelativeSize ASRelativeSizeMake(ASRelativeDimension width, ASRelativeDimension height) { @@ -26,6 +25,12 @@ ASRelativeSize ASRelativeSizeMakeWithCGSize(CGSize size) ASRelativeDimensionMakeWithPoints(size.height)); } +ASRelativeSize ASRelativeSizeMakeWithPercent(CGFloat percent) +{ + return ASRelativeSizeMake(ASRelativeDimensionMakeWithPercent(percent), + ASRelativeDimensionMakeWithPercent(percent)); +} + CGSize ASRelativeSizeResolveSize(ASRelativeSize relativeSize, CGSize parentSize) { return CGSizeMake(ASRelativeDimensionResolve(relativeSize.width, parentSize.width), @@ -45,8 +50,7 @@ NSString *NSStringFromASRelativeSize(ASRelativeSize size) NSStringFromASRelativeDimension(size.height)]; } -#pragma mark - -#pragma mark ASRelativeSizeRange +#pragma mark - ASRelativeSizeRange ASRelativeSizeRange ASRelativeSizeRangeMake(ASRelativeSize min, ASRelativeSize max) { @@ -63,6 +67,11 @@ ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactCGSize(CGSize exact) return ASRelativeSizeRangeMakeWithExactRelativeSize(ASRelativeSizeMakeWithCGSize(exact)); } +ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactPercent(CGFloat percent) +{ + return ASRelativeSizeRangeMakeWithExactRelativeSize(ASRelativeSizeMakeWithPercent(percent)); +} + ASRelativeSizeRange ASRelativeSizeRangeMakeWithExactRelativeDimensions(ASRelativeDimension exactWidth, ASRelativeDimension exactHeight) { From 4447ae4bd46959511ab742162838b9bc5c15c366 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 15 Jul 2016 11:23:40 -0700 Subject: [PATCH 163/247] Move ASPerformBlockOnBackgroundThread as it already calls the method inline if it's on the main thread --- AsyncDisplayKit/ASDisplayNode.mm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 7b1a3a5bfd..299acd1d9b 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -793,12 +793,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) }); }; - // TODO ihm: Can we always push the measure to the background thread and remove the parameter from the API? - if (ASDisplayNodeThreadIsMain()) { - ASPerformBlockOnBackgroundThread(transitionBlock); - } else { - transitionBlock(); - } + ASPerformBlockOnBackgroundThread(transitionBlock); } - (void)_completeLayoutCalculation From 20a49f037b25449056c1c52472a68707d592aaa5 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 15 Jul 2016 11:28:34 -0700 Subject: [PATCH 164/247] Comment adjustment for laying out nodes --- AsyncDisplayKit/Details/ASDataController.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index c1fb563e08..f98c71f66d 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -165,8 +165,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; return; } - // Layout node on whatever thread we are on. We handle the trampoline to the main thread in case the node is - // already loaded + // Layout nodes based on the given context constrained size for (NSUInteger k = range.location; k < NSMaxRange(range); k++) { ASCellNode *node = nodes[k]; ASIndexedNodeContext *context = contexts[k]; From fcfce5128d3456bd16d3378ae33a048abffb1ca0 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 15 Jul 2016 11:55:43 -0700 Subject: [PATCH 165/247] Grab propertyLock to get supportsRangeManagedInterfaceState and for asking dirty layout status --- AsyncDisplayKit/ASDisplayNode.mm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 299acd1d9b..300c9fec1f 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1135,9 +1135,19 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)measureNodeWithBoundsIfNecessary:(CGRect)bounds { + BOOL supportsRangedManagedInterfaceState = NO; + BOOL hasDirtyLayout = NO; + BOOL hasSupernode = NO; + { + ASDN::MutexLocker l(_propertyLock); + supportsRangedManagedInterfaceState = [self supportsRangeManagedInterfaceState]; + hasDirtyLayout = [self _hasDirtyLayout]; + hasSupernode = (self.supernode != nil); + } + // Normally measure will be called before layout occurs. If this doesn't happen, nothing is going to call it at all. // We simply call measureWithSizeRange: using a size range equal to whatever bounds were provided to that element - if (self.supernode == nil && !self.supportsRangeManagedInterfaceState && [self _hasDirtyLayout]) { + if (!hasSupernode && !supportsRangedManagedInterfaceState && hasDirtyLayout) { if (CGRectEqualToRect(bounds, CGRectZero)) { LOG(@"Warning: No size given for node before node was trying to layout itself: %@. Please provide a frame for the node.", self); } else { From 9729b61dde53b5fd4c64e51e25956016e6c7dffd Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 15 Jul 2016 11:57:59 -0700 Subject: [PATCH 166/247] Add whitespace --- AsyncDisplayKit/ASDisplayNode.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 300c9fec1f..a29775555d 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2749,7 +2749,7 @@ static void _recursivelySetDisplaySuspended(ASDisplayNode *node, CALayer *layer, return _flags.shouldAnimateSizeChanges; } --(void)setShouldAnimateSizeChanges:(BOOL)shouldAnimateSizeChanges +- (void)setShouldAnimateSizeChanges:(BOOL)shouldAnimateSizeChanges { ASDisplayNodeAssertThreadAffinity(self); ASDN::MutexLocker l(_propertyLock); @@ -2771,7 +2771,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; } } --(NSInteger)drawingPriority +- (NSInteger)drawingPriority { ASDisplayNodeAssertThreadAffinity(self); ASDN::MutexLocker l(_propertyLock); From bd907dcffd2d7c73afbfc42922bdb570f6840fdc Mon Sep 17 00:00:00 2001 From: ricky Date: Fri, 15 Jul 2016 15:39:30 -0700 Subject: [PATCH 167/247] added comment --- AsyncDisplayKit/ASTextNode.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 625d7cad6e..431d2ad944 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -240,6 +240,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; .lineBreakMode = _truncationMode, .maximumNumberOfLines = _maximumNumberOfLines, .exclusionPaths = _exclusionPaths, + // use the property getter so a subclass can provide these scale factors on demand if desired .pointSizeScaleFactors = self.pointSizeScaleFactors, .layoutManagerCreationBlock = self.layoutManagerCreationBlock, .textStorageCreationBlock = self.textStorageCreationBlock, From dda7accd8e38a86327e043fb3402e2a80636954e Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 15 Jul 2016 16:32:23 -0700 Subject: [PATCH 168/247] [ASCollectionView] When resizing, invalidate after remeasuring all nodes (#1931) --- AsyncDisplayKit/ASCollectionView.mm | 10 +++++----- AsyncDisplayKit/Details/ASEnvironment.h | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 7d57011c74..8b2a4adac5 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -100,7 +100,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; id _layoutFacilitator; BOOL _performingBatchUpdates; - BOOL _superPerformingBatchUpdates; + NSUInteger _superBatchUpdateCount; NSMutableArray *_batchUpdateBlocks; BOOL _isDeallocating; @@ -518,11 +518,10 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)_superPerformBatchUpdates:(void(^)())updates completion:(void(^)(BOOL finished))completion { ASDisplayNodeAssertMainThread(); - ASDisplayNodeAssert(_superPerformingBatchUpdates == NO, @"Nested batch updates being sent to UICollectionView. This is not expected."); - _superPerformingBatchUpdates = YES; + _superBatchUpdateCount++; [super performBatchUpdates:updates completion:completion]; - _superPerformingBatchUpdates = NO; + _superBatchUpdateCount--; } #pragma mark Assertions. @@ -849,6 +848,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } completion:nil]; // We need to ensure the size requery is done before we update our layout. [self waitUntilAllUpdatesAreCommitted]; + [self.collectionViewLayout invalidateLayout]; } } @@ -857,7 +857,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; _nextLayoutInvalidationStyle = ASCollectionViewInvalidationStyleNone; switch (invalidationStyle) { case ASCollectionViewInvalidationStyleWithAnimation: - if (!_superPerformingBatchUpdates) { + if (0 == _superBatchUpdateCount) { [self _superPerformBatchUpdates:^{ } completion:nil]; } break; diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index e42c26534e..486f9f8852 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -153,7 +153,6 @@ ASDISPLAYNODE_EXTERN_C_END for (NSArray *sectionArray in completedNodes) {\ for (ASCellNode *cellNode in sectionArray) {\ ASEnvironmentStatePropagateDown(cellNode, currentTraits);\ - [cellNode setNeedsLayout];\ }\ }\ });\ From abf8d5b9aabf8655d03aa24975e082449ab4d7f3 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sat, 16 Jul 2016 10:46:55 -0700 Subject: [PATCH 169/247] [Infer] change atomic properties to nonatomic (#1932) --- AsyncDisplayKit/ASCellNode.h | 2 +- AsyncDisplayKit/ASDisplayNode.h | 66 +++++++++---------- AsyncDisplayKit/ASImageNode.h | 8 +-- AsyncDisplayKit/ASNetworkImageNode.h | 6 +- AsyncDisplayKit/ASTextNode.h | 8 +-- AsyncDisplayKit/ASVideoNode.h | 14 ++-- AsyncDisplayKit/ASVideoPlayerNode.h | 6 +- AsyncDisplayKit/Details/ASDataController.mm | 2 +- .../Details/ASHighlightOverlayLayer.h | 4 +- .../Transactions/_ASAsyncTransaction.mm | 2 +- .../Details/UIView+ASConvenience.h | 20 +++--- AsyncDisplayKit/Details/_ASDisplayLayer.h | 6 +- .../ASImageNode+AnimatedImagePrivate.h | 2 +- AsyncDisplayKitTests/ASDisplayNodeTests.m | 14 ++-- AsyncDisplayKitTests/ASTableViewTests.m | 10 +-- AsyncDisplayKitTests/ASVideoNodeTests.m | 10 +-- 16 files changed, 90 insertions(+), 90 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index 5aba8ec1b3..50cdcbab9f 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -77,7 +77,7 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { /* * ASTableView uses these properties when configuring UITableViewCells that host ASCellNodes. */ -//@property (atomic, retain) UIColor *backgroundColor; +//@property (nonatomic, retain) UIColor *backgroundColor; @property (nonatomic) UITableViewCellSelectionStyle selectionStyle; /** diff --git a/AsyncDisplayKit/ASDisplayNode.h b/AsyncDisplayKit/ASDisplayNode.h index 47e03d09a7..005d9e2203 100644 --- a/AsyncDisplayKit/ASDisplayNode.h +++ b/AsyncDisplayKit/ASDisplayNode.h @@ -165,7 +165,7 @@ NS_ASSUME_NONNULL_BEGIN /** * @abstract The name of this node, which will be displayed in `description`. The default value is nil. */ -@property (nullable, atomic, copy) NSString *name; +@property (nullable, nonatomic, copy) NSString *name; /** * @abstract Returns whether the node is synchronous. @@ -193,7 +193,7 @@ NS_ASSUME_NONNULL_BEGIN * * @return YES if a view is loaded, or if layerBacked is YES and layer is not nil; NO otherwise. */ -@property (atomic, readonly, assign, getter=isNodeLoaded) BOOL nodeLoaded; +@property (nonatomic, readonly, assign, getter=isNodeLoaded) BOOL nodeLoaded; /** * @abstract Returns whether the node rely on a layer instead of a view. @@ -303,7 +303,7 @@ NS_ASSUME_NONNULL_BEGIN * * @return The preferred frame size of this node */ -@property (atomic, assign, readwrite) CGSize preferredFrameSize; +@property (nonatomic, assign, readwrite) CGSize preferredFrameSize; /** @name Managing the nodes hierarchy */ @@ -646,27 +646,27 @@ NS_ASSUME_NONNULL_END */ - (void)setNeedsLayout; -@property (atomic, strong, nullable) id contents; // default=nil -@property (atomic, assign) BOOL clipsToBounds; // default==NO -@property (atomic, getter=isOpaque) BOOL opaque; // default==YES +@property (nonatomic, strong, nullable) id contents; // default=nil +@property (nonatomic, assign) BOOL clipsToBounds; // default==NO +@property (nonatomic, getter=isOpaque) BOOL opaque; // default==YES -@property (atomic, assign) BOOL allowsEdgeAntialiasing; -@property (atomic, assign) unsigned int edgeAntialiasingMask; // default==all values from CAEdgeAntialiasingMask +@property (nonatomic, assign) BOOL allowsEdgeAntialiasing; +@property (nonatomic, assign) unsigned int edgeAntialiasingMask; // default==all values from CAEdgeAntialiasingMask -@property (atomic, getter=isHidden) BOOL hidden; // default==NO -@property (atomic, assign) BOOL needsDisplayOnBoundsChange; // default==NO -@property (atomic, assign) BOOL autoresizesSubviews; // default==YES (undefined for layer-backed nodes) -@property (atomic, assign) UIViewAutoresizing autoresizingMask; // default==UIViewAutoresizingNone (undefined for layer-backed nodes) -@property (atomic, assign) CGFloat alpha; // default=1.0f -@property (atomic, assign) CGRect bounds; // default=CGRectZero -@property (atomic, assign) CGRect frame; // default=CGRectZero -@property (atomic, assign) CGPoint anchorPoint; // default={0.5, 0.5} -@property (atomic, assign) CGFloat zPosition; // default=0.0 -@property (atomic, assign) CGPoint position; // default=CGPointZero -@property (atomic, assign) CGFloat cornerRadius; // default=0.0 -@property (atomic, assign) CGFloat contentsScale; // default=1.0f. See @contentsScaleForDisplay for more info -@property (atomic, assign) CATransform3D transform; // default=CATransform3DIdentity -@property (atomic, assign) CATransform3D subnodeTransform; // default=CATransform3DIdentity +@property (nonatomic, getter=isHidden) BOOL hidden; // default==NO +@property (nonatomic, assign) BOOL needsDisplayOnBoundsChange; // default==NO +@property (nonatomic, assign) BOOL autoresizesSubviews; // default==YES (undefined for layer-backed nodes) +@property (nonatomic, assign) UIViewAutoresizing autoresizingMask; // default==UIViewAutoresizingNone (undefined for layer-backed nodes) +@property (nonatomic, assign) CGFloat alpha; // default=1.0f +@property (nonatomic, assign) CGRect bounds; // default=CGRectZero +@property (nonatomic, assign) CGRect frame; // default=CGRectZero +@property (nonatomic, assign) CGPoint anchorPoint; // default={0.5, 0.5} +@property (nonatomic, assign) CGFloat zPosition; // default=0.0 +@property (nonatomic, assign) CGPoint position; // default=CGPointZero +@property (nonatomic, assign) CGFloat cornerRadius; // default=0.0 +@property (nonatomic, assign) CGFloat contentsScale; // default=1.0f. See @contentsScaleForDisplay for more info +@property (nonatomic, assign) CATransform3D transform; // default=CATransform3DIdentity +@property (nonatomic, assign) CATransform3D subnodeTransform; // default=CATransform3DIdentity /** * @abstract The node view's background color. @@ -674,9 +674,9 @@ NS_ASSUME_NONNULL_END * @discussion In contrast to UIView, setting a transparent color will not set opaque = NO. * This only affects nodes that implement +drawRect like ASTextNode. */ -@property (atomic, strong, nullable) UIColor *backgroundColor; // default=nil +@property (nonatomic, strong, nullable) UIColor *backgroundColor; // default=nil -@property (atomic, strong, null_resettable) UIColor *tintColor; // default=Blue +@property (nonatomic, strong, null_resettable) UIColor *tintColor; // default=Blue - (void)tintColorDidChange; // Notifies the node when the tintColor has changed. /** @@ -687,18 +687,18 @@ NS_ASSUME_NONNULL_END * Thus, UIViewContentModeRedraw is not allowed; use needsDisplayOnBoundsChange = YES instead, and pick an appropriate * contentMode for your content while it's being re-rendered. */ -@property (atomic, assign) UIViewContentMode contentMode; // default=UIViewContentModeScaleToFill +@property (nonatomic, assign) UIViewContentMode contentMode; // default=UIViewContentModeScaleToFill -@property (atomic, assign, getter=isUserInteractionEnabled) BOOL userInteractionEnabled; // default=YES (NO for layer-backed nodes) +@property (nonatomic, assign, getter=isUserInteractionEnabled) BOOL userInteractionEnabled; // default=YES (NO for layer-backed nodes) #if TARGET_OS_IOS -@property (atomic, assign, getter=isExclusiveTouch) BOOL exclusiveTouch; // default=NO +@property (nonatomic, assign, getter=isExclusiveTouch) BOOL exclusiveTouch; // default=NO #endif -@property (atomic, assign, nullable) CGColorRef shadowColor; // default=opaque rgb black -@property (atomic, assign) CGFloat shadowOpacity; // default=0.0 -@property (atomic, assign) CGSize shadowOffset; // default=(0, -3) -@property (atomic, assign) CGFloat shadowRadius; // default=3 -@property (atomic, assign) CGFloat borderWidth; // default=0 -@property (atomic, assign, nullable) CGColorRef borderColor; // default=opaque rgb black +@property (nonatomic, assign, nullable) CGColorRef shadowColor; // default=opaque rgb black +@property (nonatomic, assign) CGFloat shadowOpacity; // default=0.0 +@property (nonatomic, assign) CGSize shadowOffset; // default=(0, -3) +@property (nonatomic, assign) CGFloat shadowRadius; // default=3 +@property (nonatomic, assign) CGFloat borderWidth; // default=0 +@property (nonatomic, assign, nullable) CGColorRef borderColor; // default=opaque rgb black // UIResponder methods // By default these fall through to the underlying view, but can be overridden. diff --git a/AsyncDisplayKit/ASImageNode.h b/AsyncDisplayKit/ASImageNode.h index ef603cfdf1..70fd576fbf 100644 --- a/AsyncDisplayKit/ASImageNode.h +++ b/AsyncDisplayKit/ASImageNode.h @@ -37,7 +37,7 @@ typedef UIImage * _Nullable (^asimagenode_modification_block_t)(UIImage *image); * the layer's contentsCenter property. Non-stretchable images work too, of * course. */ -@property (nullable, atomic, strong) UIImage *image; +@property (nullable, nonatomic, strong) UIImage *image; /** @abstract The placeholder color. @@ -133,7 +133,7 @@ typedef UIImage * _Nullable (^asimagenode_modification_block_t)(UIImage *image); * @discussion Set this to an object which conforms to ASAnimatedImageProtocol * to have the ASImageNode playback an animated image. */ -@property (nullable, atomic, strong) id animatedImage; +@property (nullable, nonatomic, strong) id animatedImage; /** * @abstract Pause the playback of an animated image. @@ -141,7 +141,7 @@ typedef UIImage * _Nullable (^asimagenode_modification_block_t)(UIImage *image); * @discussion Set to YES to pause playback of an animated image and NO to resume * playback. */ -@property (atomic, assign) BOOL animatedImagePaused; +@property (nonatomic, assign) BOOL animatedImagePaused; /** * @abstract The runloop mode used to animate the image. @@ -150,7 +150,7 @@ typedef UIImage * _Nullable (^asimagenode_modification_block_t)(UIImage *image); * Setting NSDefaultRunLoopMode will cause animation to pause while scrolling (if the ASImageNode is * in a scroll view), which may improve scroll performance in some use cases. */ -@property (atomic, strong) NSString *animatedImageRunLoopMode; +@property (nonatomic, strong) NSString *animatedImageRunLoopMode; @end diff --git a/AsyncDisplayKit/ASNetworkImageNode.h b/AsyncDisplayKit/ASNetworkImageNode.h index 1998d984bb..c0d2a3e6d9 100644 --- a/AsyncDisplayKit/ASNetworkImageNode.h +++ b/AsyncDisplayKit/ASNetworkImageNode.h @@ -47,19 +47,19 @@ NS_ASSUME_NONNULL_BEGIN /** * The delegate, which must conform to the protocol. */ -@property (nullable, atomic, weak, readwrite) id delegate; +@property (nullable, nonatomic, weak, readwrite) id delegate; /** * A placeholder image to display while the URL is loading. */ -@property (nullable, atomic, strong, readwrite) UIImage *defaultImage; +@property (nullable, nonatomic, strong, readwrite) UIImage *defaultImage; /** * The URL of a new image to download and display. * * @discussion Changing this property will reset the displayed image to a placeholder () while loading. */ -@property (nullable, atomic, strong, readwrite) NSURL *URL; +@property (nullable, nonatomic, strong, readwrite) NSURL *URL; /** * Download and display a new image. diff --git a/AsyncDisplayKit/ASTextNode.h b/AsyncDisplayKit/ASTextNode.h index 02eb204a33..b103957e8c 100644 --- a/AsyncDisplayKit/ASTextNode.h +++ b/AsyncDisplayKit/ASTextNode.h @@ -108,10 +108,10 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) { /** @abstract When you set these ASDisplayNode properties, they are composited into the bitmap instead of being applied by CA. - @property (atomic, assign) CGColorRef shadowColor; - @property (atomic, assign) CGFloat shadowOpacity; - @property (atomic, assign) CGSize shadowOffset; - @property (atomic, assign) CGFloat shadowRadius; + @property (nonatomic, assign) CGColorRef shadowColor; + @property (nonatomic, assign) CGFloat shadowOpacity; + @property (nonatomic, assign) CGSize shadowOffset; + @property (nonatomic, assign) CGFloat shadowRadius; */ /** diff --git a/AsyncDisplayKit/ASVideoNode.h b/AsyncDisplayKit/ASVideoNode.h index 00f90ce80f..103124b38d 100644 --- a/AsyncDisplayKit/ASVideoNode.h +++ b/AsyncDisplayKit/ASVideoNode.h @@ -40,12 +40,12 @@ NS_ASSUME_NONNULL_BEGIN - (void)pause; - (BOOL)isPlaying; -@property (nullable, atomic, strong, readwrite) AVAsset *asset; -@property (nullable, atomic, strong, readwrite) AVVideoComposition *videoComposition; -@property (nullable, atomic, strong, readwrite) AVAudioMix *audioMix; +@property (nullable, nonatomic, strong, readwrite) AVAsset *asset; +@property (nullable, nonatomic, strong, readwrite) AVVideoComposition *videoComposition; +@property (nullable, nonatomic, strong, readwrite) AVAudioMix *audioMix; -@property (nullable, atomic, strong, readonly) AVPlayer *player; -@property (nullable, atomic, strong, readonly) AVPlayerItem *currentItem; +@property (nullable, nonatomic, strong, readonly) AVPlayer *player; +@property (nullable, nonatomic, strong, readonly) AVPlayerItem *currentItem; /** @@ -63,9 +63,9 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) int32_t periodicTimeObserverTimescale; //! Defaults to AVLayerVideoGravityResizeAspect -@property (atomic) NSString *gravity; +@property (nonatomic) NSString *gravity; -@property (nullable, atomic, weak, readwrite) id delegate; +@property (nullable, nonatomic, weak, readwrite) id delegate; @end diff --git a/AsyncDisplayKit/ASVideoPlayerNode.h b/AsyncDisplayKit/ASVideoPlayerNode.h index 60318ce938..0a7b36d324 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.h +++ b/AsyncDisplayKit/ASVideoPlayerNode.h @@ -31,7 +31,7 @@ NS_ASSUME_NONNULL_BEGIN @interface ASVideoPlayerNode : ASDisplayNode -@property (nullable, atomic, weak) id delegate; +@property (nullable, nonatomic, weak) id delegate; @property (nonatomic, assign, readonly) CMTime duration; @@ -49,12 +49,12 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign, readwrite) BOOL muted; @property (nonatomic, assign, readonly) ASVideoNodePlayerState playerState; @property (nonatomic, assign, readwrite) BOOL shouldAggressivelyRecoverFromStall; -@property (nullable, atomic, strong, readwrite) NSURL *placeholderImageURL; +@property (nullable, nonatomic, strong, readwrite) NSURL *placeholderImageURL; //! Defaults to 100 @property (nonatomic, assign) int32_t periodicTimeObserverTimescale; //! Defaults to AVLayerVideoGravityResizeAspect -@property (atomic) NSString *gravity; +@property (nonatomic) NSString *gravity; - (instancetype)initWithUrl:(NSURL*)url; - (instancetype)initWithAsset:(AVAsset*)asset; diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index f98c71f66d..76c8b723de 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -45,7 +45,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; BOOL _delegateDidDeleteSections; } -@property (atomic, assign) NSUInteger batchUpdateCounter; +@property (nonatomic, assign) NSUInteger batchUpdateCounter; @end diff --git a/AsyncDisplayKit/Details/ASHighlightOverlayLayer.h b/AsyncDisplayKit/Details/ASHighlightOverlayLayer.h index 6f80b2996b..34d31979ec 100644 --- a/AsyncDisplayKit/Details/ASHighlightOverlayLayer.h +++ b/AsyncDisplayKit/Details/ASHighlightOverlayLayer.h @@ -31,8 +31,8 @@ NS_ASSUME_NONNULL_BEGIN */ - (instancetype)initWithRects:(NSArray *)rects; -@property (nullable, atomic, strong) __attribute__((NSObject)) CGColorRef highlightColor; -@property (atomic, weak) CALayer *targetLayer; +@property (nullable, nonatomic, strong) __attribute__((NSObject)) CGColorRef highlightColor; +@property (nonatomic, weak) CALayer *targetLayer; @end diff --git a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm index 5342e34f33..f869f5e108 100644 --- a/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm +++ b/AsyncDisplayKit/Details/Transactions/_ASAsyncTransaction.mm @@ -20,7 +20,7 @@ NSInteger const ASDefaultTransactionPriority = 0; @interface ASDisplayNodeAsyncTransactionOperation : NSObject - (instancetype)initWithOperationCompletionBlock:(asyncdisplaykit_async_transaction_operation_completion_block_t)operationCompletionBlock; @property (nonatomic, copy) asyncdisplaykit_async_transaction_operation_completion_block_t operationCompletionBlock; -@property (atomic, strong) id value; // set on bg queue by the operation block +@property (nonatomic, strong) id value; // set on bg queue by the operation block @end @implementation ASDisplayNodeAsyncTransactionOperation diff --git a/AsyncDisplayKit/Details/UIView+ASConvenience.h b/AsyncDisplayKit/Details/UIView+ASConvenience.h index cb3e561414..ef0d10211c 100644 --- a/AsyncDisplayKit/Details/UIView+ASConvenience.h +++ b/AsyncDisplayKit/Details/UIView+ASConvenience.h @@ -67,16 +67,16 @@ NS_ASSUME_NONNULL_BEGIN We don't declare them here, so _ASPendingState does not complain about them being not implemented, as they are already on NSObject - @property (atomic, assign) BOOL isAccessibilityElement; - @property (atomic, copy) NSString *accessibilityLabel; - @property (atomic, copy) NSString *accessibilityHint; - @property (atomic, copy) NSString *accessibilityValue; - @property (atomic, assign) UIAccessibilityTraits accessibilityTraits; - @property (atomic, assign) CGRect accessibilityFrame; - @property (atomic, strong) NSString *accessibilityLanguage; - @property (atomic, assign) BOOL accessibilityElementsHidden; - @property (atomic, assign) BOOL accessibilityViewIsModal; - @property (atomic, assign) BOOL shouldGroupAccessibilityChildren; + @property (nonatomic, assign) BOOL isAccessibilityElement; + @property (nonatomic, copy) NSString *accessibilityLabel; + @property (nonatomic, copy) NSString *accessibilityHint; + @property (nonatomic, copy) NSString *accessibilityValue; + @property (nonatomic, assign) UIAccessibilityTraits accessibilityTraits; + @property (nonatomic, assign) CGRect accessibilityFrame; + @property (nonatomic, strong) NSString *accessibilityLanguage; + @property (nonatomic, assign) BOOL accessibilityElementsHidden; + @property (nonatomic, assign) BOOL accessibilityViewIsModal; + @property (nonatomic, assign) BOOL shouldGroupAccessibilityChildren; */ // Accessibility identification support diff --git a/AsyncDisplayKit/Details/_ASDisplayLayer.h b/AsyncDisplayKit/Details/_ASDisplayLayer.h index 6e8e81ebcc..1dde2e319d 100644 --- a/AsyncDisplayKit/Details/_ASDisplayLayer.h +++ b/AsyncDisplayKit/Details/_ASDisplayLayer.h @@ -24,7 +24,7 @@ typedef BOOL(^asdisplaynode_iscancelled_block_t)(void); @default YES (note that this might change for subclasses) */ -@property (atomic, assign) BOOL displaysAsynchronously; +@property (nonatomic, assign) BOOL displaysAsynchronously; /** @summary Cancels any pending async display. @@ -48,7 +48,7 @@ typedef BOOL(^asdisplaynode_iscancelled_block_t)(void); @desc The asyncDelegate will have the opportunity to override the methods related to async display. */ -@property (atomic, weak) id<_ASDisplayLayerDelegate> asyncDelegate; +@property (nonatomic, weak) id<_ASDisplayLayerDelegate> asyncDelegate; /** @summary Suspends both asynchronous and synchronous display of the receiver if YES. @@ -58,7 +58,7 @@ typedef BOOL(^asdisplaynode_iscancelled_block_t)(void); @default NO */ -@property (atomic, assign, getter=isDisplaySuspended) BOOL displaySuspended; +@property (nonatomic, assign, getter=isDisplaySuspended) BOOL displaySuspended; /** @summary Bypasses asynchronous rendering and performs a blocking display immediately on the current thread. diff --git a/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h b/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h index 95f352d2dc..6748f1af65 100644 --- a/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h +++ b/AsyncDisplayKit/Private/ASImageNode+AnimatedImagePrivate.h @@ -28,7 +28,7 @@ extern NSString *const ASAnimatedImageDefaultRunLoopMode; NSUInteger _playedLoops; } -@property (atomic, assign) CFTimeInterval lastDisplayLinkFire; +@property (nonatomic, assign) CFTimeInterval lastDisplayLinkFire; @end diff --git a/AsyncDisplayKitTests/ASDisplayNodeTests.m b/AsyncDisplayKitTests/ASDisplayNodeTests.m index 1d58b9ccc4..e1efbe7bbc 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeTests.m @@ -85,15 +85,15 @@ for (ASDisplayNode *n in @[ nodes ]) {\ @end @interface ASTestDisplayNode : ASDisplayNode -@property (atomic, copy) void (^willDeallocBlock)(ASTestDisplayNode *node); -@property (atomic, copy) CGSize(^calculateSizeBlock)(ASTestDisplayNode *node, CGSize size); -@property (atomic) BOOL hasFetchedData; +@property (nonatomic, copy) void (^willDeallocBlock)(ASTestDisplayNode *node); +@property (nonatomic, copy) CGSize(^calculateSizeBlock)(ASTestDisplayNode *node, CGSize size); +@property (nonatomic) BOOL hasFetchedData; -@property (atomic) BOOL displayRangeStateChangedToYES; -@property (atomic) BOOL displayRangeStateChangedToNO; +@property (nonatomic) BOOL displayRangeStateChangedToYES; +@property (nonatomic) BOOL displayRangeStateChangedToNO; -@property (atomic) BOOL loadStateChangedToYES; -@property (atomic) BOOL loadStateChangedToNO; +@property (nonatomic) BOOL loadStateChangedToYES; +@property (nonatomic) BOOL loadStateChangedToNO; @end @interface ASTestResponderNode : ASTestDisplayNode diff --git a/AsyncDisplayKitTests/ASTableViewTests.m b/AsyncDisplayKitTests/ASTableViewTests.m index af85fb78c1..2c282de139 100644 --- a/AsyncDisplayKitTests/ASTableViewTests.m +++ b/AsyncDisplayKitTests/ASTableViewTests.m @@ -22,7 +22,7 @@ #define NumberOfReloadIterations 50 @interface ASTestDataController : ASChangeSetDataController -@property (atomic) int numberOfAllNodesRelayouts; +@property (nonatomic) int numberOfAllNodesRelayouts; @end @implementation ASTestDataController @@ -36,7 +36,7 @@ @end @interface ASTestTableView : ASTableView -@property (atomic, copy) void (^willDeallocBlock)(ASTableView *tableView); +@property (nonatomic, copy) void (^willDeallocBlock)(ASTableView *tableView); @end @implementation ASTestTableView @@ -61,7 +61,7 @@ @end @interface ASTableViewTestDelegate : NSObject -@property (atomic, copy) void (^willDeallocBlock)(ASTableViewTestDelegate *delegate); +@property (nonatomic, copy) void (^willDeallocBlock)(ASTableViewTestDelegate *delegate); @end @implementation ASTableViewTestDelegate @@ -92,7 +92,7 @@ @interface ASTestTextCellNode : ASTextCellNode /** Calculated by counting how many times -layoutSpecThatFits: is called on the main thread. */ -@property (atomic) int numberOfLayoutsOnMainThread; +@property (nonatomic) int numberOfLayoutsOnMainThread; @end @implementation ASTestTextCellNode @@ -154,7 +154,7 @@ @end @interface ASTableViewTests : XCTestCase -@property (atomic, retain) ASTableView *testTableView; +@property (nonatomic, retain) ASTableView *testTableView; @end @implementation ASTableViewTests diff --git a/AsyncDisplayKitTests/ASVideoNodeTests.m b/AsyncDisplayKitTests/ASVideoNodeTests.m index f7c4a6b079..63960005d1 100644 --- a/AsyncDisplayKitTests/ASVideoNodeTests.m +++ b/AsyncDisplayKitTests/ASVideoNodeTests.m @@ -37,11 +37,11 @@ } -@property (atomic, readwrite) ASInterfaceState interfaceState; -@property (atomic, readonly) ASDisplayNode *spinner; -@property (atomic, readwrite) ASDisplayNode *playerNode; -@property (atomic, readwrite) AVPlayer *player; -@property (atomic, readwrite) BOOL shouldBePlaying; +@property (nonatomic, readwrite) ASInterfaceState interfaceState; +@property (nonatomic, readonly) ASDisplayNode *spinner; +@property (nonatomic, readwrite) ASDisplayNode *playerNode; +@property (nonatomic, readwrite) AVPlayer *player; +@property (nonatomic, readwrite) BOOL shouldBePlaying; - (void)setVideoPlaceholderImage:(UIImage *)image; - (void)prepareToPlayAsset:(AVAsset *)asset withKeys:(NSArray *)requestedKeys; From 4baf9bdbfe2aedb77e5a066691820b823514dad2 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sat, 16 Jul 2016 15:29:24 -0700 Subject: [PATCH 170/247] [Infer] Fix Infer errors/warnings (#1938) * [Infer] Fix 11 Infer errors/warnings * fix build error --- AsyncDisplayKit/ASControlNode.mm | 10 +++++++--- AsyncDisplayKit/ASRunLoopQueue.mm | 12 +++++++----- AsyncDisplayKit/ASTableView.mm | 18 ++++++++++-------- AsyncDisplayKit/ASVideoPlayerNode.mm | 8 ++++---- AsyncDisplayKit/Details/ASDataController.mm | 4 ++++ AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m | 4 ++-- AsyncDisplayKit/Private/ASInternalHelpers.mm | 6 ++++++ .../Private/ASMultidimensionalArrayUtils.mm | 4 +++- AsyncDisplayKit/TextKit/ASTextKitContext.mm | 4 +++- inferScript.sh | 8 ++++++++ 10 files changed, 54 insertions(+), 24 deletions(-) create mode 100755 inferScript.sh diff --git a/AsyncDisplayKit/ASControlNode.mm b/AsyncDisplayKit/ASControlNode.mm index 34333ea0dd..29b0b57da2 100644 --- a/AsyncDisplayKit/ASControlNode.mm +++ b/AsyncDisplayKit/ASControlNode.mm @@ -286,7 +286,9 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v { // Create the dispatch table for this event. eventDispatchTable = [NSMapTable weakToStrongObjectsMapTable]; - _controlEventDispatchTable[eventKey] = eventDispatchTable; + if (eventKey) { + [_controlEventDispatchTable setObject:eventDispatchTable forKey:eventKey]; + } } // Have we seen this target before for this event? @@ -442,9 +444,11 @@ id _ASControlNodeEventKeyForControlEvent(ASControlNodeEvent controlEv void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, void (^block)(ASControlNodeEvent anEvent)) { + if (block == nil) { + return; + } // Start with our first event (touch down) and work our way up to the last event (touch cancel) - for (ASControlNodeEvent thisEvent = ASControlNodeEventTouchDown; thisEvent <= ASControlNodeEventTouchCancel; thisEvent <<= 1) - { + for (ASControlNodeEvent thisEvent = ASControlNodeEventTouchDown; thisEvent <= ASControlNodeEventTouchCancel; thisEvent <<= 1){ // If it's included in the mask, invoke the block. if ((mask & thisEvent) == thisEvent) block(thisEvent); diff --git a/AsyncDisplayKit/ASRunLoopQueue.mm b/AsyncDisplayKit/ASRunLoopQueue.mm index 693f01dc75..44621b667d 100644 --- a/AsyncDisplayKit/ASRunLoopQueue.mm +++ b/AsyncDisplayKit/ASRunLoopQueue.mm @@ -59,13 +59,15 @@ static void runLoopSourceCallback(void *info) { // It is not guaranteed that the runloop will turn if it has no scheduled work, and this causes processing of // the queue to stop. Attaching a custom loop source to the run loop and signal it if new work needs to be done CFRunLoopSourceContext *runLoopSourceContext = (CFRunLoopSourceContext *)calloc(1, sizeof(CFRunLoopSourceContext)); - runLoopSourceContext->perform = runLoopSourceCallback; + if (runLoopSourceContext) { + runLoopSourceContext->perform = runLoopSourceCallback; #if ASRunLoopQueueLoggingEnabled - runLoopSourceContext->info = (__bridge void *)self; + runLoopSourceContext->info = (__bridge void *)self; #endif - _runLoopSource = CFRunLoopSourceCreate(NULL, 0, runLoopSourceContext); - CFRunLoopAddSource(runloop, _runLoopSource, kCFRunLoopCommonModes); - free(runLoopSourceContext); + _runLoopSource = CFRunLoopSourceCreate(NULL, 0, runLoopSourceContext); + CFRunLoopAddSource(runloop, _runLoopSource, kCFRunLoopCommonModes); + free(runLoopSourceContext); + } #if ASRunLoopQueueLoggingEnabled _runloopQueueLoggingTimer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(checkRunLoop) userInfo:nil repeats:YES]; diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 80bf807308..8fdb55eb44 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -606,16 +606,18 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; cell.delegate = self; ASCellNode *node = [_dataController nodeAtIndexPath:indexPath]; - [_rangeController configureContentView:cell.contentView forCellNode:node]; + if (node) { + [_rangeController configureContentView:cell.contentView forCellNode:node]; - cell.node = node; - cell.backgroundColor = node.backgroundColor; - cell.selectionStyle = node.selectionStyle; + cell.node = node; + cell.backgroundColor = node.backgroundColor; + cell.selectionStyle = node.selectionStyle; - // the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default) - // This is actually a workaround for a bug we are seeing in some rare cases (selected background view - // overlaps other cells if size of ASCellNode has changed.) - cell.clipsToBounds = node.clipsToBounds; + // the following ensures that we clip the entire cell to it's bounds if node.clipsToBounds is set (the default) + // This is actually a workaround for a bug we are seeing in some rare cases (selected background view + // overlaps other cells if size of ASCellNode has changed.) + cell.clipsToBounds = node.clipsToBounds; + } return cell; } diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index 7d1dc889d9..0099dd34fe 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -379,19 +379,19 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; slider.maximumValue = 1.0; if (_delegateFlags.delegateScrubberMinimumTrackTintColor) { - slider.minimumTrackTintColor = [_delegate videoPlayerNodeScrubberMinimumTrackTint:strongSelf]; + slider.minimumTrackTintColor = [strongSelf.delegate videoPlayerNodeScrubberMinimumTrackTint:strongSelf]; } if (_delegateFlags.delegateScrubberMaximumTrackTintColor) { - slider.maximumTrackTintColor = [_delegate videoPlayerNodeScrubberMaximumTrackTint:strongSelf]; + slider.maximumTrackTintColor = [strongSelf.delegate videoPlayerNodeScrubberMaximumTrackTint:strongSelf]; } if (_delegateFlags.delegateScrubberThumbTintColor) { - slider.thumbTintColor = [_delegate videoPlayerNodeScrubberThumbTint:strongSelf]; + slider.thumbTintColor = [strongSelf.delegate videoPlayerNodeScrubberThumbTint:strongSelf]; } if (_delegateFlags.delegateScrubberThumbImage) { - UIImage *thumbImage = [_delegate videoPlayerNodeScrubberThumbImage:strongSelf]; + UIImage *thumbImage = [strongSelf.delegate videoPlayerNodeScrubberThumbImage:strongSelf]; [slider setThumbImage:thumbImage forState:UIControlStateNormal]; } diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 76c8b723de..40c4af1abf 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -560,6 +560,10 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; return; } + if (block == nil) { + return; + } + // If we have never performed a reload, there is no value in executing edit operations as the initial // reload will directly re-query the latest state of the datasource - so completely skip the block in this case. if (_batchUpdateCounter == 0) { diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m index f05acafa5f..15a4e9ec39 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -68,9 +68,9 @@ NSMutableString *result = [NSMutableString stringWithString:@"{ "]; [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { if (range.length == 1) { - [result appendFormat:@"%zu ", range.location]; + [result appendFormat:@"%zu ", (unsigned long)range.location]; } else { - [result appendFormat:@"%zu-%zu ", range.location, NSMaxRange(range) - 1]; + [result appendFormat:@"%zu-%lu ", (unsigned long)range.location, NSMaxRange(range) - 1]; } }]; [result appendString:@"}"]; diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.mm b/AsyncDisplayKit/Private/ASInternalHelpers.mm index 94042053d7..dbe7f16795 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.mm +++ b/AsyncDisplayKit/Private/ASInternalHelpers.mm @@ -34,6 +34,9 @@ BOOL ASSubclassOverridesClassSelector(Class superclass, Class subclass, SEL sele void ASPerformBlockOnMainThread(void (^block)()) { + if (block == nil){ + return; + } if (ASDisplayNodeThreadIsMain()) { block(); } else { @@ -43,6 +46,9 @@ void ASPerformBlockOnMainThread(void (^block)()) void ASPerformBlockOnBackgroundThread(void (^block)()) { + if (block == nil){ + return; + } if (ASDisplayNodeThreadIsMain()) { dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); } else { diff --git a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm index a251ed7fc6..e8b3671977 100644 --- a/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm +++ b/AsyncDisplayKit/Private/ASMultidimensionalArrayUtils.mm @@ -43,7 +43,9 @@ static void ASRecursivelyUpdateMultidimensionalArrayAtIndexPaths(NSMutableArray curIdx++; } - updateBlock(mutableArray, indexSet, curIdx); + if (updateBlock){ + updateBlock(mutableArray, indexSet, curIdx); + } } } diff --git a/AsyncDisplayKit/TextKit/ASTextKitContext.mm b/AsyncDisplayKit/TextKit/ASTextKitContext.mm index 7410ed9f45..e1f65a0122 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitContext.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitContext.mm @@ -75,7 +75,9 @@ NSTextContainer *))block { std::lock_guard l(_textKitMutex); - block(_layoutManager, _textStorage, _textContainer); + if (block) { + block(_layoutManager, _textStorage, _textContainer); + } } @end diff --git a/inferScript.sh b/inferScript.sh new file mode 100755 index 0000000000..81919c1e81 --- /dev/null +++ b/inferScript.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if ! [ -x "$(command -v infer)" ]; then + echo "infer not found" + echo "Install infer with homebrew: brew install infer" +else + infer --continue --reactive -- xcodebuild build -workspace AsyncDisplayKit.xcworkspace -scheme "AsyncDisplayKit-iOS" -configuration Debug -sdk iphonesimulator9.3 +fi From 3664ca67cb06647233e6fdcaf934d440ab433f06 Mon Sep 17 00:00:00 2001 From: appleguy Date: Sat, 16 Jul 2016 15:31:51 -0700 Subject: [PATCH 171/247] [ASDisplayNode] Short circuit measure calls that have a zero-area constrainedSize. (#1939) * [ASDisplayNode] Short circuit measure calls that have a zero-area constrainedSize. // If the constrainedSize is completely zero-area, then there is no possibility for layout calculations to be successful. // This also avoids the issue of an inset being applied to 0, creating negative frame values. * [ASDisplayNode] Fix to shouldMeasure change. * One more fix. --- AsyncDisplayKit/ASDisplayNode.mm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index a29775555d..89068abce5 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -664,6 +664,12 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) return NO; } + // If the constrainedSize is completely zero-area, then there is no possibility for layout calculations to be successful. + // This also avoids the issue of an inset being applied to 0, creating negative frame values. + if (constrainedSize.min.width * constrainedSize.min.height == 0.0 && constrainedSize.max.width * constrainedSize.max.height == 0.0) { + return NO; + } + if (ASHierarchyStateIncludesLayoutPending(_hierarchyState)) { ASLayoutableContext context = ASLayoutableGetCurrentContext(); if (ASLayoutableContextIsNull(context) || _pendingTransitionID != context.transitionID) { From 74bf376b2fad7450512d94d857b2f5f5e6adcf01 Mon Sep 17 00:00:00 2001 From: appleguy Date: Sat, 16 Jul 2016 15:32:13 -0700 Subject: [PATCH 172/247] [ASDisplayNode] Rename _propertyLock to __instanceLock__ to avoid subclass naming collisions. (#1941) --- AsyncDisplayKit/ASButtonNode.mm | 42 ++-- AsyncDisplayKit/ASCellNode.mm | 2 +- AsyncDisplayKit/ASDisplayNode.mm | 190 +++++++++--------- AsyncDisplayKit/ASImageNode.mm | 36 ++-- AsyncDisplayKit/ASMapNode.mm | 20 +- AsyncDisplayKit/ASMultiplexImageNode.mm | 8 +- AsyncDisplayKit/ASNetworkImageNode.mm | 54 ++--- AsyncDisplayKit/ASTextNode.mm | 90 ++++----- AsyncDisplayKit/ASVideoNode.mm | 58 +++--- AsyncDisplayKit/ASVideoPlayerNode.mm | 12 +- .../Details/ASBasicImageDownloader.mm | 16 +- AsyncDisplayKit/Details/ASBatchContext.mm | 12 +- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 4 +- AsyncDisplayKit/Layout/ASStackLayoutSpec.mm | 6 +- .../Private/ASDisplayNode+AsyncDisplay.mm | 14 +- .../Private/ASDisplayNode+UIViewBridge.mm | 6 +- .../Private/ASDisplayNodeInternal.h | 2 +- AsyncDisplayKit/Private/ASLayoutTransition.mm | 20 +- 18 files changed, 296 insertions(+), 296 deletions(-) diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 47bdc4ef21..f1f40a33cc 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -19,7 +19,7 @@ @interface ASButtonNode () { - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; NSAttributedString *_normalAttributedTitle; NSAttributedString *_highlightedAttributedTitle; @@ -147,7 +147,7 @@ - (void)updateImage { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); UIImage *newImage; if (self.enabled == NO && _disabledImage) { @@ -170,7 +170,7 @@ - (void)updateTitle { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); NSAttributedString *newTitle; if (self.enabled == NO && _disabledAttributedTitle) { newTitle = _disabledAttributedTitle; @@ -193,7 +193,7 @@ - (void)updateBackgroundImage { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); UIImage *newImage; if (self.enabled == NO && _disabledBackgroundImage) { @@ -216,13 +216,13 @@ - (CGFloat)contentSpacing { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _contentSpacing; } - (void)setContentSpacing:(CGFloat)contentSpacing { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (contentSpacing == _contentSpacing) return; @@ -232,13 +232,13 @@ - (BOOL)laysOutHorizontally { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _laysOutHorizontally; } - (void)setLaysOutHorizontally:(BOOL)laysOutHorizontally { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (laysOutHorizontally == _laysOutHorizontally) return; @@ -248,37 +248,37 @@ - (ASVerticalAlignment)contentVerticalAlignment { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _contentVerticalAlignment; } - (void)setContentVerticalAlignment:(ASVerticalAlignment)contentVerticalAlignment { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _contentVerticalAlignment = contentVerticalAlignment; } - (ASHorizontalAlignment)contentHorizontalAlignment { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _contentHorizontalAlignment; } - (void)setContentHorizontalAlignment:(ASHorizontalAlignment)contentHorizontalAlignment { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _contentHorizontalAlignment = contentHorizontalAlignment; } - (UIEdgeInsets)contentEdgeInsets { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _contentEdgeInsets; } - (void)setContentEdgeInsets:(UIEdgeInsets)contentEdgeInsets { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _contentEdgeInsets = contentEdgeInsets; } @@ -299,7 +299,7 @@ - (NSAttributedString *)attributedTitleForState:(ASControlState)state { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); switch (state) { case ASControlStateNormal: return _normalAttributedTitle; @@ -323,7 +323,7 @@ - (void)setAttributedTitle:(NSAttributedString *)title forState:(ASControlState)state { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); switch (state) { case ASControlStateNormal: _normalAttributedTitle = [title copy]; @@ -354,7 +354,7 @@ - (UIImage *)imageForState:(ASControlState)state { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); switch (state) { case ASControlStateNormal: return _normalImage; @@ -378,7 +378,7 @@ - (void)setImage:(UIImage *)image forState:(ASControlState)state { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); switch (state) { case ASControlStateNormal: _normalImage = image; @@ -408,7 +408,7 @@ - (UIImage *)backgroundImageForState:(ASControlState)state { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); switch (state) { case ASControlStateNormal: return _normalBackgroundImage; @@ -432,7 +432,7 @@ - (void)setBackgroundImage:(UIImage *)image forState:(ASControlState)state { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); switch (state) { case ASControlStateNormal: _normalBackgroundImage = image; @@ -466,7 +466,7 @@ ASLayoutSpec *spec; ASStackLayoutSpec *stack = [[ASStackLayoutSpec alloc] init]; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); stack.direction = _laysOutHorizontally ? ASStackLayoutDirectionHorizontal : ASStackLayoutDirectionVertical; stack.spacing = _contentSpacing; stack.horizontalAlignment = _contentHorizontalAlignment; diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index f9db96452c..e29a469d2c 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -129,7 +129,7 @@ //Adding this lock because lock used to be held when this method was called. Not sure if it's necessary for //didRelayoutFromOldSize:toNewSize: - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self didRelayoutFromOldSize:oldSize toNewSize:self.calculatedSize]; } diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 89068abce5..4087836ea3 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -103,7 +103,7 @@ BOOL ASDisplayNodeNeedsSpecialPropertiesHandlingForFlags(ASDisplayNodeFlags flag _ASPendingState *ASDisplayNodeGetPendingState(ASDisplayNode *node) { - ASDN::MutexLocker l(node->_propertyLock); + ASDN::MutexLocker l(node->__instanceLock__); _ASPendingState *result = node->_pendingViewState; if (result == nil) { result = [[_ASPendingState alloc] init]; @@ -401,7 +401,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { ASDisplayNodeAssertThreadAffinity(self); ASDisplayNodeAssert([self isNodeLoaded], @"Implementation shouldn't call __unloadNode if not loaded: %@", self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_flags.layerBacked) _pendingViewState = [_ASPendingState pendingViewStateFromLayer:_layer]; @@ -434,7 +434,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (UIView *)_viewToLoad { UIView *view; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_viewBlock) { view = _viewBlock(); @@ -464,7 +464,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (CALayer *)_layerToLoad { CALayer *layer; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(_flags.layerBacked, @"_layerToLoad is only for layer-backed nodes"); if (_layerBlock) { @@ -485,7 +485,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)_loadViewOrLayerIsLayerBacked:(BOOL)isLayerBacked { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (self._isDeallocating) { return; @@ -559,7 +559,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) // Returns nil if the layer is not an _ASDisplayLayer; will not create the layer if nil. - (_ASDisplayLayer *)asyncLayer { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return [_layer isKindOfClass:[_ASDisplayLayer class]] ? (_ASDisplayLayer *)_layer : nil; } @@ -570,20 +570,20 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) // where the state of this property can change. As an optimization, we can avoid locking. return (_view != nil || (_layer != nil && _flags.layerBacked)); } else { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return (_view != nil || (_layer != nil && _flags.layerBacked)); } } - (NSString *)name { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _name; } - (void)setName:(NSString *)name { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!ASObjectIsEqual(_name, name)) { _name = [name copy]; } @@ -603,7 +603,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { if (![self.class layerBackedNodesEnabled]) return; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(!_view && !_layer, @"Cannot change isLayerBacked after layer or view has loaded"); ASDisplayNodeAssert(!_viewBlock && !_layerBlock, @"Cannot change isLayerBacked when a layer or view block is provided"); ASDisplayNodeAssert(!_viewClass && !_layerClass, @"Cannot change isLayerBacked when a layer or view class is provided"); @@ -615,7 +615,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (BOOL)isLayerBacked { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _flags.layerBacked; } @@ -628,7 +628,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (! [self shouldMeasureWithSizeRange:constrainedSize]) { return _layout; } @@ -659,7 +659,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (BOOL)shouldMeasureWithSizeRange:(ASSizeRange)constrainedSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (![self __shouldSize]) { return NO; } @@ -727,7 +727,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(ASHierarchyStateIncludesLayoutPending(_hierarchyState) == NO, @"Can't start a transition when one of the supernodes is performing one."); } @@ -748,7 +748,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { ASLayoutableSetCurrentContext(ASLayoutableContextMake(transitionID, NO)); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); BOOL disableImplicitHierarchyManagement = self.usesImplicitHierarchyManagement == NO; self.usesImplicitHierarchyManagement = YES; // Temporary flag for 1.9.x newLayout = [self calculateLayoutThatFits:constrainedSize]; @@ -764,9 +764,9 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } ASPerformBlockOnMainThread(^{ - // Grab _propertyLock here to make sure this transition isn't invalidated + // Grab __instanceLock__ here to make sure this transition isn't invalidated // right after it passed the validation test and before it proceeds - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if ([self _shouldAbortTransitionWithID:transitionID]) { return; @@ -804,7 +804,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)_completeLayoutCalculation { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self calculatedLayoutDidChange]; // We generate placeholders at measureWithSizeRange: time so that a node is guaranteed to have a placeholder ready to go. @@ -831,7 +831,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)cancelLayoutTransitionsInProgress { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if ([self _isTransitionInProgress]) { // Cancel transition in progress [self _finishOrCancelTransition]; @@ -845,26 +845,26 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (BOOL)usesImplicitHierarchyManagement { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _usesImplicitHierarchyManagement ? : [[self class] usesImplicitHierarchyManagement]; } - (void)setUsesImplicitHierarchyManagement:(BOOL)value { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _usesImplicitHierarchyManagement = value; } - (BOOL)_isTransitionInProgress { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _transitionInProgress; } /// Starts a new transition and returns the transition id - (int32_t)_startNewTransition { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _transitionInProgress = YES; _transitionID = OSAtomicAdd32(1, &_transitionID); return _transitionID; @@ -872,13 +872,13 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)_finishOrCancelTransition { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _transitionInProgress = NO; } - (BOOL)_shouldAbortTransitionWithID:(int32_t)transitionID { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return (!_transitionInProgress || _transitionID != transitionID); } @@ -907,13 +907,13 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (BOOL)displaysAsynchronously { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return [self _displaysAsynchronously]; } /** * Core implementation of -displaysAsynchronously. - * Must be called with _propertyLock held. + * Must be called with __instanceLock__ held. */ - (BOOL)_displaysAsynchronously { @@ -929,7 +929,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) if (_flags.synchronous) return; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_flags.displaysAsynchronously == displaysAsynchronously) return; @@ -941,7 +941,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (BOOL)shouldRasterizeDescendants { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(!((_hierarchyState & ASHierarchyStateRasterized) && _flags.shouldRasterizeDescendants), @"Subnode of a rasterized node should not have redundant shouldRasterizeDescendants enabled"); return _flags.shouldRasterizeDescendants; @@ -951,7 +951,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { ASDisplayNodeAssertThreadAffinity(self); { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_flags.shouldRasterizeDescendants == shouldRasterize) return; @@ -1000,7 +1000,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (CGFloat)contentsScaleForDisplay { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _contentsScaleForDisplay; } @@ -1008,7 +1008,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)setContentsScaleForDisplay:(CGFloat)contentsScaleForDisplay { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_contentsScaleForDisplay == contentsScaleForDisplay) return; @@ -1019,7 +1019,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)applyPendingViewState { ASDisplayNodeAssertMainThread(); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); // FIXME: Ideally we'd call this as soon as the node receives -setNeedsLayout // but implicit hierarchy management would require us to modify the node tree @@ -1048,7 +1048,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)recursivelyDisplayImmediately { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); for (ASDisplayNode *child in _subnodes) { [child recursivelyDisplayImmediately]; @@ -1060,11 +1060,11 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { ASDisplayNodeAssertThreadAffinity(self); - _propertyLock.lock(); + __instanceLock__.lock(); if (_layout == nil) { // Can't proceed without a layout as no constrained size would be available - _propertyLock.unlock(); + __instanceLock__.unlock(); return; } @@ -1072,7 +1072,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) if (_supernode) { ASDisplayNode *supernode = _supernode; - _propertyLock.unlock(); + __instanceLock__.unlock(); // Cause supernode's layout to be invalidated // We need to release the lock to prevent a deadlock [supernode setNeedsLayout]; @@ -1098,7 +1098,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) self.position = CGPointMake(oldPosition.x + xDelta, oldPosition.y + yDelta); } - _propertyLock.unlock(); + __instanceLock__.unlock(); } - (void)__setNeedsDisplay @@ -1116,7 +1116,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)__layout { ASDisplayNodeAssertMainThread(); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); CGRect bounds = self.bounds; [self measureNodeWithBoundsIfNecessary:bounds]; @@ -1145,7 +1145,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) BOOL hasDirtyLayout = NO; BOOL hasSupernode = NO; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); supportsRangedManagedInterfaceState = [self supportsRangeManagedInterfaceState]; hasDirtyLayout = [self _hasDirtyLayout]; hasSupernode = (self.supernode != nil); @@ -1323,7 +1323,7 @@ static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASD - (void)addSubnode:(ASDisplayNode *)subnode { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNode *oldParent = subnode.supernode; if (!subnode || subnode == self || oldParent == self) @@ -1363,7 +1363,7 @@ static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASD /* Private helper function. - You must hold _propertyLock to call this. + You must hold __instanceLock__ to call this. @param subnode The subnode to insert @param subnodeIndex The index in _subnodes to insert it @@ -1422,7 +1422,7 @@ static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASD - (void)replaceSubnode:(ASDisplayNode *)oldSubnode withSubnode:(ASDisplayNode *)replacementSubnode { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!replacementSubnode || [oldSubnode _deallocSafeSupernode] != self) { ASDisplayNodeAssert(0, @"Bad use of api. Invalid subnode to replace async."); @@ -1452,7 +1452,7 @@ static NSInteger incrementIfFound(NSInteger i) { - (void)insertSubnode:(ASDisplayNode *)subnode belowSubnode:(ASDisplayNode *)below { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode"); if (!subnode) @@ -1495,7 +1495,7 @@ static NSInteger incrementIfFound(NSInteger i) { - (void)insertSubnode:(ASDisplayNode *)subnode aboveSubnode:(ASDisplayNode *)above { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode"); if (!subnode) @@ -1541,7 +1541,7 @@ static NSInteger incrementIfFound(NSInteger i) { - (void)insertSubnode:(ASDisplayNode *)subnode atIndex:(NSInteger)idx { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (idx > _subnodes.count || idx < 0) { NSString *reason = [NSString stringWithFormat:@"Cannot insert a subnode at index %zd. Count is %zd", idx, _subnodes.count]; @@ -1591,7 +1591,7 @@ static NSInteger incrementIfFound(NSInteger i) { - (void)_removeSubnode:(ASDisplayNode *)subnode { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); // Don't call self.supernode here because that will retain/autorelease the supernode. This method -_removeSupernode: is often called while tearing down a node hierarchy, and the supernode in question might be in the middle of its -dealloc. The supernode is never messaged, only compared by value, so this is safe. // The particular issue that triggers this edge case is when a node calls -removeFromSupernode on a subnode from within its own -dealloc method. @@ -1607,13 +1607,13 @@ static NSInteger incrementIfFound(NSInteger i) { - (void)removeFromSupernode { ASDisplayNodeAssertThreadAffinity(self); - _propertyLock.lock(); + __instanceLock__.lock(); __weak ASDisplayNode *supernode = _supernode; __weak UIView *view = _view; __weak CALayer *layer = _layer; BOOL layerBacked = _flags.layerBacked; BOOL isNodeLoaded = (layer != nil || view != nil); - _propertyLock.unlock(); + __instanceLock__.unlock(); // Clear supernode's reference to us before removing the view from the hierarchy, as _ASDisplayView // will trigger us to clear our _supernode pointer in willMoveToSuperview:nil. @@ -1634,19 +1634,19 @@ static NSInteger incrementIfFound(NSInteger i) { - (BOOL)__visibilityNotificationsDisabled { // Currently, this method is only used by the testing infrastructure to verify this internal feature. - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _flags.visibilityNotificationsDisabled > 0; } - (BOOL)__selfOrParentHasVisibilityNotificationsDisabled { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return (_hierarchyState & ASHierarchyStateTransitioningSupernodes); } - (void)__incrementVisibilityNotificationsDisabled { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); const size_t maxVisibilityIncrement = (1ULL< 0, @"Can't decrement past 0"); if (_flags.visibilityNotificationsDisabled > 0) { _flags.visibilityNotificationsDisabled--; @@ -1681,7 +1681,7 @@ static NSInteger incrementIfFound(NSInteger i) { ASDisplayNodeAssert(!_flags.isEnteringHierarchy, @"Should not cause recursive __enterHierarchy"); // Profiling has shown that locking this method is beneficial, so each of the property accesses don't have to lock and unlock. - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!_flags.isInHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { _flags.isEnteringHierarchy = YES; @@ -1719,7 +1719,7 @@ static NSInteger incrementIfFound(NSInteger i) { ASDisplayNodeAssert(!_flags.isExitingHierarchy, @"Should not cause recursive __exitHierarchy"); // Profiling has shown that locking this method is beneficial, so each of the property accesses don't have to lock and unlock. - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_flags.isInHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { _flags.isExitingHierarchy = YES; @@ -1770,20 +1770,20 @@ static NSInteger incrementIfFound(NSInteger i) { - (NSArray *)subnodes { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return [_subnodes copy]; } - (ASDisplayNode *)supernode { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _supernode; } // This is a thread-method to return the supernode without causing it to be retained autoreleased. See -_removeSubnode: for details. - (ASDisplayNode *)_deallocSafeSupernode { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _supernode; } @@ -1792,7 +1792,7 @@ static NSInteger incrementIfFound(NSInteger i) { BOOL supernodeDidChange = NO; ASDisplayNode *oldSupernode = nil; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_supernode != newSupernode) { oldSupernode = _supernode; // Access supernode properties outside of lock to avoid remote chance of deadlock, // in case supernode implementation must access one of our properties. @@ -1998,7 +1998,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) { __ASDisplayNodeCheckForLayoutMethodOverrides; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if ((_methodOverrides & ASDisplayNodeMethodOverrideLayoutSpecThatFits) || _layoutSpecBlock != NULL) { ASLayoutSpec *layoutSpec = [self layoutSpecThatFits:constrainedSize]; layoutSpec.parent = self; // This causes upward propogation of any non-default layoutable values. @@ -2032,7 +2032,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) { __ASDisplayNodeCheckForLayoutMethodOverrides; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _preferredFrameSize; } @@ -2040,7 +2040,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) { __ASDisplayNodeCheckForLayoutMethodOverrides; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_layoutSpecBlock != NULL) { return _layoutSpecBlock(self, constrainedSize); @@ -2051,19 +2051,19 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (ASLayout *)calculatedLayout { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _layout; } - (CGSize)calculatedSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _layout.size; } - (ASSizeRange)constrainedSizeForCalculatedLayout { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _layout.constrainedSizeRange; } @@ -2077,14 +2077,14 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)setPendingTransitionID:(int32_t)pendingTransitionID { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssertTrue(_pendingTransitionID < pendingTransitionID); _pendingTransitionID = pendingTransitionID; } - (void)setPreferredFrameSize:(CGSize)preferredFrameSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (! CGSizeEqualToSize(_preferredFrameSize, preferredFrameSize)) { _preferredFrameSize = preferredFrameSize; self.sizeRange = ASRelativeSizeRangeMakeWithExactCGSize(_preferredFrameSize); @@ -2094,19 +2094,19 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (CGSize)preferredFrameSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _preferredFrameSize; } - (CGRect)threadSafeBounds { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _threadSafeBounds; } - (void)setThreadSafeBounds:(CGRect)newBounds { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _threadSafeBounds = newBounds; } @@ -2117,7 +2117,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)invalidateCalculatedLayout { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); // This will cause the next call to -measureWithSizeRange: to actually compute a new layout // instead of returning the current layout @@ -2126,7 +2126,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)__didLoad { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_nodeLoadedBlock) { _nodeLoadedBlock(self); _nodeLoadedBlock = nil; @@ -2171,7 +2171,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) if (ASInterfaceStateIncludesVisible(_interfaceState)) { dispatch_async(dispatch_get_main_queue(), ^{ // This block intentionally retains self. - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!_flags.isInHierarchy && ASInterfaceStateIncludesVisible(_interfaceState)) { self.interfaceState = (_interfaceState & ~ASInterfaceStateVisible); } @@ -2262,7 +2262,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (ASInterfaceState)interfaceState { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _interfaceState; } @@ -2272,7 +2272,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) ASDisplayNodeAssertFalse(ASInterfaceStateIncludesVisible(newState) && !ASInterfaceStateIncludesDisplay(newState)); ASInterfaceState oldState = ASInterfaceStateNone; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_interfaceState == newState) { return; } @@ -2317,7 +2317,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) [self setDisplaySuspended:YES]; //schedule clear contents on next runloop dispatch_async(dispatch_get_main_queue(), ^{ - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASInterfaceStateIncludesDisplay(_interfaceState) == NO) { [self clearContents]; } @@ -2335,7 +2335,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) [[self asyncLayer] cancelAsyncDisplay]; //schedule clear contents on next runloop dispatch_async(dispatch_get_main_queue(), ^{ - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASInterfaceStateIncludesDisplay(_interfaceState) == NO) { [self clearContents]; } @@ -2409,7 +2409,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (ASHierarchyState)hierarchyState { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _hierarchyState; } @@ -2417,7 +2417,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) { ASHierarchyState oldState = ASHierarchyStateNormal; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_hierarchyState == newState) { return; } @@ -2444,7 +2444,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) } else { // Leaving layout pending state, reset related properties { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _pendingTransitionID = ASLayoutableContextInvalidTransitionID; _pendingLayoutTransition = nil; } @@ -2478,7 +2478,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)_applyPendingLayoutContext { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_pendingLayoutTransition) { [self _applyLayout:_pendingLayoutTransition.pendingLayout layoutTransition:_pendingLayoutTransition]; _pendingLayoutTransition = nil; @@ -2487,7 +2487,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)_applyLayout:(ASLayout *)layout layoutTransition:(ASLayoutTransition *)layoutTransition { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _layout = layout; ASDisplayNodeAssertTrue(layout.layoutableObject == self); @@ -2543,7 +2543,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)setNeedsDisplayAtScale:(CGFloat)contentsScale { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (contentsScale != self.contentsScaleForDisplay) { self.contentsScaleForDisplay = contentsScale; [self setNeedsDisplay]; @@ -2604,14 +2604,14 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)setHitTestSlop:(UIEdgeInsets)hitTestSlop { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _hitTestSlop = hitTestSlop; } - (UIEdgeInsets)hitTestSlop { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _hitTestSlop; } @@ -2637,7 +2637,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) // If no view/layer properties were set before the view/layer were created, _pendingViewState will be nil and the default values // for the view/layer are still valid. - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self applyPendingViewState]; @@ -2715,7 +2715,7 @@ static void _recursivelySetDisplaySuspended(ASDisplayNode *node, CALayer *layer, - (BOOL)displaySuspended { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _flags.displaySuspended; } @@ -2727,7 +2727,7 @@ static void _recursivelySetDisplaySuspended(ASDisplayNode *node, CALayer *layer, if (_flags.synchronous) return; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_flags.displaySuspended == flag) return; @@ -2751,14 +2751,14 @@ static void _recursivelySetDisplaySuspended(ASDisplayNode *node, CALayer *layer, - (BOOL)shouldAnimateSizeChanges { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _flags.shouldAnimateSizeChanges; } - (void)setShouldAnimateSizeChanges:(BOOL)shouldAnimateSizeChanges { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _flags.shouldAnimateSizeChanges = shouldAnimateSizeChanges; } @@ -2767,7 +2767,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (void)setDrawingPriority:(NSInteger)drawingPriority { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (drawingPriority == ASDefaultDrawingPriority) { _flags.hasCustomDrawingPriority = NO; objc_setAssociatedObject(self, ASDisplayNodeDrawingPriorityKey, nil, OBJC_ASSOCIATION_ASSIGN); @@ -2780,7 +2780,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; - (NSInteger)drawingPriority { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!_flags.hasCustomDrawingPriority) return ASDefaultDrawingPriority; else @@ -2791,7 +2791,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _flags.isInHierarchy; } @@ -2799,7 +2799,7 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; { ASDisplayNodeAssertThreadAffinity(self); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _flags.isInHierarchy = inHierarchy; } @@ -2864,7 +2864,7 @@ ASEnvironmentLayoutExtensibilityForwarding - (ASTraitCollection *)asyncTraitCollection { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return [ASTraitCollection traitCollectionWithASEnvironmentTraitCollection:self.environmentTraitCollection]; } diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index 9704cfe8ef..73691bcde9 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -118,7 +118,7 @@ struct ASImageNodeDrawParameters { - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); // if a preferredFrameSize is set, call the superclass to return that instead of using the image size. if (CGSizeEqualToSize(self.preferredFrameSize, CGSizeZero) == NO) return [super calculateSizeThatFits:constrainedSize]; @@ -132,7 +132,7 @@ struct ASImageNodeDrawParameters { - (void)setImage:(UIImage *)image { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!ASObjectIsEqual(_image, image)) { _image = image; @@ -155,7 +155,7 @@ struct ASImageNodeDrawParameters { - (UIImage *)image { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _image; } @@ -171,7 +171,7 @@ struct ASImageNodeDrawParameters { - (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _drawParameter = { .bounds = self.bounds, @@ -216,7 +216,7 @@ struct ASImageNodeDrawParameters { asimagenode_modification_block_t imageModificationBlock; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASImageNodeDrawParameters drawParameter = _drawParameter; drawParameterBounds = drawParameter.bounds; @@ -351,19 +351,19 @@ struct ASImageNodeDrawParameters { { [super displayDidFinish]; - _propertyLock.lock(); + __instanceLock__.lock(); void (^displayCompletionBlock)(BOOL canceled) = _displayCompletionBlock; UIImage *image = _image; - _propertyLock.unlock(); + __instanceLock__.unlock(); // If we've got a block to perform after displaying, do it. if (image && displayCompletionBlock) { displayCompletionBlock(NO); - _propertyLock.lock(); + __instanceLock__.lock(); _displayCompletionBlock = nil; - _propertyLock.unlock(); + __instanceLock__.unlock(); } } @@ -376,7 +376,7 @@ struct ASImageNodeDrawParameters { } // Stash the block and call-site queue. We'll invoke it in -displayDidFinish. - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_displayCompletionBlock != displayCompletionBlock) { _displayCompletionBlock = [displayCompletionBlock copy]; } @@ -388,7 +388,7 @@ struct ASImageNodeDrawParameters { - (BOOL)isCropEnabled { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _cropEnabled; } @@ -399,7 +399,7 @@ struct ASImageNodeDrawParameters { - (void)setCropEnabled:(BOOL)cropEnabled recropImmediately:(BOOL)recropImmediately inBounds:(CGRect)cropBounds { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_cropEnabled == cropEnabled) return; @@ -420,13 +420,13 @@ struct ASImageNodeDrawParameters { - (CGRect)cropRect { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _cropRect; } - (void)setCropRect:(CGRect)cropRect { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (CGRectEqualToRect(_cropRect, cropRect)) return; @@ -447,25 +447,25 @@ struct ASImageNodeDrawParameters { - (BOOL)forceUpscaling { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _forceUpscaling; } - (void)setForceUpscaling:(BOOL)forceUpscaling { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _forceUpscaling = forceUpscaling; } - (asimagenode_modification_block_t)imageModificationBlock { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _imageModificationBlock; } - (void)setImageModificationBlock:(asimagenode_modification_block_t)imageModificationBlock { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _imageModificationBlock = imageModificationBlock; } diff --git a/AsyncDisplayKit/ASMapNode.mm b/AsyncDisplayKit/ASMapNode.mm index dc2397aac1..c0d7fb9a25 100644 --- a/AsyncDisplayKit/ASMapNode.mm +++ b/AsyncDisplayKit/ASMapNode.mm @@ -95,14 +95,14 @@ - (BOOL)isLiveMap { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _liveMap; } - (void)setLiveMap:(BOOL)liveMap { ASDisplayNodeAssert(!self.isLayerBacked, @"ASMapNode can not use the interactive map feature whilst .isLayerBacked = YES, set .layerBacked = NO to use the interactive map feature."); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (liveMap == _liveMap) { return; } @@ -114,19 +114,19 @@ - (BOOL)needsMapReloadOnBoundsChange { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _needsMapReloadOnBoundsChange; } - (void)setNeedsMapReloadOnBoundsChange:(BOOL)needsMapReloadOnBoundsChange { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _needsMapReloadOnBoundsChange = needsMapReloadOnBoundsChange; } - (MKMapSnapshotOptions *)options { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!_options) { _options = [[MKMapSnapshotOptions alloc] init]; _options.region = MKCoordinateRegionForMapRect(MKMapRectWorld); @@ -140,7 +140,7 @@ - (void)setOptions:(MKMapSnapshotOptions *)options { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!_options || ![options isEqual:_options]) { _options = options; if (self.isLiveMap) { @@ -282,7 +282,7 @@ - (NSArray *)annotations { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _annotations; } @@ -290,7 +290,7 @@ { annotations = [annotations copy] ? : @[]; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _annotations = annotations; ASMapNodeShowAnnotationsOptions showAnnotationsOptions = self.showAnnotationsOptions; if (self.isLiveMap) { @@ -335,12 +335,12 @@ } -(ASMapNodeShowAnnotationsOptions)showAnnotationsOptions { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _showAnnotationsOptions; } -(void)setShowAnnotationsOptions:(ASMapNodeShowAnnotationsOptions)showAnnotationsOptions { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _showAnnotationsOptions = showAnnotationsOptions; } diff --git a/AsyncDisplayKit/ASMultiplexImageNode.mm b/AsyncDisplayKit/ASMultiplexImageNode.mm index 9042f18870..6d1e2a6c86 100644 --- a/AsyncDisplayKit/ASMultiplexImageNode.mm +++ b/AsyncDisplayKit/ASMultiplexImageNode.mm @@ -84,7 +84,7 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent id _downloadIdentifier; // Properties - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; BOOL _shouldRenderProgressImages; //set on init only @@ -346,7 +346,7 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent - (void)setShouldRenderProgressImages:(BOOL)shouldRenderProgressImages { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (shouldRenderProgressImages == _shouldRenderProgressImages) { return; } @@ -354,13 +354,13 @@ typedef void(^ASMultiplexImageLoadCompletionBlock)(UIImage *image, id imageIdent _shouldRenderProgressImages = shouldRenderProgressImages; - ASDN::MutexUnlocker u(_propertyLock); + ASDN::MutexUnlocker u(__instanceLock__); [self _updateProgressImageBlockOnDownloaderIfNeeded]; } - (BOOL)shouldRenderProgressImages { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _shouldRenderProgressImages; } diff --git a/AsyncDisplayKit/ASNetworkImageNode.mm b/AsyncDisplayKit/ASNetworkImageNode.mm index 67696883a1..432c50b5ff 100755 --- a/AsyncDisplayKit/ASNetworkImageNode.mm +++ b/AsyncDisplayKit/ASNetworkImageNode.mm @@ -30,7 +30,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; __weak id _cache; __weak id _downloader; - // Only access any of these with _propertyLock. + // Only access any of these with __instanceLock__. __weak id _delegate; NSURL *_URL; @@ -121,7 +121,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (void)setURL:(NSURL *)URL resetToDefault:(BOOL)reset { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASObjectIsEqual(URL, _URL)) { return; @@ -150,13 +150,13 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (NSURL *)URL { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _URL; } - (void)setDefaultImage:(UIImage *)defaultImage { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASObjectIsEqual(defaultImage, _defaultImage)) { return; @@ -177,37 +177,37 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (UIImage *)defaultImage { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _defaultImage; } - (void)setCurrentImageQuality:(CGFloat)currentImageQuality { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _currentImageQuality = currentImageQuality; } - (CGFloat)currentImageQuality { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _currentImageQuality; } - (void)setRenderedImageQuality:(CGFloat)renderedImageQuality { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _renderedImageQuality = renderedImageQuality; } - (CGFloat)renderedImageQuality { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _renderedImageQuality; } - (void)setDelegate:(id)delegate { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _delegate = delegate; _delegateFlags.delegateDidStartFetchingData = [delegate respondsToSelector:@selector(imageNodeDidStartFetchingData:)]; @@ -218,13 +218,13 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (id)delegate { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _delegate; } - (void)setShouldRenderProgressImages:(BOOL)shouldRenderProgressImages { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (shouldRenderProgressImages == _shouldRenderProgressImages) { return; } @@ -232,19 +232,19 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; _shouldRenderProgressImages = shouldRenderProgressImages; - ASDN::MutexUnlocker u(_propertyLock); + ASDN::MutexUnlocker u(__instanceLock__); [self _updateProgressImageBlockOnDownloaderIfNeeded]; } - (BOOL)shouldRenderProgressImages { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _shouldRenderProgressImages; } - (BOOL)placeholderShouldPersist { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return (self.image == nil && _URL != nil); } @@ -255,7 +255,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super displayWillStart]; if (_cacheFlags.cacheSupportsSynchronousFetch) { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_imageLoaded == NO && _URL && _downloadIdentifier == nil) { UIImage *result = [[_cache synchronouslyFetchedCachedImageWithURL:_URL] asdk_image]; if (result) { @@ -272,7 +272,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [self fetchData]; if (self.image == nil && _downloaderFlags.downloaderImplementsSetPriority) { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_downloadIdentifier != nil) { [_downloader setPriority:ASImageDownloaderPriorityImminent withDownloadIdentifier:_downloadIdentifier]; } @@ -286,7 +286,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super visibleStateDidChange:isVisible]; if (_downloaderFlags.downloaderImplementsSetPriority) { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_downloadIdentifier != nil) { if (isVisible) { [_downloader setPriority:ASImageDownloaderPriorityVisible withDownloadIdentifier:_downloadIdentifier]; @@ -304,7 +304,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super clearFetchedData]; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self _cancelImageDownload]; [self _clearImage]; @@ -319,7 +319,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; [super fetchData]; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self _lazilyLoadImageIfNecessary]; } } @@ -328,7 +328,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; - (void)_updateProgressImageBlockOnDownloaderIfNeeded { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); BOOL shouldRenderProgressImages = _shouldRenderProgressImages; ASInterfaceState interfaceState = self.interfaceState; @@ -346,7 +346,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; return; } - ASDN::MutexLocker l(strongSelf->_propertyLock); + ASDN::MutexLocker l(strongSelf->__instanceLock__); //Getting a result back for a different download identifier, download must not have been successfully canceled if (ASObjectIsEqual(strongSelf->_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) { return; @@ -402,7 +402,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; { ASPerformBlockOnBackgroundThread(^{ - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_downloaderFlags.downloaderSupportsNewProtocol) { _downloadIdentifier = [_downloader downloadImageWithURL:_URL callbackQueue:dispatch_get_main_queue() @@ -436,7 +436,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; // FIXME: We should revisit locking in this method (e.g. to access the instance variables at the top, and holding lock while calling delegate) if (!_imageLoaded && _URL != nil && _downloadIdentifier == nil) { { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_delegateFlags.delegateDidStartFetchingData) { [_delegate imageNodeDidStartFetchingData:self]; } @@ -444,7 +444,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; if (_URL.isFileURL) { { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); dispatch_async(dispatch_get_main_queue(), ^{ if (self.shouldCacheImage) { @@ -502,7 +502,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; return; } - ASDN::MutexLocker l(strongSelf->_propertyLock); + ASDN::MutexLocker l(strongSelf->__instanceLock__); //Getting a result back for a different download identifier, download must not have been successfully canceled if (ASObjectIsEqual(strongSelf->_downloadIdentifier, downloadIdentifier) == NO && downloadIdentifier != nil) { @@ -579,7 +579,7 @@ static const CGSize kMinReleaseImageOnBackgroundSize = {20.0, 20.0}; { [super displayDidFinish]; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_delegateFlags.delegateDidFinishDecoding && self.layer.contents != nil) { /* We store the image quality in _currentImageQuality whenever _image is set. On the following displayDidFinish, we'll know that _currentImageQuality is the quality of the image that has just finished rendering. In order for this to be accurate, we diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index a7368abf25..999028d618 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -151,7 +151,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (NSString *)description { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); NSString *plainString = [[_attributedText string] stringByTrimmingCharactersInSet:[NSCharacterSet newlineCharacterSet]]; NSString *truncationString = [_composedTruncationText string]; @@ -220,7 +220,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (ASTextKitRenderer *)_rendererWithBounds:(CGRect)bounds { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_renderer == nil) { CGSize constrainedSize = _constrainedSize.width != -INFINITY ? _constrainedSize : bounds.size; @@ -232,7 +232,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (ASTextKitAttributes)_rendererAttributes { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return { .attributedString = _attributedText, @@ -259,7 +259,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // so our previous layout information is invalid, and TextKit may draw at the // incorrect origin. { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _constrainedSize = CGSizeMake(-INFINITY, -INFINITY); } [self _invalidateRenderer]; @@ -268,7 +268,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)_invalidateRenderer { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_renderer) { // Destruction of the layout managers/containers/text storage is quite @@ -287,7 +287,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (BOOL)_needInvalidateRendererForBoundsSize:(CGSize)boundsSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_renderer == nil) { return YES; @@ -326,7 +326,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; ASLayout *layout = self.calculatedLayout; if (layout != nil) { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (CGSizeEqualToSize(_constrainedSize, layout.size) == NO) { _constrainedSize = layout.size; _renderer.constrainedSize = layout.size; @@ -339,7 +339,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; ASDisplayNodeAssert(constrainedSize.width >= 0, @"Constrained width for text (%f) is too narrow", constrainedSize.width); ASDisplayNodeAssert(constrainedSize.height >= 0, @"Constrained height for text (%f) is too short", constrainedSize.height); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _constrainedSize = constrainedSize; @@ -374,7 +374,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; // Don't hold textLock for too long. { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASObjectIsEqual(attributedText, _attributedText)) { return; } @@ -413,7 +413,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)setExclusionPaths:(NSArray *)exclusionPaths { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASObjectIsEqual(exclusionPaths, _exclusionPaths)) { return; @@ -427,7 +427,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (NSArray *)exclusionPaths { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _exclusionPaths; } @@ -436,7 +436,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _drawParameter = { .backgroundColor = self.backgroundColor, @@ -448,7 +448,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (void)drawRect:(CGRect)bounds withParameters:(id )p isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASTextNodeDrawParameter drawParameter = _drawParameter; CGRect drawParameterBounds = drawParameter.bounds; @@ -501,7 +501,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; { ASDisplayNodeAssertMainThread(); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASTextKitRenderer *renderer = [self _renderer]; NSRange visibleRange = renderer.firstVisibleRange; @@ -628,14 +628,14 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; - (ASTextNodeHighlightStyle)highlightStyle { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _highlightStyle; } - (void)setHighlightStyle:(ASTextNodeHighlightStyle)highlightStyle { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _highlightStyle = highlightStyle; } @@ -719,7 +719,7 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; } if (highlightTargetLayer != nil) { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); NSArray *highlightRects = [[self _renderer] rectsForTextRange:highlightRange measureOption:ASTextKitRendererMeasureOptionBlock]; NSMutableArray *converted = [NSMutableArray arrayWithCapacity:highlightRects.count]; @@ -799,7 +799,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (NSArray *)_rectsForTextRange:(NSRange)textRange measureOption:(ASTextKitRendererMeasureOption)measureOption { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); NSArray *rects = [[self _renderer] rectsForTextRange:textRange measureOption:measureOption]; NSMutableArray *adjustedRects = [NSMutableArray array]; @@ -817,7 +817,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGRect)trailingRect { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); CGRect rect = [[self _renderer] trailingRect]; return ASTextNodeAdjustRenderRectForShadowPadding(rect, self.shadowPadding); @@ -825,7 +825,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGRect)frameForTextRange:(NSRange)textRange { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); CGRect frame = [[self _renderer] frameForTextRange:textRange]; return ASTextNodeAdjustRenderRectForShadowPadding(frame, self.shadowPadding); @@ -835,7 +835,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (void)setPlaceholderColor:(UIColor *)placeholderColor { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _placeholderColor = placeholderColor; @@ -852,7 +852,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI return nil; } - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); UIGraphicsBeginImageContext(size); [self.placeholderColor setFill]; @@ -934,7 +934,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI if (inAdditionalTruncationMessage) { NSRange visibleRange = NSMakeRange(0, 0); { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); visibleRange = [self _renderer].firstVisibleRange; } NSRange truncationMessageRange = [self _additionalTruncationMessageRangeWithVisibleRange:visibleRange]; @@ -1013,14 +1013,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (BOOL)_pendingLinkTap { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return (_highlightedLinkAttributeValue != nil && ![self _pendingTruncationTap]) && _delegate != nil; } - (BOOL)_pendingTruncationTap { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return [_highlightedLinkAttributeName isEqualToString:ASTextNodeTruncationTokenAttributeName]; } @@ -1029,14 +1029,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGColorRef)shadowColor { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _shadowColor; } - (void)setShadowColor:(CGColorRef)shadowColor { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_shadowColor != shadowColor) { if (shadowColor != NULL) { @@ -1050,14 +1050,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGSize)shadowOffset { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _shadowOffset; } - (void)setShadowOffset:(CGSize)shadowOffset { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!CGSizeEqualToSize(_shadowOffset, shadowOffset)) { _shadowOffset = shadowOffset; @@ -1068,14 +1068,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGFloat)shadowOpacity { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _shadowOpacity; } - (void)setShadowOpacity:(CGFloat)shadowOpacity { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_shadowOpacity != shadowOpacity) { _shadowOpacity = shadowOpacity; @@ -1086,14 +1086,14 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (CGFloat)shadowRadius { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _shadowRadius; } - (void)setShadowRadius:(CGFloat)shadowRadius { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_shadowRadius != shadowRadius) { _shadowRadius = shadowRadius; @@ -1109,7 +1109,7 @@ static CGRect ASTextNodeAdjustRenderRectForShadowPadding(CGRect rendererRect, UI - (UIEdgeInsets)shadowPaddingWithRenderer:(ASTextKitRenderer *)renderer { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return renderer.shadower.shadowPadding; } @@ -1128,7 +1128,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setTruncationAttributedText:(NSAttributedString *)truncationAttributedText { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASObjectIsEqual(_truncationAttributedText, truncationAttributedText)) { return; @@ -1140,7 +1140,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setAdditionalTruncationMessage:(NSAttributedString *)additionalTruncationMessage { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASObjectIsEqual(_additionalTruncationMessage, additionalTruncationMessage)) { return; @@ -1152,7 +1152,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setTruncationMode:(NSLineBreakMode)truncationMode { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_truncationMode != truncationMode) { _truncationMode = truncationMode; @@ -1163,7 +1163,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (BOOL)isTruncated { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASTextKitRenderer *renderer = [self _renderer]; return renderer.firstVisibleRange.length < _attributedText.length; @@ -1171,7 +1171,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setPointSizeScaleFactors:(NSArray *)pointSizeScaleFactors { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if ([_pointSizeScaleFactors isEqualToArray:pointSizeScaleFactors] == NO) { _pointSizeScaleFactors = pointSizeScaleFactors; @@ -1181,7 +1181,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)setMaximumNumberOfLines:(NSUInteger)maximumNumberOfLines { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_maximumNumberOfLines != maximumNumberOfLines) { _maximumNumberOfLines = maximumNumberOfLines; @@ -1192,7 +1192,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (NSUInteger)lineCount { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return [[self _renderer] lineCount]; } @@ -1201,7 +1201,7 @@ static NSAttributedString *DefaultTruncationAttributedString() - (void)_updateComposedTruncationText { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _composedTruncationText = [self _prepareTruncationStringForDrawing:[self _composedTruncationText]]; } @@ -1219,7 +1219,7 @@ static NSAttributedString *DefaultTruncationAttributedString() */ - (NSRange)_additionalTruncationMessageRangeWithVisibleRange:(NSRange)visibleRange { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); // Check if we even have an additional truncation message. if (!_additionalTruncationMessage) { @@ -1242,7 +1242,7 @@ static NSAttributedString *DefaultTruncationAttributedString() */ - (NSAttributedString *)_composedTruncationText { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); //If we have neither return the default if (!_additionalTruncationMessage && !_truncationAttributedText) { @@ -1272,7 +1272,7 @@ static NSAttributedString *DefaultTruncationAttributedString() */ - (NSAttributedString *)_prepareTruncationStringForDrawing:(NSAttributedString *)truncationString { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); truncationString = ASCleanseAttributedStringOfCoreTextAttributes(truncationString); NSMutableAttributedString *truncationMutableString = [truncationString mutableCopy]; diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index c0e0accf3a..c00e518522 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -124,7 +124,7 @@ static NSString * const kStatus = @"status"; - (AVPlayerItem *)constructPlayerItem { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_asset != nil) { AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; @@ -219,7 +219,7 @@ static NSString * const kStatus = @"status"; - (CGSize)calculateSizeThatFits:(CGSize)constrainedSize { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); CGSize calculatedSize = constrainedSize; // if a preferredFrameSize is set, call the superclass to return that instead of using the image size. @@ -282,7 +282,7 @@ static NSString * const kStatus = @"status"; - (void)setVideoPlaceholderImage:(UIImage *)image { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (image != nil) { self.contentMode = ASContentModeFromVideoGravity(_gravity); } @@ -291,7 +291,7 @@ static NSString * const kStatus = @"status"; - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (object != _currentPlayerItem) { return; @@ -344,7 +344,7 @@ static NSString * const kStatus = @"status"; { [super fetchData]; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); AVAsset *asset = self.asset; // Return immediately if the asset is nil; if (asset == nil || self.playerState == ASVideoNodePlayerStateInitialLoading) { @@ -394,7 +394,7 @@ static NSString * const kStatus = @"status"; [super clearFetchedData]; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); self.player = nil; self.currentItem = nil; @@ -405,7 +405,7 @@ static NSString * const kStatus = @"status"; { [super visibleStateDidChange:isVisible]; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (isVisible) { if (_shouldBePlaying || _shouldAutoplay) { @@ -422,7 +422,7 @@ static NSString * const kStatus = @"status"; - (void)setPlayerState:(ASVideoNodePlayerState)playerState { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); ASVideoNodePlayerState oldState = _playerState; @@ -439,7 +439,7 @@ static NSString * const kStatus = @"status"; - (void)setAsset:(AVAsset *)asset { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (ASAssetIsEqual(asset, _asset)) { return; @@ -454,13 +454,13 @@ static NSString * const kStatus = @"status"; - (AVAsset *)asset { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _asset; } - (void)setVideoComposition:(AVVideoComposition *)videoComposition { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _videoComposition = videoComposition; _currentPlayerItem.videoComposition = videoComposition; @@ -468,13 +468,13 @@ static NSString * const kStatus = @"status"; - (AVVideoComposition *)videoComposition { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _videoComposition; } - (void)setAudioMix:(AVAudioMix *)audioMix { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _audioMix = audioMix; _currentPlayerItem.audioMix = audioMix; @@ -482,13 +482,13 @@ static NSString * const kStatus = @"status"; - (AVAudioMix *)audioMix { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _audioMix; } - (AVPlayer *)player { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _player; } @@ -527,7 +527,7 @@ static NSString * const kStatus = @"status"; - (void)setGravity:(NSString *)gravity { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_playerNode.isNodeLoaded) { ((AVPlayerLayer *)_playerNode.layer).videoGravity = gravity; } @@ -537,19 +537,19 @@ static NSString * const kStatus = @"status"; - (NSString *)gravity { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _gravity; } - (BOOL)muted { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _muted; } - (void)setMuted:(BOOL)muted { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _player.muted = muted; _muted = muted; @@ -559,7 +559,7 @@ static NSString * const kStatus = @"status"; - (void)play { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (![self isStateChangeValid:ASVideoNodePlayerStatePlaying]) { return; @@ -596,7 +596,7 @@ static NSString * const kStatus = @"status"; - (void)pause { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (![self isStateChangeValid:ASVideoNodePlayerStatePaused]) { return; } @@ -607,7 +607,7 @@ static NSString * const kStatus = @"status"; - (BOOL)isPlaying { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return (_player.rate > 0 && !_player.error); } @@ -675,13 +675,13 @@ static NSString * const kStatus = @"status"; - (AVPlayerItem *)currentItem { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _currentPlayerItem; } - (void)setCurrentItem:(AVPlayerItem *)currentItem { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self removePlayerItemObservers:_currentPlayerItem]; @@ -694,13 +694,13 @@ static NSString * const kStatus = @"status"; - (ASDisplayNode *)playerNode { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _playerNode; } - (void)setPlayerNode:(ASDisplayNode *)playerNode { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _playerNode = playerNode; [self setNeedsLayout]; @@ -708,7 +708,7 @@ static NSString * const kStatus = @"status"; - (void)setPlayer:(AVPlayer *)player { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _player = player; player.muted = _muted; ((AVPlayerLayer *)_playerNode.layer).player = player; @@ -716,13 +716,13 @@ static NSString * const kStatus = @"status"; - (BOOL)shouldBePlaying { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _shouldBePlaying; } - (void)setShouldBePlaying:(BOOL)shouldBePlaying { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _shouldBePlaying = shouldBePlaying; } diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index 0099dd34fe..30549c9288 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -205,7 +205,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; { [super didLoad]; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self createControls]; } } @@ -214,7 +214,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; { [super visibleStateDidChange:isVisible]; - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (isVisible && _loadAssetWhenNodeBecomesVisible) { if (_asset != _videoNode.asset) { @@ -244,7 +244,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; #pragma mark - UI - (void)createControls { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_controlsDisabled) { return; @@ -295,7 +295,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; } ASPerformBlockOnMainThread(^{ - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self setNeedsLayout]; }); } @@ -575,7 +575,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; - (void)showSpinner { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!_spinnerNode) { @@ -603,7 +603,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; - (void)removeSpinner { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (!_spinnerNode) { return; diff --git a/AsyncDisplayKit/Details/ASBasicImageDownloader.mm b/AsyncDisplayKit/Details/ASBasicImageDownloader.mm index 159f19b76e..bf84475b88 100644 --- a/AsyncDisplayKit/Details/ASBasicImageDownloader.mm +++ b/AsyncDisplayKit/Details/ASBasicImageDownloader.mm @@ -31,7 +31,7 @@ NSString * const kASBasicImageDownloaderContextCompletionBlock = @"kASBasicImage @interface ASBasicImageDownloaderContext () { BOOL _invalid; - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; } @property (nonatomic, strong) NSMutableArray *callbackDatas; @@ -76,7 +76,7 @@ static ASDN::RecursiveMutex currentRequestsLock; - (void)cancel { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); NSURLSessionTask *sessionTask = self.sessionTask; if (sessionTask) { @@ -90,19 +90,19 @@ static ASDN::RecursiveMutex currentRequestsLock; - (BOOL)isCancelled { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _invalid; } - (void)addCallbackData:(NSDictionary *)callbackData { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self.callbackDatas addObject:callbackData]; } - (void)performProgressBlocks:(CGFloat)progress { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); for (NSDictionary *callbackData in self.callbackDatas) { ASBasicImageDownloaderContextProgressBlock progressBlock = callbackData[kASBasicImageDownloaderContextProgressBlock]; dispatch_queue_t callbackQueue = callbackData[kASBasicImageDownloaderContextCallbackQueue]; @@ -117,7 +117,7 @@ static ASDN::RecursiveMutex currentRequestsLock; - (void)completeWithImage:(UIImage *)image error:(NSError *)error { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); for (NSDictionary *callbackData in self.callbackDatas) { ASBasicImageDownloaderContextCompletionBlock completionBlock = callbackData[kASBasicImageDownloaderContextCompletionBlock]; dispatch_queue_t callbackQueue = callbackData[kASBasicImageDownloaderContextCallbackQueue]; @@ -135,7 +135,7 @@ static ASDN::RecursiveMutex currentRequestsLock; - (NSURLSessionTask *)createSessionTaskIfNecessaryWithBlock:(NSURLSessionTask *(^)())creationBlock { { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (self.isCancelled) { return nil; @@ -149,7 +149,7 @@ static ASDN::RecursiveMutex currentRequestsLock; NSURLSessionTask *newTask = creationBlock(); { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (self.isCancelled) { return nil; diff --git a/AsyncDisplayKit/Details/ASBatchContext.mm b/AsyncDisplayKit/Details/ASBatchContext.mm index 7a5efa766b..94c148a804 100644 --- a/AsyncDisplayKit/Details/ASBatchContext.mm +++ b/AsyncDisplayKit/Details/ASBatchContext.mm @@ -21,7 +21,7 @@ typedef NS_ENUM(NSInteger, ASBatchContextState) { @interface ASBatchContext () { ASBatchContextState _state; - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; } @end @@ -37,33 +37,33 @@ typedef NS_ENUM(NSInteger, ASBatchContextState) { - (BOOL)isFetching { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _state == ASBatchContextStateFetching; } - (BOOL)batchFetchingWasCancelled { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _state == ASBatchContextStateCancelled; } - (void)beginBatchFetching { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _state = ASBatchContextStateFetching; } - (void)completeBatchFetching:(BOOL)didComplete { if (didComplete) { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _state = ASBatchContextStateCompleted; } } - (void)cancelBatchFetching { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _state = ASBatchContextStateCancelled; } diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index eafcdc6970..4c66b3c129 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -25,7 +25,7 @@ typedef std::map, std::less> ASCh @interface ASLayoutSpec() { ASEnvironmentState _environmentState; - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; ASChildMap _children; } @end @@ -227,7 +227,7 @@ ASEnvironmentLayoutExtensibilityForwarding - (ASTraitCollection *)asyncTraitCollection { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return [ASTraitCollection traitCollectionWithASEnvironmentTraitCollection:self.environmentTraitCollection]; } diff --git a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm index 8d7fe094fe..2393972a53 100644 --- a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm @@ -19,7 +19,7 @@ @implementation ASStackLayoutSpec { - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; } - (instancetype)init @@ -144,11 +144,11 @@ // and min descender in case this spec is a child in another spec that wants to align to a baseline. const auto baselinePositionedLayout = ASStackBaselinePositionedLayout::compute(positionedLayout, style, constrainedSize); if (self.direction == ASStackLayoutDirectionVertical) { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); self.ascender = [[self.children firstObject] ascender]; self.descender = [[self.children lastObject] descender]; } else { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); self.ascender = baselinePositionedLayout.ascender; self.descender = baselinePositionedLayout.descender; } diff --git a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm index 55653db946..aeb182970d 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm +++ b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm @@ -183,9 +183,9 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, { asyncdisplaykit_async_transaction_operation_block_t displayBlock = nil; ASDisplayNodeFlags flags; - _propertyLock.lock(); + __instanceLock__.lock(); flags = _flags; - _propertyLock.unlock(); + __instanceLock__.unlock(); ASDisplayNodeAssert(rasterizing || !(_hierarchyState & ASHierarchyStateRasterized), @"Rasterized descendants should never display unless being drawn into the rasterized container."); @@ -323,7 +323,7 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, { ASDisplayNodeAssertMainThread(); - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_hierarchyState & ASHierarchyStateRasterized) { return; @@ -398,25 +398,25 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, - (ASDisplayNodeContextModifier)willDisplayNodeContentWithRenderingContext { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _willDisplayNodeContentWithRenderingContext; } - (ASDisplayNodeContextModifier)didDisplayNodeContentWithRenderingContext { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _didDisplayNodeContentWithRenderingContext; } - (void)setWillDisplayNodeContentWithRenderingContext:(ASDisplayNodeContextModifier)contextModifier { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _willDisplayNodeContentWithRenderingContext = contextModifier; } - (void)setDidDisplayNodeContentWithRenderingContext:(ASDisplayNodeContextModifier)contextModifier; { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); _didDisplayNodeContentWithRenderingContext = contextModifier; } diff --git a/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm b/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm index 20402fe385..38901bce61 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm +++ b/AsyncDisplayKit/Private/ASDisplayNode+UIViewBridge.mm @@ -37,9 +37,9 @@ #define __loaded(node) (node->_view != nil || (node->_layer != nil && node->_flags.layerBacked)) #if DISPLAYNODE_USE_LOCKS -#define _bridge_prologue_read ASDN::MutexLocker l(_propertyLock); ASDisplayNodeAssertThreadAffinity(self) -#define _bridge_prologue_write ASDN::MutexLocker l(_propertyLock) -#define _bridge_prologue_write_unlock ASDN::MutexUnlocker u(_propertyLock) +#define _bridge_prologue_read ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssertThreadAffinity(self) +#define _bridge_prologue_write ASDN::MutexLocker l(__instanceLock__) +#define _bridge_prologue_write_unlock ASDN::MutexUnlocker u(__instanceLock__) #else #define _bridge_prologue_read ASDisplayNodeAssertThreadAffinity(self) #define _bridge_prologue_write diff --git a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h index db6d818f7a..c894bf762e 100644 --- a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h +++ b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h @@ -61,7 +61,7 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo _ASPendingState *_pendingViewState; // Protects access to _view, _layer, _pendingViewState, _subnodes, _supernode, and other properties which are accessed from multiple threads. - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; UIView *_view; CALayer *_layer; diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index 921008dc07..e71760770f 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -47,7 +47,7 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { } @implementation ASLayoutTransition { - ASDN::RecursiveMutex _propertyLock; + ASDN::RecursiveMutex __instanceLock__; BOOL _calculatedSubnodeOperations; NSArray *_insertedSubnodes; NSArray *_removedSubnodes; @@ -70,7 +70,7 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { - (BOOL)isSynchronous { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return ASLayoutCanTransitionAsynchronous(_pendingLayout); } @@ -82,7 +82,7 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { - (void)applySubnodeInsertions { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self calculateSubnodeOperationsIfNeeded]; NSUInteger i = 0; @@ -95,7 +95,7 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { - (void)applySubnodeRemovals { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self calculateSubnodeOperationsIfNeeded]; for (ASDisplayNode *subnode in _removedSubnodes) { [subnode removeFromSupernode]; @@ -104,7 +104,7 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { - (void)calculateSubnodeOperationsIfNeeded { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if (_calculatedSubnodeOperations) { return; } @@ -134,27 +134,27 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { - (NSArray *)currentSubnodesWithTransitionContext:(_ASTransitionContext *)context { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); return _node.subnodes; } - (NSArray *)insertedSubnodesWithTransitionContext:(_ASTransitionContext *)context { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self calculateSubnodeOperationsIfNeeded]; return _insertedSubnodes; } - (NSArray *)removedSubnodesWithTransitionContext:(_ASTransitionContext *)context { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); [self calculateSubnodeOperationsIfNeeded]; return _removedSubnodes; } - (ASLayout *)transitionContext:(_ASTransitionContext *)context layoutForKey:(NSString *)key { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if ([key isEqualToString:ASTransitionContextFromLayoutKey]) { return _previousLayout; } else if ([key isEqualToString:ASTransitionContextToLayoutKey]) { @@ -166,7 +166,7 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { - (ASSizeRange)transitionContext:(_ASTransitionContext *)context constrainedSizeForKey:(NSString *)key { - ASDN::MutexLocker l(_propertyLock); + ASDN::MutexLocker l(__instanceLock__); if ([key isEqualToString:ASTransitionContextFromLayoutKey]) { return _previousLayout.constrainedSizeRange; } else if ([key isEqualToString:ASTransitionContextToLayoutKey]) { From 8644c03ab85dcf7114fa1319883b9c64bede3855 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 16 Jul 2016 16:12:50 -0700 Subject: [PATCH 173/247] Revert "[ASDisplayNode] Short circuit measure calls that have a zero-area constrainedSize. (#1939)" This reverts commit 3664ca67cb06647233e6fdcaf934d440ab433f06. --- AsyncDisplayKit/ASDisplayNode.mm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 4087836ea3..3eb2b26ee1 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -664,12 +664,6 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) return NO; } - // If the constrainedSize is completely zero-area, then there is no possibility for layout calculations to be successful. - // This also avoids the issue of an inset being applied to 0, creating negative frame values. - if (constrainedSize.min.width * constrainedSize.min.height == 0.0 && constrainedSize.max.width * constrainedSize.max.height == 0.0) { - return NO; - } - if (ASHierarchyStateIncludesLayoutPending(_hierarchyState)) { ASLayoutableContext context = ASLayoutableGetCurrentContext(); if (ASLayoutableContextIsNull(context) || _pendingTransitionID != context.transitionID) { From 6e573fba0d55258837e9a610c9f3482039fb173d Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sat, 16 Jul 2016 16:23:47 -0700 Subject: [PATCH 174/247] Reset _calculatedSize if a new constrained size is set on the ASTextKitRenderer (#1942) --- AsyncDisplayKit/TextKit/ASTextKitRenderer.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm index 020f825781..efaef16ded 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm @@ -123,6 +123,7 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet() if (!CGSizeEqualToSize(constrainedSize, _constrainedSize)) { _sizeIsCalculated = NO; _constrainedSize = constrainedSize; + _calculatedSize = CGSizeZero; // Throw away the all subcomponents to create them with the new constrained size new as well as let the // truncater do it's job again for the new constrained size. This is necessary as after a truncation did happen From d4c5a09817062a987be0db4083febf68b89d1bd8 Mon Sep 17 00:00:00 2001 From: appleguy Date: Sat, 16 Jul 2016 16:24:07 -0700 Subject: [PATCH 175/247] [ASDisplayNode+AsyncDisplay.mm] Refactor display block creation method for conciseness and readability. (#1933) * [ASDisplayNode+AsyncDisplay.mm] Refactor display block creation method for conciseness and readability. * [ASDisplayNode+AsyncDisplay.mm] Some additional fixes / improvements that are required for the prior commit. * Fix one last spot of the merge with __instanceLock__.unlock(); --- .../Private/ASDisplayNode+AsyncDisplay.mm | 179 +++++++++--------- 1 file changed, 87 insertions(+), 92 deletions(-) diff --git a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm index aeb182970d..e426812606 100644 --- a/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm +++ b/AsyncDisplayKit/Private/ASDisplayNode+AsyncDisplay.mm @@ -75,6 +75,20 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, } } +#define DISPLAY_COUNT_INCREMENT() __ASDisplayLayerIncrementConcurrentDisplayCount(asynchronous, rasterizing); +#define DISPLAY_COUNT_DECREMENT() __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); +#define CHECK_CANCELLED_AND_RETURN_NIL_WITH_DECREMENT(expr) if (isCancelledBlock()) { \ + expr; \ + __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); \ + return nil; \ + } \ + +#define CHECK_CANCELLED_AND_RETURN_NIL(expr) if (isCancelledBlock()) { \ + expr; \ + return nil; \ + } \ + + - (NSObject *)drawParameters { if (_flags.implementsDrawParameters) { @@ -179,141 +193,122 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, } } -- (asyncdisplaykit_async_transaction_operation_block_t)_displayBlockWithAsynchronous:(BOOL)asynchronous isCancelledBlock:(asdisplaynode_iscancelled_block_t)isCancelledBlock rasterizing:(BOOL)rasterizing +- (asyncdisplaykit_async_transaction_operation_block_t)_displayBlockWithAsynchronous:(BOOL)asynchronous + isCancelledBlock:(asdisplaynode_iscancelled_block_t)isCancelledBlock + rasterizing:(BOOL)rasterizing { asyncdisplaykit_async_transaction_operation_block_t displayBlock = nil; ASDisplayNodeFlags flags; + __instanceLock__.lock(); + flags = _flags; + + // We always create a graphics context, unless a -display method is used, OR if we are a subnode drawing into a rasterized parent. + BOOL shouldCreateGraphicsContext = (flags.implementsInstanceImageDisplay == NO && flags.implementsImageDisplay == NO && rasterizing == NO); + BOOL shouldBeginRasterizing = (rasterizing == NO && flags.shouldRasterizeDescendants); + BOOL usesInstanceMethodDisplay = (flags.implementsInstanceDrawRect || flags.implementsInstanceImageDisplay); + BOOL usesImageDisplay = (flags.implementsImageDisplay || flags.implementsInstanceImageDisplay); + BOOL usesDrawRect = (flags.implementsDrawRect || flags.implementsInstanceDrawRect); + + if (usesImageDisplay == NO && usesDrawRect == NO && shouldBeginRasterizing == NO) { + // Early exit before requesting more expensive properties like bounds and opaque from the layer. + __instanceLock__.unlock(); + return nil; + } + + BOOL opaque = self.opaque; + CGRect bounds = self.bounds; + CGFloat contentsScaleForDisplay = _contentsScaleForDisplay; + + // Capture drawParameters from delegate on main thread, if this node is displaying itself rather than recursively rasterizing. + id drawParameters = (shouldBeginRasterizing == NO ? [self drawParameters] : nil); + __instanceLock__.unlock(); - ASDisplayNodeAssert(rasterizing || !(_hierarchyState & ASHierarchyStateRasterized), @"Rasterized descendants should never display unless being drawn into the rasterized container."); - - if (!rasterizing && self.shouldRasterizeDescendants) { - CGRect bounds = self.bounds; - if (CGRectIsEmpty(bounds)) { - return nil; - } + // Only the -display methods should be called if we can't size the graphics buffer to use. + if (CGRectIsEmpty(bounds) && (shouldBeginRasterizing || shouldCreateGraphicsContext)) { + return nil; + } + + ASDisplayNodeAssert(contentsScaleForDisplay != 0.0, @"Invalid contents scale"); + ASDisplayNodeAssert(usesInstanceMethodDisplay == NO || (flags.implementsDrawRect == NO && flags.implementsImageDisplay == NO), + @"Node %@ should not implement both class and instance method display or draw", self); + ASDisplayNodeAssert(rasterizing || !(_hierarchyState & ASHierarchyStateRasterized), + @"Rasterized descendants should never display unless being drawn into the rasterized container."); + if (shouldBeginRasterizing == YES) { // Collect displayBlocks for all descendants. NSMutableArray *displayBlocks = [NSMutableArray array]; [self _recursivelyRasterizeSelfAndSublayersWithIsCancelledBlock:isCancelledBlock displayBlocks:displayBlocks]; - - CGFloat contentsScaleForDisplay = self.contentsScaleForDisplay; - BOOL opaque = self.opaque && CGColorGetAlpha(self.backgroundColor.CGColor) == 1.0f; - - ASDisplayNodeAssert(self.contentsScaleForDisplay != 0.0, @"Invalid contents scale"); + CHECK_CANCELLED_AND_RETURN_NIL(); + + // If [UIColor clearColor] or another semitransparent background color is used, include alpha channel when rasterizing. + // Unlike CALayer drawing, we include the backgroundColor as a base during rasterization. + opaque = opaque && CGColorGetAlpha(self.backgroundColor.CGColor) == 1.0f; displayBlock = ^id{ - __ASDisplayLayerIncrementConcurrentDisplayCount(asynchronous, rasterizing); - if (isCancelledBlock()) { - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - return nil; - } - - ASDN_DELAY_FOR_DISPLAY(); + DISPLAY_COUNT_INCREMENT(); + CHECK_CANCELLED_AND_RETURN_NIL_WITH_DECREMENT(); + UIGraphicsBeginImageContextWithOptions(bounds.size, opaque, contentsScaleForDisplay); for (dispatch_block_t block in displayBlocks) { - if (isCancelledBlock()) { - UIGraphicsEndImageContext(); - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - return nil; - } + CHECK_CANCELLED_AND_RETURN_NIL_WITH_DECREMENT(UIGraphicsEndImageContext()); block(); } - + UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - + ASDN_DELAY_FOR_DISPLAY(); + DISPLAY_COUNT_DECREMENT(); return image; }; - } else if (flags.implementsInstanceImageDisplay || flags.implementsImageDisplay) { - // Capture drawParameters from delegate on main thread - id drawParameters = [self drawParameters]; - + } else { displayBlock = ^id{ - __ASDisplayLayerIncrementConcurrentDisplayCount(asynchronous, rasterizing); - if (isCancelledBlock()) { - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - return nil; - } - - ASDN_DELAY_FOR_DISPLAY(); - - UIImage *result = nil; - //We can't call _willDisplayNodeContentWithRenderingContext or _didDisplayNodeContentWithRenderingContext because we don't - //have a context. We rely on implementors of displayWithParameters:isCancelled: to call - if (flags.implementsInstanceImageDisplay) { - result = [self displayWithParameters:drawParameters isCancelled:isCancelledBlock]; - } else { - result = [[self class] displayWithParameters:drawParameters isCancelled:isCancelledBlock]; - } - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - return result; - }; - - } else if (flags.implementsInstanceDrawRect || flags.implementsDrawRect) { + DISPLAY_COUNT_INCREMENT(); + CHECK_CANCELLED_AND_RETURN_NIL_WITH_DECREMENT(); - CGRect bounds = self.bounds; - if (CGRectIsEmpty(bounds)) { - return nil; - } - - // Capture drawParameters from delegate on main thread - id drawParameters = [self drawParameters]; - CGFloat contentsScaleForDisplay = self.contentsScaleForDisplay; - BOOL opaque = self.opaque; - - displayBlock = ^id{ - __ASDisplayLayerIncrementConcurrentDisplayCount(asynchronous, rasterizing); - if (isCancelledBlock()) { - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - return nil; - } - - ASDN_DELAY_FOR_DISPLAY(); - - if (!rasterizing) { + if (shouldCreateGraphicsContext) { UIGraphicsBeginImageContextWithOptions(bounds.size, opaque, contentsScaleForDisplay); + CHECK_CANCELLED_AND_RETURN_NIL_WITH_DECREMENT( UIGraphicsEndImageContext(); ); } CGContextRef currentContext = UIGraphicsGetCurrentContext(); + UIImage *image = nil; + + // For -display methods, we don't have a context, and thus will not call the _willDisplayNodeContentWithRenderingContext or + // _didDisplayNodeContentWithRenderingContext blocks. It's up to the implementation of -display... to do what it needs. if (currentContext && _willDisplayNodeContentWithRenderingContext) { _willDisplayNodeContentWithRenderingContext(currentContext); } - if (flags.implementsInstanceDrawRect) { - [self drawRect:bounds withParameters:drawParameters isCancelled:isCancelledBlock isRasterizing:rasterizing]; - } else { - [[self class] drawRect:bounds withParameters:drawParameters isCancelled:isCancelledBlock isRasterizing:rasterizing]; + // Decide if we use a class or instance method to draw or display. + id object = usesInstanceMethodDisplay ? self : [self class]; + + if (usesImageDisplay) { // If we are using a display method, we'll get an image back directly. + image = [object displayWithParameters:drawParameters + isCancelled:isCancelledBlock]; + } else if (usesDrawRect) { // If we're using a draw method, this will operate on the currentContext. + [object drawRect:bounds withParameters:drawParameters + isCancelled:isCancelledBlock isRasterizing:rasterizing]; } if (currentContext && _didDisplayNodeContentWithRenderingContext) { _didDisplayNodeContentWithRenderingContext(currentContext); } - - if (isCancelledBlock()) { - if (!rasterizing) { - UIGraphicsEndImageContext(); - } - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - return nil; - } - - UIImage *image = nil; - if (!rasterizing) { + + if (shouldCreateGraphicsContext) { + CHECK_CANCELLED_AND_RETURN_NIL_WITH_DECREMENT( UIGraphicsEndImageContext(); ); image = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } - __ASDisplayLayerDecrementConcurrentDisplayCount(asynchronous, rasterizing); - + ASDN_DELAY_FOR_DISPLAY(); + DISPLAY_COUNT_DECREMENT(); return image; }; - } return [displayBlock copy]; @@ -356,7 +351,7 @@ static void __ASDisplayLayerDecrementConcurrentDisplayCount(BOOL displayIsAsync, ASDisplayNodeCAssertMainThread(); if (!canceled && !isCancelledBlock()) { UIImage *image = (UIImage *)value; - BOOL stretchable = !UIEdgeInsetsEqualToEdgeInsets(image.capInsets, UIEdgeInsetsZero); + BOOL stretchable = (NO == UIEdgeInsetsEqualToEdgeInsets(image.capInsets, UIEdgeInsetsZero)); if (stretchable) { ASDisplayNodeSetupLayerContentsWithResizableImage(_layer, image); } else { From fa34888d984b4b6e820bc7f31844d8c21a53305d Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 18 Jul 2016 11:24:31 -0700 Subject: [PATCH 176/247] [ASDataController] Migrate to GCD queue to make debugging easier --- AsyncDisplayKit/Details/ASDataController.mm | 95 ++++++++++----------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 40c4af1abf..30d9627cb4 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -23,7 +23,11 @@ //#define LOG(...) NSLog(__VA_ARGS__) #define LOG(...) +#define ASSERT_ON_EDITING_QUEUE ASDisplayNodeAssertNotNil(dispatch_get_specific(&kASDataControllerEditingQueueKey), @"%@ must be called on the editing transaction queue.", NSStringFromSelector(_cmd)) + const static NSUInteger kASDataControllerSizingCountPerProcessor = 5; +const static char * kASDataControllerEditingQueueKey = "kASDataControllerEditingQueueKey"; +const static char * kASDataControllerEditingQueueContext = "kASDataControllerEditingQueueKey"; NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; @@ -35,7 +39,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASMainSerialQueue *_mainSerialQueue; NSMutableArray *_pendingEditCommandBlocks; // To be run on the main thread. Handles begin/endUpdates tracking. - NSOperationQueue *_editingTransactionQueue; // Serial background queue. Dispatches concurrent layout and manages _editingNodes. + dispatch_queue_t _editingTransactionQueue; // Serial background queue. Dispatches concurrent layout and manages _editingNodes. BOOL _initialReloadDataHasBeenCalled; @@ -70,9 +74,9 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; _pendingEditCommandBlocks = [NSMutableArray array]; - _editingTransactionQueue = [[NSOperationQueue alloc] init]; - _editingTransactionQueue.maxConcurrentOperationCount = 1; // Serial queue - _editingTransactionQueue.name = @"org.AsyncDisplayKit.ASDataController.editingTransactionQueue"; + const char *queueName = [[NSString stringWithFormat:@"org.AsyncDisplayKit.ASDataController.editingTransactionQueue:%p", self] cStringUsingEncoding:NSASCIIStringEncoding]; + _editingTransactionQueue = dispatch_queue_create(queueName, DISPATCH_QUEUE_SERIAL); + dispatch_queue_set_specific(_editingTransactionQueue, &kASDataControllerEditingQueueKey, &kASDataControllerEditingQueueContext, NULL); _batchUpdateCounter = 0; @@ -110,7 +114,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; - (void)batchLayoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock { - ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; NSUInteger blockSize = [[ASDataController class] parallelProcessorCount] * kASDataControllerSizingCountPerProcessor; NSUInteger count = contexts.count; @@ -146,7 +150,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; */ - (void)_batchLayoutNodesFromContexts:(NSArray *)contexts withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; [self batchLayoutNodesFromContexts:contexts ofKind:ASDataControllerRowNodeKind completion:^(NSArray *nodes, NSArray *indexPaths) { // Insert finished nodes into data storage @@ -159,7 +163,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; */ - (void)_layoutNodes:(NSArray *)nodes fromContexts:(NSArray *)contexts atIndexesOfRange:(NSRange)range ofKind:(NSString *)kind { - ASDisplayNodeAssert([NSOperationQueue currentQueue] != _editingTransactionQueue, @"%@ should not be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; if (_dataSource == nil) { return; @@ -175,7 +179,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; - (void)_layoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock { - ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; if (!contexts.count || _dataSource == nil) { return; @@ -318,7 +322,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; */ - (void)_insertNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; [self insertNodes:nodes ofKind:ASDataControllerRowNodeKind atIndexPaths:indexPaths completion:^(NSArray *nodes, NSArray *indexPaths) { ASDisplayNodeAssertMainThread(); @@ -336,7 +340,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; */ - (void)_deleteNodesAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; [self deleteNodesOfKind:ASDataControllerRowNodeKind atIndexPaths:indexPaths completion:^(NSArray *nodes, NSArray *indexPaths) { ASDisplayNodeAssertMainThread(); @@ -354,7 +358,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; */ - (void)_insertSections:(NSMutableArray *)sections atIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; [self insertSections:sections ofKind:ASDataControllerRowNodeKind atIndexSet:indexSet completion:^(NSArray *sections, NSIndexSet *indexSet) { ASDisplayNodeAssertMainThread(); @@ -372,7 +376,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; */ - (void)_deleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASDisplayNodeAssert([NSOperationQueue currentQueue] == _editingTransactionQueue, @"%@ must be called on the editing transaction queue", NSStringFromSelector(_cmd)); + ASSERT_ON_EDITING_QUEUE; [self deleteSectionsOfKind:ASDataControllerRowNodeKind atIndexSet:indexSet completion:^(NSIndexSet *indexSet) { ASDisplayNodeAssertMainThread(); @@ -399,7 +403,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; _initialReloadDataHasBeenCalled = YES; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); NSUInteger sectionCount = [_dataSource numberOfSectionsInDataController:self]; NSIndexSet *sectionIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)]; @@ -408,7 +412,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // Allow subclasses to perform setup before going into the edit transaction [self prepareForReloadData]; - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ LOG(@"Edit Transaction - reloadData"); // Remove everything that existed before the reload, now that we're ready to insert replacements @@ -435,7 +439,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; if (completion) { dispatch_async(dispatch_get_main_queue(), completion); } - }]; + }); if (synchronously) { [self waitUntilAllUpdatesAreCommitted]; } @@ -450,13 +454,11 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // This should never be called in a batch update, return immediately therefore if (_batchUpdateCounter > 0) { return; } - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); // Schedule block in main serial queue to wait until all operations are finished that are // where scheduled while waiting for the _editingTransactionQueue to finish - [_mainSerialQueue performBlockOnMainThread:^{ - ASDisplayNodeAssert(_editingTransactionQueue.operationCount == 0, @"No operation should be in the _editingTransactionQueue anymore"); - }]; + [_mainSerialQueue performBlockOnMainThread:^{ }]; } #pragma mark - Data Source Access (Calling _dataSource) @@ -494,7 +496,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; - (void)beginUpdates { - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); // Begin queuing up edit calls that happen on the main thread. // This will prevent further operations from being scheduled on _editingTransactionQueue. _batchUpdateCounter++; @@ -512,7 +514,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; if (_batchUpdateCounter == 0) { LOG(@"endUpdatesWithCompletion - beginning"); - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ [_mainSerialQueue performBlockOnMainThread:^{ // Deep copy _completedNodes to _externalCompletedNodes. // Any external queries from now on will be done on _externalCompletedNodes, to guarantee data consistency with the delegate. @@ -521,7 +523,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; LOG(@"endUpdatesWithCompletion - begin updates call to delegate"); [_delegate dataControllerBeginUpdates:self]; }]; - }]; + }); // Running these commands may result in blocking on an _editingTransactionQueue operation that started even before -beginUpdates. // Each subsequent command in the queue will also wait on the full asynchronous completion of the prior command's edit transaction. @@ -533,8 +535,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; i += 1; } [_pendingEditCommandBlocks removeAllObjects]; - - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ [_mainSerialQueue performBlockOnMainThread:^{ // Now that the transaction is done, _completedNodes can be accessed externally again. _externalCompletedNodes = nil; @@ -542,7 +543,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; LOG(@"endUpdatesWithCompletion - calling delegate end"); [_delegate dataController:self endUpdatesAnimated:animated completion:completion]; }]; - }]; + }); } } @@ -580,13 +581,13 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - insertSections: %@", sections); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sections]; [self prepareForInsertSections:sections]; - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ [self willInsertSections:sections]; LOG(@"Edit Transaction - insertSections: %@", sections); @@ -598,7 +599,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self _insertSections:sectionArray atIndexSet:sections withAnimationOptions:animationOptions]; [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; + }); }]; } @@ -607,9 +608,8 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - deleteSections: %@", sections); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_async(_editingTransactionQueue, ^{ [self willDeleteSections:sections]; // remove elements @@ -618,7 +618,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; [self _deleteSectionsAtIndexSet:sections withAnimationOptions:animationOptions]; - }]; + }); }]; } @@ -633,9 +633,8 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - moveSection"); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; - - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_async(_editingTransactionQueue, ^{ [self willMoveSection:section toSection:newSection]; // remove elements @@ -655,7 +654,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // Don't re-calculate size for moving [self _insertNodes:nodes atIndexPaths:updatedIndexPaths withAnimationOptions:animationOptions]; - }]; + }); }]; } @@ -720,7 +719,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - insertRows: %@", indexPaths); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); // Sort indexPath to avoid messing up the index when inserting in several batches NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; @@ -740,12 +739,12 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self prepareForInsertRowsAtIndexPaths:indexPaths]; - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ [self willInsertRowsAtIndexPaths:indexPaths]; LOG(@"Edit Transaction - insertRows: %@", indexPaths); [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; - }]; + }); }]; } @@ -755,7 +754,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - deleteRows: %@", indexPaths); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); // Sort indexPath in order to avoid messing up the index when deleting in several batches. // FIXME: Shouldn't deletes be sorted in descending order? @@ -763,12 +762,12 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self prepareForDeleteRowsAtIndexPaths:sortedIndexPaths]; - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ [self willDeleteRowsAtIndexPaths:sortedIndexPaths]; LOG(@"Edit Transaction - deleteRows: %@", indexPaths); [self _deleteNodesAtIndexPaths:sortedIndexPaths withAnimationOptions:animationOptions]; - }]; + }); }]; } @@ -782,18 +781,18 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - relayoutRows"); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); // Can't relayout right away because _completedNodes may not be up-to-date, // i.e there might be some nodes that were measured using the old constrained size but haven't been added to _completedNodes // (see _layoutNodes:atIndexPaths:withAnimationOptions:). - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ [_mainSerialQueue performBlockOnMainThread:^{ for (NSString *kind in _completedNodes) { [self _relayoutNodesOfKind:kind]; } }]; - }]; + }); }]; } @@ -825,9 +824,9 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - moveRow: %@ > %@", indexPath, newIndexPath); - [_editingTransactionQueue waitUntilAllOperationsAreFinished]; + dispatch_sync(_editingTransactionQueue, ^{}); - [_editingTransactionQueue addOperationWithBlock:^{ + dispatch_async(_editingTransactionQueue, ^{ LOG(@"Edit Transaction - moveRow: %@ > %@", indexPath, newIndexPath); NSArray *indexPaths = @[indexPath]; NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(_editingNodes[ASDataControllerRowNodeKind], indexPaths); @@ -836,7 +835,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // Don't re-calculate size for moving NSArray *newIndexPaths = @[newIndexPath]; [self _insertNodes:nodes atIndexPaths:newIndexPaths withAnimationOptions:animationOptions]; - }]; + }); }]; } From 50e8ad2e7cae2716c5a2ad79461bccbc53754bbf Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 18 Jul 2016 12:01:33 -0700 Subject: [PATCH 177/247] [ASTableView/ASCollectionView] Ignore bounds.origin when checking for zero-size --- AsyncDisplayKit/ASCollectionView.mm | 2 +- AsyncDisplayKit/ASTableView.mm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 8b2a4adac5..c35a29e2e5 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -1039,7 +1039,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; ASDisplayNodeAssertMainThread(); // Calling -indexPathsForVisibleItems will trigger UIKit to call reloadData if it never has, which can result // in incorrect layout if performed at zero size. We can use the fact that nothing can be visible at zero size to return fast. - BOOL isZeroSized = CGRectEqualToRect(self.bounds, CGRectZero); + BOOL isZeroSized = CGSizeEqualToSize(self.bounds.size, CGSizeZero); return isZeroSized ? @[] : [self indexPathsForVisibleItems]; } diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 8fdb55eb44..a4193ddd4d 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -861,7 +861,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; // Calling indexPathsForVisibleRows will trigger UIKit to call reloadData if it never has, which can result // in incorrect layout if performed at zero size. We can use the fact that nothing can be visible at zero size to return fast. - if (CGRectEqualToRect(self.bounds, CGRectZero)) { + if (CGSizeEqualToSize(self.bounds.size, CGSizeZero)) { return @[]; } From 46a911ecf4807e76799c6c3e219acf3417be6d34 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 18 Jul 2016 15:01:22 -0700 Subject: [PATCH 178/247] [ASDataController] Clean up by using a dispatch_group --- AsyncDisplayKit/Details/ASDataController.mm | 42 +++++++++++---------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 30d9627cb4..e845311c6a 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -40,6 +40,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; NSMutableArray *_pendingEditCommandBlocks; // To be run on the main thread. Handles begin/endUpdates tracking. dispatch_queue_t _editingTransactionQueue; // Serial background queue. Dispatches concurrent layout and manages _editingNodes. + dispatch_group_t _editingTransactionGroup; // Group of all edit transaction blocks. Useful for waiting. BOOL _initialReloadDataHasBeenCalled; @@ -77,6 +78,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; const char *queueName = [[NSString stringWithFormat:@"org.AsyncDisplayKit.ASDataController.editingTransactionQueue:%p", self] cStringUsingEncoding:NSASCIIStringEncoding]; _editingTransactionQueue = dispatch_queue_create(queueName, DISPATCH_QUEUE_SERIAL); dispatch_queue_set_specific(_editingTransactionQueue, &kASDataControllerEditingQueueKey, &kASDataControllerEditingQueueContext, NULL); + _editingTransactionGroup = dispatch_group_create(); _batchUpdateCounter = 0; @@ -403,7 +405,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; _initialReloadDataHasBeenCalled = YES; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); NSUInteger sectionCount = [_dataSource numberOfSectionsInDataController:self]; NSIndexSet *sectionIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)]; @@ -412,7 +414,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // Allow subclasses to perform setup before going into the edit transaction [self prepareForReloadData]; - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ LOG(@"Edit Transaction - reloadData"); // Remove everything that existed before the reload, now that we're ready to insert replacements @@ -454,7 +456,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // This should never be called in a batch update, return immediately therefore if (_batchUpdateCounter > 0) { return; } - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); // Schedule block in main serial queue to wait until all operations are finished that are // where scheduled while waiting for the _editingTransactionQueue to finish @@ -496,7 +498,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; - (void)beginUpdates { - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); // Begin queuing up edit calls that happen on the main thread. // This will prevent further operations from being scheduled on _editingTransactionQueue. _batchUpdateCounter++; @@ -514,7 +516,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; if (_batchUpdateCounter == 0) { LOG(@"endUpdatesWithCompletion - beginning"); - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [_mainSerialQueue performBlockOnMainThread:^{ // Deep copy _completedNodes to _externalCompletedNodes. // Any external queries from now on will be done on _externalCompletedNodes, to guarantee data consistency with the delegate. @@ -535,7 +537,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; i += 1; } [_pendingEditCommandBlocks removeAllObjects]; - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [_mainSerialQueue performBlockOnMainThread:^{ // Now that the transaction is done, _completedNodes can be accessed externally again. _externalCompletedNodes = nil; @@ -581,13 +583,13 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - insertSections: %@", sections); - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sections]; [self prepareForInsertSections:sections]; - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [self willInsertSections:sections]; LOG(@"Edit Transaction - insertSections: %@", sections); @@ -608,8 +610,8 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - deleteSections: %@", sections); - dispatch_sync(_editingTransactionQueue, ^{}); - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [self willDeleteSections:sections]; // remove elements @@ -633,8 +635,8 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - moveSection"); - dispatch_sync(_editingTransactionQueue, ^{}); - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [self willMoveSection:section toSection:newSection]; // remove elements @@ -719,7 +721,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - insertRows: %@", indexPaths); - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); // Sort indexPath to avoid messing up the index when inserting in several batches NSArray *sortedIndexPaths = [indexPaths sortedArrayUsingSelector:@selector(compare:)]; @@ -739,7 +741,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self prepareForInsertRowsAtIndexPaths:indexPaths]; - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [self willInsertRowsAtIndexPaths:indexPaths]; LOG(@"Edit Transaction - insertRows: %@", indexPaths); @@ -754,7 +756,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - deleteRows: %@", indexPaths); - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); // Sort indexPath in order to avoid messing up the index when deleting in several batches. // FIXME: Shouldn't deletes be sorted in descending order? @@ -762,7 +764,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self prepareForDeleteRowsAtIndexPaths:sortedIndexPaths]; - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [self willDeleteRowsAtIndexPaths:sortedIndexPaths]; LOG(@"Edit Transaction - deleteRows: %@", indexPaths); @@ -781,12 +783,12 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - relayoutRows"); - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); // Can't relayout right away because _completedNodes may not be up-to-date, // i.e there might be some nodes that were measured using the old constrained size but haven't been added to _completedNodes // (see _layoutNodes:atIndexPaths:withAnimationOptions:). - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ [_mainSerialQueue performBlockOnMainThread:^{ for (NSString *kind in _completedNodes) { [self _relayoutNodesOfKind:kind]; @@ -824,9 +826,9 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - moveRow: %@ > %@", indexPath, newIndexPath); - dispatch_sync(_editingTransactionQueue, ^{}); + dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); - dispatch_async(_editingTransactionQueue, ^{ + dispatch_group_async(_editingTransactionGroup, _editingTransactionQueue, ^{ LOG(@"Edit Transaction - moveRow: %@ > %@", indexPath, newIndexPath); NSArray *indexPaths = @[indexPath]; NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(_editingNodes[ASDataControllerRowNodeKind], indexPaths); From 1777dae300417064dbb06764524d1195fdd8ca34 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 18 Jul 2016 18:41:51 -0700 Subject: [PATCH 179/247] [ASDataController] Set context variable value --- AsyncDisplayKit/Details/ASDataController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index e845311c6a..08bab41596 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -27,7 +27,7 @@ const static NSUInteger kASDataControllerSizingCountPerProcessor = 5; const static char * kASDataControllerEditingQueueKey = "kASDataControllerEditingQueueKey"; -const static char * kASDataControllerEditingQueueContext = "kASDataControllerEditingQueueKey"; +const static char * kASDataControllerEditingQueueContext = "kASDataControllerEditingQueueContext"; NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; From a4555869de5eebddd0fe5ed30c3231fdc4e1e96b Mon Sep 17 00:00:00 2001 From: Max Gu Date: Tue, 14 Jun 2016 10:15:57 -0700 Subject: [PATCH 180/247] Re-enabling HLS video constructed from URL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apple claims in the AVFoundationProgramming Guide that HLS videos can be constructed only through URL, but later with iOS 4.3 release notes it claimed to bring updates to how the HLS videos should be initialized, which works with asset too. I’ve tested with both, and it looks like initializing with asset is buggy. --- AsyncDisplayKit/ASVideoNode.mm | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index c00e518522..4e799398cd 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -126,14 +126,25 @@ static NSString * const kStatus = @"status"; { ASDN::MutexLocker l(__instanceLock__); + AVPlayerItem *playerItem = nil; if (_asset != nil) { - AVPlayerItem *playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; - playerItem.videoComposition = _videoComposition; - playerItem.audioMix = _audioMix; - return playerItem; + if ([_asset isKindOfClass:[AVURLAsset class]] && [self hasURLAsset]) { + playerItem = [[AVPlayerItem alloc] initWithURL:((AVURLAsset *)_asset).URL]; + _asset = [playerItem asset]; + } else { + playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; + } } - return nil; + playerItem.videoComposition = _videoComposition; + playerItem.audioMix = _audioMix; + return playerItem; +} + +- (BOOL)hasURLAsset +{ + // The array of AVAssetTrack objects available via the tracks property of an URL asset is typically empty for streaming-based media + return _asset.tracks.count == 0; } - (void)prepareToPlayAsset:(AVAsset *)asset withKeys:(NSArray *)requestedKeys From 90d5c97d0f5eeca2330ef78cf0369c8980103f42 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Tue, 19 Jul 2016 14:04:23 -0700 Subject: [PATCH 181/247] Fixes iOS 7 and iOS 8 wrong size in viewWillAppear: while a a rotation is happening --- AsyncDisplayKit/ASViewController.mm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index e57878ebf1..e754633ca0 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -212,9 +212,20 @@ ASVisibilityDepthImplementation; - (BOOL)_shouldLayoutTheLegacyWay { - BOOL isModal = (self.presentingViewController != nil && self.presentedViewController == nil); + BOOL isModalViewController = (self.presentingViewController != nil && self.presentedViewController == nil); + BOOL hasNavigationController = (self.navigationController != nil); + BOOL hasParentViewController = (self.parentViewController != nil); + if (isModalViewController && !hasNavigationController && !hasParentViewController) { + return YES; + } + + // Check if the view controller is a root view controller BOOL isRootViewController = self.view.window.rootViewController == self; - return isModal || isRootViewController; + if (isRootViewController) { + return YES; + } + + return NO; } - (ASSizeRange)_legacyConstrainedSize From 44a80672cbc7f4f5309deb1e2098d69eabace15c Mon Sep 17 00:00:00 2001 From: Max Gu Date: Tue, 19 Jul 2016 20:25:32 -0700 Subject: [PATCH 182/247] Adding track to the requestedKeys to be loaded asynchronously so that it doesn't block the main thread --- AsyncDisplayKit/ASVideoNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 4e799398cd..686950fbae 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -370,7 +370,7 @@ static NSString * const kStatus = @"status"; [_delegate videoNodeDidStartInitialLoading:self]; } - NSArray *requestedKeys = @[@"playable"]; + NSArray *requestedKeys = @[@"playable", @"tracks"]; [asset loadValuesAsynchronouslyForKeys:requestedKeys completionHandler:^{ ASPerformBlockOnMainThread(^{ if (_delegateFlags.delegateVideoNodeDidFinishInitialLoading) { From 6a13c0365bb58646c377f660b6b1e4ffa5b2e0f6 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Wed, 20 Jul 2016 12:53:01 -0700 Subject: [PATCH 183/247] [ASCollectionView] Do not suppress empty updates --- AsyncDisplayKit/ASCollectionView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index c35a29e2e5..112c0c05c1 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -1081,7 +1081,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; { ASDisplayNodeAssertMainThread(); NSUInteger numberOfUpdateBlocks = _batchUpdateBlocks.count; - if (numberOfUpdateBlocks == 0 || !self.asyncDataSource || _superIsPendingDataLoad) { + if (!self.asyncDataSource || _superIsPendingDataLoad) { if (completion) { completion(NO); } From 3ebddb683712d90baf4c27f47ed90c6c454ee0b8 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Wed, 20 Jul 2016 13:06:00 -0700 Subject: [PATCH 184/247] [ASCollectionView] Move the variable in --- AsyncDisplayKit/ASCollectionView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 112c0c05c1..124dfed1b8 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -1080,7 +1080,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)rangeController:(ASRangeController *)rangeController didEndUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion { ASDisplayNodeAssertMainThread(); - NSUInteger numberOfUpdateBlocks = _batchUpdateBlocks.count; if (!self.asyncDataSource || _superIsPendingDataLoad) { if (completion) { completion(NO); @@ -1090,6 +1089,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } ASPerformBlockWithoutAnimation(!animated, ^{ + NSUInteger numberOfUpdateBlocks = _batchUpdateBlocks.count; [_layoutFacilitator collectionViewWillPerformBatchUpdates]; [self _superPerformBatchUpdates:^{ for (dispatch_block_t block in _batchUpdateBlocks) { From f6eaa433158fbcf0ea9fe78e96e1a3089c185239 Mon Sep 17 00:00:00 2001 From: Max Gu Date: Wed, 20 Jul 2016 16:01:14 -0700 Subject: [PATCH 185/247] Adding the new ASVideoNode API that allows for video player item construction with URL --- AsyncDisplayKit/ASVideoNode.h | 3 ++- AsyncDisplayKit/ASVideoNode.mm | 40 ++++++++++++++++++++++++++++------ 2 files changed, 35 insertions(+), 8 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.h b/AsyncDisplayKit/ASVideoNode.h index 103124b38d..86870a83c2 100644 --- a/AsyncDisplayKit/ASVideoNode.h +++ b/AsyncDisplayKit/ASVideoNode.h @@ -41,6 +41,7 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)isPlaying; @property (nullable, nonatomic, strong, readwrite) AVAsset *asset; +@property (nullable, atomic, strong, readwrite) NSURL *assetURL; @property (nullable, nonatomic, strong, readwrite) AVVideoComposition *videoComposition; @property (nullable, nonatomic, strong, readwrite) AVAudioMix *audioMix; @@ -142,4 +143,4 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END -#endif \ No newline at end of file +#endif diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 686950fbae..6160c31a00 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -69,6 +69,7 @@ static NSString * const kStatus = @"status"; ASVideoNodePlayerState _playerState; AVAsset *_asset; + NSURL *_assetURL; AVVideoComposition *_videoComposition; AVAudioMix *_audioMix; @@ -127,13 +128,10 @@ static NSString * const kStatus = @"status"; ASDN::MutexLocker l(__instanceLock__); AVPlayerItem *playerItem = nil; - if (_asset != nil) { - if ([_asset isKindOfClass:[AVURLAsset class]] && [self hasURLAsset]) { - playerItem = [[AVPlayerItem alloc] initWithURL:((AVURLAsset *)_asset).URL]; - _asset = [playerItem asset]; - } else { - playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; - } + if (_assetURL != nil) { + playerItem = [[AVPlayerItem alloc] initWithURL:_assetURL]; + } else if (_asset != nil) { + playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; } playerItem.videoComposition = _videoComposition; @@ -448,6 +446,34 @@ static NSString * const kStatus = @"status"; _playerState = playerState; } +- (void)setAssetURL:(NSURL *)assetURL +{ + ASDN::MutexLocker l(__instanceLock__); + + if ([_asset isKindOfClass:[AVURLAsset class]]) { + if (ASObjectIsEqual(assetURL, ((AVURLAsset *)_asset).URL)) { + return; + } + } + + [self clearFetchedData]; + + _asset = [AVURLAsset assetWithURL:assetURL]; + + [self setNeedsDataFetch]; +} + +- (NSURL *)assetURL +{ + ASDN::MutexLocker l(__instanceLock__); + + if ([_asset isKindOfClass:AVURLAsset.class]) { + return ((AVURLAsset *)_asset).URL; + } + + return nil; +} + - (void)setAsset:(AVAsset *)asset { ASDN::MutexLocker l(__instanceLock__); From b04aa2e2bc0316bf2ac7bffe535ed3a004c77aa6 Mon Sep 17 00:00:00 2001 From: Max Gu Date: Wed, 20 Jul 2016 16:07:17 -0700 Subject: [PATCH 186/247] Removing some unused method --- AsyncDisplayKit/ASVideoNode.h | 1 + AsyncDisplayKit/ASVideoNode.mm | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.h b/AsyncDisplayKit/ASVideoNode.h index 86870a83c2..cb1d3b41ea 100644 --- a/AsyncDisplayKit/ASVideoNode.h +++ b/AsyncDisplayKit/ASVideoNode.h @@ -144,3 +144,4 @@ NS_ASSUME_NONNULL_BEGIN @end NS_ASSUME_NONNULL_END #endif + diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 6160c31a00..0404ff5b9b 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -139,12 +139,6 @@ static NSString * const kStatus = @"status"; return playerItem; } -- (BOOL)hasURLAsset -{ - // The array of AVAssetTrack objects available via the tracks property of an URL asset is typically empty for streaming-based media - return _asset.tracks.count == 0; -} - - (void)prepareToPlayAsset:(AVAsset *)asset withKeys:(NSArray *)requestedKeys { for (NSString *key in requestedKeys) { @@ -368,7 +362,7 @@ static NSString * const kStatus = @"status"; [_delegate videoNodeDidStartInitialLoading:self]; } - NSArray *requestedKeys = @[@"playable", @"tracks"]; + NSArray *requestedKeys = @[@"playable"]; [asset loadValuesAsynchronouslyForKeys:requestedKeys completionHandler:^{ ASPerformBlockOnMainThread(^{ if (_delegateFlags.delegateVideoNodeDidFinishInitialLoading) { From 76303f3799c4917205555c3e29cc2cd8e3febe9e Mon Sep 17 00:00:00 2001 From: Max Gu Date: Wed, 20 Jul 2016 17:03:57 -0700 Subject: [PATCH 187/247] Setting the internal asset to the player item's asest --- AsyncDisplayKit/ASVideoNode.h | 2 +- AsyncDisplayKit/ASVideoNode.mm | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.h b/AsyncDisplayKit/ASVideoNode.h index cb1d3b41ea..178ceff5c7 100644 --- a/AsyncDisplayKit/ASVideoNode.h +++ b/AsyncDisplayKit/ASVideoNode.h @@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)isPlaying; @property (nullable, nonatomic, strong, readwrite) AVAsset *asset; -@property (nullable, atomic, strong, readwrite) NSURL *assetURL; +@property (nullable, nonatomic, strong, readwrite) NSURL *assetURL; @property (nullable, nonatomic, strong, readwrite) AVVideoComposition *videoComposition; @property (nullable, nonatomic, strong, readwrite) AVAudioMix *audioMix; diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 0404ff5b9b..51d397a5e3 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -69,7 +69,6 @@ static NSString * const kStatus = @"status"; ASVideoNodePlayerState _playerState; AVAsset *_asset; - NSURL *_assetURL; AVVideoComposition *_videoComposition; AVAudioMix *_audioMix; @@ -128,8 +127,9 @@ static NSString * const kStatus = @"status"; ASDN::MutexLocker l(__instanceLock__); AVPlayerItem *playerItem = nil; - if (_assetURL != nil) { - playerItem = [[AVPlayerItem alloc] initWithURL:_assetURL]; + if (self.assetURL != nil) { + playerItem = [[AVPlayerItem alloc] initWithURL:self.assetURL]; + _asset = [playerItem asset]; } else if (_asset != nil) { playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; } From b8ad8d6cc0a739a1f5a88842ddb23dce4f3c92d1 Mon Sep 17 00:00:00 2001 From: Max Gu Date: Wed, 20 Jul 2016 17:09:23 -0700 Subject: [PATCH 188/247] Combine 2 if statements into 1 --- AsyncDisplayKit/ASVideoNode.mm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 51d397a5e3..67f14f3f2a 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -444,8 +444,7 @@ static NSString * const kStatus = @"status"; { ASDN::MutexLocker l(__instanceLock__); - if ([_asset isKindOfClass:[AVURLAsset class]]) { - if (ASObjectIsEqual(assetURL, ((AVURLAsset *)_asset).URL)) { + if ([_asset isKindOfClass:[AVURLAsset class]] && ASObjectIsEqual(assetURL, ((AVURLAsset *)_asset).URL)) { return; } } From 6bd287086c66ce4c41bd5ec98ca0ee468c3b7c00 Mon Sep 17 00:00:00 2001 From: Max Gu Date: Wed, 20 Jul 2016 17:33:34 -0700 Subject: [PATCH 189/247] Addressing Adlai's comment --- AsyncDisplayKit/ASVideoNode.mm | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 67f14f3f2a..8771e703d9 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -442,18 +442,9 @@ static NSString * const kStatus = @"status"; - (void)setAssetURL:(NSURL *)assetURL { - ASDN::MutexLocker l(__instanceLock__); - - if ([_asset isKindOfClass:[AVURLAsset class]] && ASObjectIsEqual(assetURL, ((AVURLAsset *)_asset).URL)) { - return; - } + if (!ASObjectIsEqual(assetURL, self.assetURL)) { + self.asset = [AVURLAsset assetWithURL:assetURL]; } - - [self clearFetchedData]; - - _asset = [AVURLAsset assetWithURL:assetURL]; - - [self setNeedsDataFetch]; } - (NSURL *)assetURL From 1d4620edcee4ae9641fd8a1e73fb5baab4b93735 Mon Sep 17 00:00:00 2001 From: Max Gu Date: Wed, 20 Jul 2016 18:40:49 -0700 Subject: [PATCH 190/247] Adding documentation for assetURL in ASVideoNode, and adding a mutex lock for assetURL setter (#1961) * Adding comment in ASVideoNode.h for the assetURL property * Adding a mutexlock in setAssetURL in ASVideoNode --- AsyncDisplayKit/ASVideoNode.h | 5 +++++ AsyncDisplayKit/ASVideoNode.mm | 2 ++ 2 files changed, 7 insertions(+) diff --git a/AsyncDisplayKit/ASVideoNode.h b/AsyncDisplayKit/ASVideoNode.h index 178ceff5c7..e525d1a2dc 100644 --- a/AsyncDisplayKit/ASVideoNode.h +++ b/AsyncDisplayKit/ASVideoNode.h @@ -41,6 +41,11 @@ NS_ASSUME_NONNULL_BEGIN - (BOOL)isPlaying; @property (nullable, nonatomic, strong, readwrite) AVAsset *asset; +/** + ** @abstract The URL with which the asset was initialized. + ** @discussion Setting the URL will overwrite the current asset with a newly created AVURLAsset created from the given URL, and AVAsset *asset will point to that newly created AVURLAsset. Please don't set both assetURL and asset. + ** @return Current URL the asset was initialized or nil if no URL was given. + **/ @property (nullable, nonatomic, strong, readwrite) NSURL *assetURL; @property (nullable, nonatomic, strong, readwrite) AVVideoComposition *videoComposition; @property (nullable, nonatomic, strong, readwrite) AVAudioMix *audioMix; diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 8771e703d9..5f679f5cc1 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -442,6 +442,8 @@ static NSString * const kStatus = @"status"; - (void)setAssetURL:(NSURL *)assetURL { + ASDN::MutexLocker l(__instanceLock__); + if (!ASObjectIsEqual(assetURL, self.assetURL)) { self.asset = [AVURLAsset assetWithURL:assetURL]; } From 0c70bca2bd4fd57567df75f8cd6b871d66b01d92 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Thu, 21 Jul 2016 10:39:31 -0700 Subject: [PATCH 191/247] [ASVideoNode] Fix conditional that prevented local asset loading (#1962) * Fix conditional that prevented local asset loading * Allow setting new asset to clear previously set URL --- AsyncDisplayKit/ASVideoNode.mm | 35 +++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 5f679f5cc1..5165068961 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -69,6 +69,7 @@ static NSString * const kStatus = @"status"; ASVideoNodePlayerState _playerState; AVAsset *_asset; + NSURL *_assetURL; AVVideoComposition *_videoComposition; AVAudioMix *_audioMix; @@ -127,10 +128,10 @@ static NSString * const kStatus = @"status"; ASDN::MutexLocker l(__instanceLock__); AVPlayerItem *playerItem = nil; - if (self.assetURL != nil) { - playerItem = [[AVPlayerItem alloc] initWithURL:self.assetURL]; + if (_assetURL != nil) { + playerItem = [[AVPlayerItem alloc] initWithURL:_assetURL]; _asset = [playerItem asset]; - } else if (_asset != nil) { + } else { playerItem = [[AVPlayerItem alloc] initWithAsset:_asset]; } @@ -149,7 +150,7 @@ static NSString * const kStatus = @"status"; } } - if (![asset isPlayable]) { + if ([asset isPlayable] == NO) { NSLog(@"Asset is not playable."); return; } @@ -444,8 +445,8 @@ static NSString * const kStatus = @"status"; { ASDN::MutexLocker l(__instanceLock__); - if (!ASObjectIsEqual(assetURL, self.assetURL)) { - self.asset = [AVURLAsset assetWithURL:assetURL]; + if (ASObjectIsEqual(assetURL, self.assetURL) == NO) { + [self _setAndFetchAsset:[AVURLAsset assetWithURL:assetURL] url:assetURL]; } } @@ -453,7 +454,9 @@ static NSString * const kStatus = @"status"; { ASDN::MutexLocker l(__instanceLock__); - if ([_asset isKindOfClass:AVURLAsset.class]) { + if (_assetURL != nil) { + return _assetURL; + } else if ([_asset isKindOfClass:AVURLAsset.class]) { return ((AVURLAsset *)_asset).URL; } @@ -464,15 +467,9 @@ static NSString * const kStatus = @"status"; { ASDN::MutexLocker l(__instanceLock__); - if (ASAssetIsEqual(asset, _asset)) { - return; + if (ASAssetIsEqual(asset, _asset) == NO) { + [self _setAndFetchAsset:asset url:nil]; } - - [self clearFetchedData]; - - _asset = asset; - - [self setNeedsDataFetch]; } - (AVAsset *)asset @@ -481,6 +478,14 @@ static NSString * const kStatus = @"status"; return _asset; } +- (void)_setAndFetchAsset:(AVAsset *)asset url:(NSURL *)assetURL +{ + [self clearFetchedData]; + _asset = asset; + _assetURL = assetURL; + [self setNeedsDataFetch]; +} + - (void)setVideoComposition:(AVVideoComposition *)videoComposition { ASDN::MutexLocker l(__instanceLock__); From 8cde594de3bac0b7b3e8ca2234fc1c11009ce2a0 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 21 Jul 2016 14:37:51 -0700 Subject: [PATCH 192/247] [ASDataController] Add validation logic to the change set to throw exceptions on invalid updates (#1894) [_ASHierarchyChangeSet] Oopsy daisy [ASDataController] Tweak our update validation [ASHierarchyChangeSet] Fix bugs Finish up some stuff [ASDataController] Put some stuff back [ASChangeSetDataController] Always use changeset [ASDataController] Put other stuff back [_ASHierarchyChangeSet] Use fast enumeration [_ASHierarchyChangeSet] Fix assertion format strings, return on fail so we don't crash in production [ASDataController] Store data source item counts as vector rather than NSArray [ASDataController] Build some tests for the update validation [ASDataController] Fix issues with update validation Get rid of new file [ASDataController] Suppress changeset validation before initial reload [ASDataController] Make invalid update log vs. exception publicly toggleable --- AsyncDisplayKit.xcodeproj/project.pbxproj | 20 +- AsyncDisplayKit/ASDisplayNode+Beta.h | 14 + AsyncDisplayKit/ASDisplayNode.mm | 12 + ...troller.m => ASChangeSetDataController.mm} | 91 +++--- .../Details/ASDataController+Subclasses.h | 16 + AsyncDisplayKit/Details/ASDataController.h | 9 + AsyncDisplayKit/Details/ASDataController.mm | 31 +- .../Private/_ASHierarchyChangeSet.h | 66 +++- .../Private/_ASHierarchyChangeSet.mm | 296 +++++++++++++++--- ...onViewTests.m => ASCollectionViewTests.mm} | 155 +++++++-- Base/ASAssert.h | 4 +- 11 files changed, 567 insertions(+), 147 deletions(-) rename AsyncDisplayKit/Details/{ASChangeSetDataController.m => ASChangeSetDataController.mm} (62%) rename AsyncDisplayKitTests/{ASCollectionViewTests.m => ASCollectionViewTests.mm} (70%) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index a2f6965f13..9be9cc6860 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -273,13 +273,13 @@ 9CFFC6BE1CCAC52B006A6476 /* ASEnvironment.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */; }; 9CFFC6C01CCAC73C006A6476 /* ASViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6BF1CCAC73C006A6476 /* ASViewController.mm */; }; 9CFFC6C21CCAC768006A6476 /* ASTableNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9CFFC6C11CCAC768006A6476 /* ASTableNode.mm */; }; - 9F06E5CD1B4CAF4200F015D8 /* ASCollectionViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F06E5CC1B4CAF4200F015D8 /* ASCollectionViewTests.m */; }; + 9F06E5CD1B4CAF4200F015D8 /* ASCollectionViewTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9F06E5CC1B4CAF4200F015D8 /* ASCollectionViewTests.mm */; }; A2763D7A1CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = A2763D771CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h */; }; A37320101C571B740011FC94 /* ASTextNode+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = A373200E1C571B050011FC94 /* ASTextNode+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; AC026B581BD3F61800BBC17E /* ASStaticLayoutSpecSnapshotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B571BD3F61800BBC17E /* ASStaticLayoutSpecSnapshotTests.m */; }; AC026B6A1BD57D6F00BBC17E /* ASChangeSetDataController.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; }; - AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */; }; + AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.mm */; }; + AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.mm */; }; AC026B701BD57DBF00BBC17E /* _ASHierarchyChangeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */; }; AC026B711BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */; }; AC026B721BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm in Sources */ = {isa = PBXBuildFile; fileRef = AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */; }; @@ -1011,14 +1011,14 @@ 9CFFC6BD1CCAC52B006A6476 /* ASEnvironment.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASEnvironment.mm; sourceTree = ""; }; 9CFFC6BF1CCAC73C006A6476 /* ASViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASViewController.mm; sourceTree = ""; }; 9CFFC6C11CCAC768006A6476 /* ASTableNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASTableNode.mm; sourceTree = ""; }; - 9F06E5CC1B4CAF4200F015D8 /* ASCollectionViewTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = ASCollectionViewTests.m; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; + 9F06E5CC1B4CAF4200F015D8 /* ASCollectionViewTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASCollectionViewTests.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objc; }; A2763D771CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASPINRemoteImageDownloader.h; path = Details/ASPINRemoteImageDownloader.h; sourceTree = ""; }; A2763D781CBDD57D00A9ADBD /* ASPINRemoteImageDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ASPINRemoteImageDownloader.m; path = Details/ASPINRemoteImageDownloader.m; sourceTree = ""; }; A32FEDD31C501B6A004F642A /* ASTextKitFontSizeAdjuster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASTextKitFontSizeAdjuster.h; path = TextKit/ASTextKitFontSizeAdjuster.h; sourceTree = ""; }; A373200E1C571B050011FC94 /* ASTextNode+Beta.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASTextNode+Beta.h"; sourceTree = ""; }; AC026B571BD3F61800BBC17E /* ASStaticLayoutSpecSnapshotTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASStaticLayoutSpecSnapshotTests.m; sourceTree = ""; }; AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASChangeSetDataController.h; sourceTree = ""; }; - AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASChangeSetDataController.m; sourceTree = ""; }; + AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASChangeSetDataController.mm; sourceTree = ""; }; AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _ASHierarchyChangeSet.h; sourceTree = ""; }; AC026B6E1BD57DBF00BBC17E /* _ASHierarchyChangeSet.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = _ASHierarchyChangeSet.mm; sourceTree = ""; }; AC21EC0F1B3D0BF600C8B19A /* ASStackLayoutDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASStackLayoutDefines.h; path = AsyncDisplayKit/Layout/ASStackLayoutDefines.h; sourceTree = ""; }; @@ -1346,7 +1346,7 @@ 29CDC2E11AAE70D000833CA4 /* ASBasicImageDownloaderContextTests.m */, CC7FD9E01BB5F750005CCB2B /* ASPhotosFrameworkImageRequestTests.m */, 296A0A341A951ABF005ACEAA /* ASBatchFetchingTests.m */, - 9F06E5CC1B4CAF4200F015D8 /* ASCollectionViewTests.m */, + 9F06E5CC1B4CAF4200F015D8 /* ASCollectionViewTests.mm */, 2911485B1A77147A005D0878 /* ASControlNodeTests.m */, ACF6ED541B178DC700DA7C62 /* ASDimensionTests.mm */, 058D0A2D195D057000B7D73C /* ASDisplayLayerTests.m */, @@ -1582,7 +1582,7 @@ 464052191A3F83C40061C0BA /* ASDataController.h */, 4640521A1A3F83C40061C0BA /* ASDataController.mm */, AC026B671BD57D6F00BBC17E /* ASChangeSetDataController.h */, - AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.m */, + AC026B681BD57D6F00BBC17E /* ASChangeSetDataController.mm */, E5711A2A1C840C81009619D4 /* ASIndexedNodeContext.h */, E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.mm */, ); @@ -2145,7 +2145,7 @@ 9C70F2041CDA4EFA007D6C76 /* ASTraitCollection.m in Sources */, 92074A691CC8BADA00918F75 /* ASControlNode+tvOS.m in Sources */, ACF6ED321B17843500DA7C62 /* ASStaticLayoutSpec.mm in Sources */, - AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */, + AC026B6B1BD57D6F00BBC17E /* ASChangeSetDataController.mm in Sources */, 68355B311CB5799E001D4E68 /* ASImageNode+AnimatedImage.mm in Sources */, 9CFFC6C01CCAC73C006A6476 /* ASViewController.mm in Sources */, 055F1A3519ABD3E3004DAFF1 /* ASTableView.mm in Sources */, @@ -2169,7 +2169,7 @@ 242995D31B29743C00090100 /* ASBasicImageDownloaderTests.m in Sources */, 296A0A351A951ABF005ACEAA /* ASBatchFetchingTests.m in Sources */, ACF6ED5C1B178DC700DA7C62 /* ASCenterLayoutSpecSnapshotTests.mm in Sources */, - 9F06E5CD1B4CAF4200F015D8 /* ASCollectionViewTests.m in Sources */, + 9F06E5CD1B4CAF4200F015D8 /* ASCollectionViewTests.mm in Sources */, 2911485C1A77147A005D0878 /* ASControlNodeTests.m in Sources */, CC3B208E1C3F7D0A00798563 /* ASWeakSetTests.m in Sources */, F711994E1D20C21100568860 /* ASDisplayNodeExtrasTests.m in Sources */, @@ -2311,7 +2311,7 @@ 34EFC7781B701D3100AD841F /* ASStackUnpositionedLayout.mm in Sources */, DE84918E1C8FFF9F003D89E9 /* ASRunLoopQueue.mm in Sources */, 68FC85E51CE29B7E00EDD713 /* ASTabBarController.m in Sources */, - AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.m in Sources */, + AC026B6C1BD57D6F00BBC17E /* ASChangeSetDataController.mm in Sources */, 34EFC7741B701D0A00AD841F /* ASStaticLayoutSpec.mm in Sources */, 92074A6A1CC8BADA00918F75 /* ASControlNode+tvOS.m in Sources */, DB78412E1C6BCE1600A9E2B4 /* _ASTransitionContext.m in Sources */, diff --git a/AsyncDisplayKit/ASDisplayNode+Beta.h b/AsyncDisplayKit/ASDisplayNode+Beta.h index eb76bb470c..b44715c97e 100644 --- a/AsyncDisplayKit/ASDisplayNode+Beta.h +++ b/AsyncDisplayKit/ASDisplayNode+Beta.h @@ -23,6 +23,20 @@ ASDISPLAYNODE_EXTERN_C_END + (BOOL)usesImplicitHierarchyManagement; + (void)setUsesImplicitHierarchyManagement:(BOOL)enabled; +/** + * ASTableView and ASCollectionView now throw exceptions on invalid updates + * like their UIKit counterparts. If YES, these classes will log messages + * on invalid updates rather than throwing exceptions. + * + * Note that even if AsyncDisplayKit's exception is suppressed, the app may still crash + * as it proceeds with an invalid update. + * + * This currently defaults to YES. In a future release it will default to NO and later + * be removed entirely. + */ ++ (BOOL)suppressesInvalidCollectionUpdateExceptions; ++ (void)setSuppressesInvalidCollectionUpdateExceptions:(BOOL)suppresses; + /** @name Layout */ diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 3eb2b26ee1..4dac0e4e5e 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -89,6 +89,18 @@ static BOOL usesImplicitHierarchyManagement = NO; usesImplicitHierarchyManagement = enabled; } +static BOOL suppressesInvalidCollectionUpdateExceptions = YES; + ++ (BOOL)suppressesInvalidCollectionUpdateExceptions +{ + return suppressesInvalidCollectionUpdateExceptions; +} + ++ (void)setSuppressesInvalidCollectionUpdateExceptions:(BOOL)suppresses +{ + suppressesInvalidCollectionUpdateExceptions = suppresses; +} + BOOL ASDisplayNodeSubclassOverridesSelector(Class subclass, SEL selector) { return ASSubclassOverridesSelector([ASDisplayNode class], subclass, selector); diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.m b/AsyncDisplayKit/Details/ASChangeSetDataController.mm similarity index 62% rename from AsyncDisplayKit/Details/ASChangeSetDataController.m rename to AsyncDisplayKit/Details/ASChangeSetDataController.mm index 99a5bc81b2..0660b87d49 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.m +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.mm @@ -13,6 +13,7 @@ #import "ASChangeSetDataController.h" #import "_ASHierarchyChangeSet.h" #import "ASAssert.h" +#import "ASDataController+Subclasses.h" @implementation ASChangeSetDataController { NSInteger _changeSetBatchUpdateCounter; @@ -26,8 +27,8 @@ // NOTE: This assertion is failing in some apps and will be enabled soon. // ASDisplayNodeAssertMainThread(); if (_changeSetBatchUpdateCounter <= 0) { - _changeSet = [_ASHierarchyChangeSet new]; _changeSetBatchUpdateCounter = 0; + _changeSet = [[_ASHierarchyChangeSet alloc] initWithOldData:[self itemCountsFromDataSource]]; } _changeSetBatchUpdateCounter++; } @@ -43,12 +44,18 @@ // NSAssert(_changeSetBatchUpdateCounter >= 0, @"endUpdatesAnimated:completion: called without having a balanced beginUpdates call"); if (_changeSetBatchUpdateCounter == 0) { - [_changeSet markCompleted]; + if (!self.initialReloadDataHasBeenCalled) { + if (completion) { + completion(YES); + } + _changeSet = nil; + return; + } + + [self invalidateDataSourceItemCounts]; + [_changeSet markCompletedWithNewItemCounts:[self itemCountsFromDataSource]]; [super beginUpdates]; - - NSAssert([_changeSet itemChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload item changes to have been converted into insert/deletes."); - NSAssert([_changeSet sectionChangesOfType:_ASHierarchyChangeTypeReload].count == 0, @"Expected reload section changes to have been converted into insert/deletes."); for (_ASHierarchyItemChange *change in [_changeSet itemChangesOfType:_ASHierarchyChangeTypeDelete]) { [super deleteRowsAtIndexPaths:change.indexPaths withAnimationOptions:change.animationOptions]; @@ -85,45 +92,34 @@ - (void)insertSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet insertSections:sections animationOptions:animationOptions]; - } else { - [super insertSections:sections withAnimationOptions:animationOptions]; - } + [self beginUpdates]; + [_changeSet insertSections:sections animationOptions:animationOptions]; + [self endUpdates]; } - (void)deleteSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet deleteSections:sections animationOptions:animationOptions]; - } else { - [super deleteSections:sections withAnimationOptions:animationOptions]; - } + [self beginUpdates]; + [_changeSet deleteSections:sections animationOptions:animationOptions]; + [self endUpdates]; } - (void)reloadSections:(NSIndexSet *)sections withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet reloadSections:sections animationOptions:animationOptions]; - } else { - [self beginUpdates]; - [super deleteSections:sections withAnimationOptions:animationOptions]; - [super insertSections:sections withAnimationOptions:animationOptions]; - [self endUpdates]; - } + [self beginUpdates]; + [_changeSet reloadSections:sections animationOptions:animationOptions]; + [self endUpdates]; } - (void)moveSection:(NSInteger)section toSection:(NSInteger)newSection withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet deleteSections:[NSIndexSet indexSetWithIndex:section] animationOptions:animationOptions]; - [_changeSet insertSections:[NSIndexSet indexSetWithIndex:newSection] animationOptions:animationOptions]; - } else { - [super moveSection:section toSection:newSection withAnimationOptions:animationOptions]; - } + [self beginUpdates]; + [_changeSet deleteSections:[NSIndexSet indexSetWithIndex:section] animationOptions:animationOptions]; + [_changeSet insertSections:[NSIndexSet indexSetWithIndex:newSection] animationOptions:animationOptions]; + [self endUpdates]; } #pragma mark - Row Editing (External API) @@ -131,45 +127,34 @@ - (void)insertRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet insertItems:indexPaths animationOptions:animationOptions]; - } else { - [super insertRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - } + [self beginUpdates]; + [_changeSet insertItems:indexPaths animationOptions:animationOptions]; + [self endUpdates]; } - (void)deleteRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet deleteItems:indexPaths animationOptions:animationOptions]; - } else { - [super deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - } + [self beginUpdates]; + [_changeSet deleteItems:indexPaths animationOptions:animationOptions]; + [self endUpdates]; } - (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet reloadItems:indexPaths animationOptions:animationOptions]; - } else { - [self beginUpdates]; - [super deleteRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - [super insertRowsAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; - [self endUpdates]; - } + [self beginUpdates]; + [_changeSet reloadItems:indexPaths animationOptions:animationOptions]; + [self endUpdates]; } - (void)moveRowAtIndexPath:(NSIndexPath *)indexPath toIndexPath:(NSIndexPath *)newIndexPath withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssertMainThread(); - if ([self batchUpdating]) { - [_changeSet deleteItems:@[indexPath] animationOptions:animationOptions]; - [_changeSet insertItems:@[newIndexPath] animationOptions:animationOptions]; - } else { - [super moveRowAtIndexPath:indexPath toIndexPath:newIndexPath withAnimationOptions:animationOptions]; - } + [self beginUpdates]; + [_changeSet deleteItems:@[indexPath] animationOptions:animationOptions]; + [_changeSet insertItems:@[newIndexPath] animationOptions:animationOptions]; + [self endUpdates]; } @end diff --git a/AsyncDisplayKit/Details/ASDataController+Subclasses.h b/AsyncDisplayKit/Details/ASDataController+Subclasses.h index 099a9bfe45..7df6e8b2d9 100644 --- a/AsyncDisplayKit/Details/ASDataController+Subclasses.h +++ b/AsyncDisplayKit/Details/ASDataController+Subclasses.h @@ -9,6 +9,7 @@ // #pragma once +#import @class ASIndexedNodeContext; @@ -33,6 +34,21 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (NSMutableArray *)completedNodesOfKind:(NSString *)kind; +/** + * Ensure that next time `itemCountsFromDataSource` is called, new values are retrieved. + * + * This must be called on the main thread. + */ +- (void)invalidateDataSourceItemCounts; + +/** + * Returns the most recently gathered item counts from the data source. If the counts + * have been invalidated, this synchronously queries the data source and saves the result. + * + * This must be called on the main thread. + */ +- (std::vector)itemCountsFromDataSource; + #pragma mark - Node sizing /** diff --git a/AsyncDisplayKit/Details/ASDataController.h b/AsyncDisplayKit/Details/ASDataController.h index a740d4f1ce..84599c1a97 100644 --- a/AsyncDisplayKit/Details/ASDataController.h +++ b/AsyncDisplayKit/Details/ASDataController.h @@ -124,6 +124,15 @@ FOUNDATION_EXPORT NSString * const ASDataControllerRowNodeKind; */ @property (nonatomic, weak) id environmentDelegate; +/** + * Returns YES if reloadData has been called at least once. Before this point it is + * important to ignore/suppress some operations. For example, inserting a section + * before the initial data load should have no effect. + * + * This must be called on the main thread. + */ +@property (nonatomic, readonly) BOOL initialReloadDataHasBeenCalled; + /** @name Data Updating */ - (void)beginUpdates; diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 08bab41596..cd43b9e4a1 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -35,6 +35,8 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; NSMutableArray *_externalCompletedNodes; // Main thread only. External data access can immediately query this if available. NSMutableDictionary *_completedNodes; // Main thread only. External data access can immediately query this if _externalCompletedNodes is unavailable. NSMutableDictionary *_editingNodes; // Modified on _editingTransactionQueue only. Updates propagated to _completedNodes. + BOOL _itemCountsFromDataSourceAreValid; // Main thread only. + std::vector _itemCountsFromDataSource; // Main thread only. ASMainSerialQueue *_mainSerialQueue; @@ -237,6 +239,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; - (void)insertNodes:(NSArray *)nodes ofKind:(NSString *)kind atIndexPaths:(NSArray *)indexPaths completion:(ASDataControllerCompletionBlock)completionBlock { + ASSERT_ON_EDITING_QUEUE; if (!indexPaths.count || _dataSource == nil) { return; } @@ -411,6 +414,10 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; NSIndexSet *sectionIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)]; NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sectionIndexSet]; + [self invalidateDataSourceItemCounts]; + // Fetch the new item counts upfront. + [self itemCountsFromDataSource]; + // Allow subclasses to perform setup before going into the edit transaction [self prepareForReloadData]; @@ -494,6 +501,29 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; return contexts; } +- (void)invalidateDataSourceItemCounts +{ + ASDisplayNodeAssertMainThread(); + _itemCountsFromDataSourceAreValid = NO; +} + +- (std::vector)itemCountsFromDataSource +{ + ASDisplayNodeAssertMainThread(); + if (NO == _itemCountsFromDataSourceAreValid) { + id source = self.dataSource; + NSInteger sectionCount = [source numberOfSectionsInDataController:self]; + std::vector newCounts; + newCounts.reserve(sectionCount); + for (NSInteger i = 0; i < sectionCount; i++) { + newCounts.push_back([source dataController:self rowsInSection:i]); + } + _itemCountsFromDataSource = newCounts; + _itemCountsFromDataSourceAreValid = YES; + } + return _itemCountsFromDataSource; +} + #pragma mark - Batching (External API) - (void)beginUpdates @@ -720,7 +750,6 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); LOG(@"Edit Command - insertRows: %@", indexPaths); - dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); // Sort indexPath to avoid messing up the index when inserting in several batches diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h index ebabc3e950..af5839508c 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.h @@ -11,17 +11,51 @@ // #import +#import NS_ASSUME_NONNULL_BEGIN typedef NSUInteger ASDataControllerAnimationOptions; typedef NS_ENUM(NSInteger, _ASHierarchyChangeType) { + /** + * A reload change, as submitted by the user. When a change set is + * completed, these changes are decomposed into delete-insert pairs + * and combined with the original deletes and inserts of the change. + */ _ASHierarchyChangeTypeReload, + + /** + * A change that was either an original delete, or the first + * part of a decomposed reload. + */ _ASHierarchyChangeTypeDelete, - _ASHierarchyChangeTypeInsert + + /** + * A change that was submitted by the user as a delete. + */ + _ASHierarchyChangeTypeOriginalDelete, + + /** + * A change that was either an original insert, or the second + * part of a decomposed reload. + */ + _ASHierarchyChangeTypeInsert, + + /** + * A change that was submitted by the user as an insert. + */ + _ASHierarchyChangeTypeOriginalInsert }; +/** + * Returns YES if the given change type is either .Insert or .Delete, NO otherwise. + * Other change types – .Reload, .OriginalInsert, .OriginalDelete – are + * intermediary types used while building the change set. All changes will + * be reduced to either .Insert or .Delete when the change is marked completed. + */ +BOOL ASHierarchyChangeTypeIsFinal(_ASHierarchyChangeType changeType); + NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); @interface _ASHierarchySectionChange : NSObject @@ -31,6 +65,12 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); @property (nonatomic, strong, readonly) NSIndexSet *indexSet; @property (nonatomic, readonly) _ASHierarchyChangeType changeType; + +/** + * If this is a .OriginalInsert or .OriginalDelete change, this returns a copied change + * with type .Insert or .Delete. Calling this on changes of other types is an error. + */ +- (_ASHierarchySectionChange *)changeByFinalizingType; @end @interface _ASHierarchyItemChange : NSObject @@ -42,10 +82,18 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); @property (nonatomic, readonly) _ASHierarchyChangeType changeType; + (NSDictionary *)sectionToIndexSetMapFromChanges:(NSArray<_ASHierarchyItemChange *> *)changes ofType:(_ASHierarchyChangeType)changeType; + +/** + * If this is a .OriginalInsert or .OriginalDelete change, this returns a copied change + * with type .Insert or .Delete. Calling this on changes of other types is an error. + */ +- (_ASHierarchyItemChange *)changeByFinalizingType; @end @interface _ASHierarchyChangeSet : NSObject +- (instancetype)initWithOldData:(std::vector)oldItemCounts NS_DESIGNATED_INITIALIZER; + /// @precondition The change set must be completed. @property (nonatomic, strong, readonly) NSIndexSet *deletedSections; /// @precondition The change set must be completed. @@ -63,22 +111,8 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType); /// Call this once the change set has been constructed to prevent future modifications to the changeset. Calling this more than once is a programmer error. /// NOTE: Calling this method will cause the changeset to convert all reloads into delete/insert pairs. -- (void)markCompleted; +- (void)markCompletedWithNewItemCounts:(std::vector)newItemCounts; -/** - @abstract Return sorted changes of the given type, grouped by animation options. - - Items deleted from deleted sections are not reported. - Items inserted into inserted sections are not reported. - Items reloaded in reloaded sections are not reported. - - The safe order for processing change groups is: - - Reloaded sections & reloaded items - - Deleted items, descending order - - Deleted sections, descending order - - Inserted sections, ascending order - - Inserted items, ascending order - */ - (nullable NSArray <_ASHierarchySectionChange *> *)sectionChangesOfType:(_ASHierarchyChangeType)changeType; - (nullable NSArray <_ASHierarchyItemChange *> *)itemChangesOfType:(_ASHierarchyChangeType)changeType; diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm index 104c58ebb7..aaf6998e44 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm @@ -14,15 +14,37 @@ #import "ASInternalHelpers.h" #import "NSIndexSet+ASHelpers.h" #import "ASAssert.h" +#import "ASDisplayNode+Beta.h" #import +#define ASFailUpdateValidation(...)\ + if ([ASDisplayNode suppressesInvalidCollectionUpdateExceptions]) {\ + NSLog(__VA_ARGS__);\ + } else {\ + ASDisplayNodeFailAssert(__VA_ARGS__);\ + } + +BOOL ASHierarchyChangeTypeIsFinal(_ASHierarchyChangeType changeType) { + switch (changeType) { + case _ASHierarchyChangeTypeInsert: + case _ASHierarchyChangeTypeDelete: + return YES; + default: + return NO; + } +} + NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) { switch (changeType) { case _ASHierarchyChangeTypeInsert: return @"Insert"; + case _ASHierarchyChangeTypeOriginalInsert: + return @"OriginalInsert"; case _ASHierarchyChangeTypeDelete: return @"Delete"; + case _ASHierarchyChangeTypeOriginalDelete: + return @"OriginalDelete"; case _ASHierarchyChangeTypeReload: return @"Reload"; default: @@ -35,9 +57,9 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) /** On return `changes` is sorted according to the change type with changes coalesced by animationOptions - Assumes: `changes` is [_ASHierarchySectionChange] all with the same changeType + Assumes: `changes` all have the same changeType */ -+ (void)sortAndCoalesceChanges:(NSMutableArray *)changes; ++ (void)sortAndCoalesceSectionChanges:(NSMutableArray<_ASHierarchySectionChange *> *)changes; /// Returns all the indexes from all the `indexSet`s of the given `_ASHierarchySectionChange` objects. + (NSMutableIndexSet *)allIndexesInSectionChanges:(NSArray *)changes; @@ -48,46 +70,72 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) /** On return `changes` is sorted according to the change type with changes coalesced by animationOptions - Assumes: `changes` is [_ASHierarchyItemChange] all with the same changeType + Assumes: `changes` all have the same changeType */ -+ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)sections; ++ (void)sortAndCoalesceItemChanges:(NSMutableArray<_ASHierarchyItemChange *> *)changes ignoringChangesInSections:(NSIndexSet *)sections; @end @interface _ASHierarchyChangeSet () @property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *insertItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *originalInsertItemChanges; + @property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *deleteItemChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *originalDeleteItemChanges; + @property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchyItemChange *> *reloadItemChanges; + @property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *insertSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *originalInsertSectionChanges; + @property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *deleteSectionChanges; +@property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *originalDeleteSectionChanges; + @property (nonatomic, strong, readonly) NSMutableArray<_ASHierarchySectionChange *> *reloadSectionChanges; @end -@implementation _ASHierarchyChangeSet +@implementation _ASHierarchyChangeSet { + std::vector _oldItemCounts; + std::vector _newItemCounts; +} - (instancetype)init +{ + ASFailUpdateValidation(@"_ASHierarchyChangeSet: -init is not supported. Call -initWithOldData:"); + return [self initWithOldData:std::vector()]; +} + +- (instancetype)initWithOldData:(std::vector)oldItemCounts { self = [super init]; if (self) { + _oldItemCounts = oldItemCounts; - _insertItemChanges = [NSMutableArray new]; - _deleteItemChanges = [NSMutableArray new]; - _reloadItemChanges = [NSMutableArray new]; - _insertSectionChanges = [NSMutableArray new]; - _deleteSectionChanges = [NSMutableArray new]; - _reloadSectionChanges = [NSMutableArray new]; + _originalInsertItemChanges = [[NSMutableArray alloc] init]; + _insertItemChanges = [[NSMutableArray alloc] init]; + _originalDeleteItemChanges = [[NSMutableArray alloc] init]; + _deleteItemChanges = [[NSMutableArray alloc] init]; + _reloadItemChanges = [[NSMutableArray alloc] init]; + + _originalInsertSectionChanges = [[NSMutableArray alloc] init]; + _insertSectionChanges = [[NSMutableArray alloc] init]; + _originalDeleteSectionChanges = [[NSMutableArray alloc] init]; + _deleteSectionChanges = [[NSMutableArray alloc] init]; + _reloadSectionChanges = [[NSMutableArray alloc] init]; } return self; } #pragma mark External API -- (void)markCompleted +- (void)markCompletedWithNewItemCounts:(std::vector)newItemCounts { NSAssert(!_completed, @"Attempt to mark already-completed changeset as completed."); _completed = YES; + _newItemCounts = newItemCounts; [self _sortAndCoalesceChangeArrays]; + [self _validateUpdate]; } - (NSArray *)sectionChangesOfType:(_ASHierarchyChangeType)changeType @@ -100,8 +148,13 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return _reloadSectionChanges; case _ASHierarchyChangeTypeDelete: return _deleteSectionChanges; + case _ASHierarchyChangeTypeOriginalDelete: + return _originalDeleteSectionChanges; + case _ASHierarchyChangeTypeOriginalInsert: + return _originalInsertSectionChanges; default: NSAssert(NO, @"Request for section changes with invalid type: %lu", (long)changeType); + return nil; } } @@ -115,8 +168,13 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return _reloadItemChanges; case _ASHierarchyChangeTypeDelete: return _deleteItemChanges; + case _ASHierarchyChangeTypeOriginalInsert: + return _originalInsertItemChanges; + case _ASHierarchyChangeTypeOriginalDelete: + return _originalDeleteItemChanges; default: NSAssert(NO, @"Request for item changes with invalid type: %lu", (long)changeType); + return nil; } } @@ -147,29 +205,29 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) - (void)deleteItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options { [self _ensureNotCompleted]; - _ASHierarchyItemChange *change = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexPaths:indexPaths animationOptions:options presorted:NO]; - [_deleteItemChanges addObject:change]; + _ASHierarchyItemChange *change = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeOriginalDelete indexPaths:indexPaths animationOptions:options presorted:NO]; + [_originalDeleteItemChanges addObject:change]; } - (void)deleteSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options { [self _ensureNotCompleted]; - _ASHierarchySectionChange *change = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeDelete indexSet:sections animationOptions:options]; - [_deleteSectionChanges addObject:change]; + _ASHierarchySectionChange *change = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeOriginalDelete indexSet:sections animationOptions:options]; + [_originalDeleteSectionChanges addObject:change]; } - (void)insertItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options { [self _ensureNotCompleted]; - _ASHierarchyItemChange *change = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexPaths:indexPaths animationOptions:options presorted:NO]; - [_insertItemChanges addObject:change]; + _ASHierarchyItemChange *change = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeOriginalInsert indexPaths:indexPaths animationOptions:options presorted:NO]; + [_originalInsertItemChanges addObject:change]; } - (void)insertSections:(NSIndexSet *)sections animationOptions:(ASDataControllerAnimationOptions)options { [self _ensureNotCompleted]; - _ASHierarchySectionChange *change = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexSet:sections animationOptions:options]; - [_insertSectionChanges addObject:change]; + _ASHierarchySectionChange *change = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeOriginalInsert indexSet:sections animationOptions:options]; + [_originalInsertSectionChanges addObject:change]; } - (void)reloadItems:(NSArray *)indexPaths animationOptions:(ASDataControllerAnimationOptions)options @@ -207,13 +265,19 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) // Split reloaded sections into [delete(oldIndex), insert(newIndex)] // Give these their "pre-reloads" values. Once we add in the reloads we'll re-process them. - _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; - _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; + _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_originalDeleteSectionChanges]; + _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_originalInsertSectionChanges]; + for (_ASHierarchySectionChange *originalDeleteSectionChange in _originalDeleteSectionChanges) { + [_deleteSectionChanges addObject:[originalDeleteSectionChange changeByFinalizingType]]; + } + for (_ASHierarchySectionChange *originalInsertSectionChange in _originalInsertSectionChanges) { + [_insertSectionChanges addObject:[originalInsertSectionChange changeByFinalizingType]]; + } for (_ASHierarchySectionChange *change in _reloadSectionChanges) { NSIndexSet *newSections = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { NSUInteger newSec = [self newSectionForOldSection:idx]; - NSAssert(newSec != NSNotFound, @"Request to reload deleted section %lu", (unsigned long)idx); + ASDisplayNodeAssert(newSec != NSNotFound, @"Request to reload and delete same section %zu", idx); return newSec; }]; @@ -223,15 +287,19 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) _ASHierarchySectionChange *insertChange = [[_ASHierarchySectionChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexSet:newSections animationOptions:change.animationOptions]; [_insertSectionChanges addObject:insertChange]; } - - _reloadSectionChanges = nil; - [_ASHierarchySectionChange sortAndCoalesceChanges:_deleteSectionChanges]; - [_ASHierarchySectionChange sortAndCoalesceChanges:_insertSectionChanges]; + [_ASHierarchySectionChange sortAndCoalesceSectionChanges:_deleteSectionChanges]; + [_ASHierarchySectionChange sortAndCoalesceSectionChanges:_insertSectionChanges]; _deletedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_deleteSectionChanges]; _insertedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_insertSectionChanges]; // Split reloaded items into [delete(oldIndexPath), insert(newIndexPath)] + for (_ASHierarchyItemChange *originalDeleteItemChange in _originalDeleteItemChanges) { + [_deleteItemChanges addObject:[originalDeleteItemChange changeByFinalizingType]]; + } + for (_ASHierarchyItemChange *originalInsertItemChange in _originalInsertItemChanges) { + [_insertItemChanges addObject:[originalInsertItemChange changeByFinalizingType]]; + } NSDictionary *insertedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_insertItemChanges ofType:_ASHierarchyChangeTypeInsert]; NSDictionary *deletedIndexPathsMap = [_ASHierarchyItemChange sectionToIndexSetMapFromChanges:_deleteItemChanges ofType:_ASHierarchyChangeTypeDelete]; @@ -268,13 +336,124 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) _ASHierarchyItemChange *insertItemChangeFromReloadChange = [[_ASHierarchyItemChange alloc] initWithChangeType:_ASHierarchyChangeTypeInsert indexPaths:newIndexPaths animationOptions:change.animationOptions presorted:NO]; [_insertItemChanges addObject:insertItemChangeFromReloadChange]; } - _reloadItemChanges = nil; // Ignore item deletes in reloaded/deleted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_deleteItemChanges ignoringChangesInSections:_deletedSections]; + [_ASHierarchyItemChange sortAndCoalesceItemChanges:_deleteItemChanges ignoringChangesInSections:_deletedSections]; // Ignore item inserts in reloaded(new)/inserted sections. - [_ASHierarchyItemChange sortAndCoalesceChanges:_insertItemChanges ignoringChangesInSections:_insertedSections]; + [_ASHierarchyItemChange sortAndCoalesceItemChanges:_insertItemChanges ignoringChangesInSections:_insertedSections]; + } +} + +- (void)_validateUpdate +{ + NSIndexSet *allReloadedSections = [_ASHierarchySectionChange allIndexesInSectionChanges:_reloadSectionChanges]; + + NSInteger newSectionCount = _newItemCounts.size(); + NSInteger oldSectionCount = _oldItemCounts.size(); + + NSInteger insertedSectionCount = _insertedSections.count; + NSInteger deletedSectionCount = _deletedSections.count; + // Assert that the new section count is correct. + if (newSectionCount != oldSectionCount + insertedSectionCount - deletedSectionCount) { + ASFailUpdateValidation(@"Invalid number of sections. The number of sections after the update (%zd) must be equal to the number of sections before the update (%zd) plus or minus the number of sections inserted or deleted (%zu inserted, %zu deleted)", newSectionCount, oldSectionCount, insertedSectionCount, deletedSectionCount); + return; + } + + // Assert that no invalid deletes/reloads happened. + NSInteger invalidSectionDelete = NSNotFound; + if (oldSectionCount == 0) { + invalidSectionDelete = _deletedSections.firstIndex; + } else { + invalidSectionDelete = [_deletedSections indexGreaterThanIndex:oldSectionCount - 1]; + } + if (invalidSectionDelete != NSNotFound) { + ASFailUpdateValidation(@"Attempt to delete section %zd but there are only %zd sections before the update.", invalidSectionDelete, oldSectionCount); + return; + } + + for (_ASHierarchyItemChange *change in _deleteItemChanges) { + for (NSIndexPath *indexPath in change.indexPaths) { + // Assert that item delete happened in a valid section. + NSInteger section = indexPath.section; + NSInteger item = indexPath.item; + if (section >= oldSectionCount) { + ASFailUpdateValidation(@"Attempt to delete item %zd from section %zd, but there are only %zd sections before the update.", item, section, oldSectionCount); + return; + } + + // Assert that item delete happened to a valid item. + NSInteger oldItemCount = _oldItemCounts[section]; + if (item >= oldItemCount) { + ASFailUpdateValidation(@"Attempt to delete item %zd from section %zd, which only contains %zd items before the update.", item, section, oldItemCount); + return; + } + } + } + + for (_ASHierarchyItemChange *change in _insertItemChanges) { + for (NSIndexPath *indexPath in change.indexPaths) { + NSInteger section = indexPath.section; + NSInteger item = indexPath.item; + // Assert that item insert happened in a valid section. + if (section >= newSectionCount) { + ASFailUpdateValidation(@"Attempt to insert item %zd into section %zd, but there are only %zd sections after the update.", item, section, newSectionCount); + return; + } + + // Assert that item delete happened to a valid item. + NSInteger newItemCount = _newItemCounts[section]; + if (item >= newItemCount) { + ASFailUpdateValidation(@"Attempt to insert item %zd into section %zd, which only contains %zd items after the update.", item, section, newItemCount); + return; + } + } + } + + // Assert that no sections were inserted out of bounds. + NSInteger invalidSectionInsert = NSNotFound; + if (newSectionCount == 0) { + invalidSectionInsert = _insertedSections.firstIndex; + } else { + invalidSectionInsert = [_insertedSections indexGreaterThanIndex:newSectionCount - 1]; + } + if (invalidSectionInsert != NSNotFound) { + ASFailUpdateValidation(@"Attempt to insert section %zd but there are only %zd sections after the update.", invalidSectionInsert, newSectionCount); + return; + } + + for (NSUInteger oldSection = 0; oldSection < oldSectionCount; oldSection++) { + NSInteger oldItemCount = _oldItemCounts[oldSection]; + // If section was reloaded, ignore. + if ([allReloadedSections containsIndex:oldSection]) { + continue; + } + + // If section was deleted, ignore. + NSUInteger newSection = [self newSectionForOldSection:oldSection]; + if (newSection == NSNotFound) { + continue; + } + + NSIndexSet *originalInsertedItems = [self indexesForItemChangesOfType:_ASHierarchyChangeTypeOriginalInsert inSection:newSection]; + NSIndexSet *originalDeletedItems = [self indexesForItemChangesOfType:_ASHierarchyChangeTypeOriginalDelete inSection:oldSection]; + NSIndexSet *reloadedItems = [self indexesForItemChangesOfType:_ASHierarchyChangeTypeReload inSection:oldSection]; + + // Assert that no reloaded items were deleted. + NSInteger deletedReloadedItem = [originalDeletedItems as_intersectionWithIndexes:reloadedItems].firstIndex; + if (deletedReloadedItem != NSNotFound) { + ASFailUpdateValidation(@"Attempt to delete and reload the same item at index path %@", [NSIndexPath indexPathForItem:deletedReloadedItem inSection:oldSection]); + return; + } + + // Assert that the new item count is correct. + NSInteger newItemCount = _newItemCounts[newSection]; + NSInteger insertedItemCount = originalInsertedItems.count; + NSInteger deletedItemCount = originalDeletedItems.count; + if (newItemCount != oldItemCount + insertedItemCount - deletedItemCount) { + ASFailUpdateValidation(@"Invalid number of items in section %zd. The number of items after the update (%zd) must be equal to the number of items before the update (%zd) plus or minus the number of items inserted or deleted (%zd inserted, %zd deleted).", oldSection, newItemCount, oldItemCount, insertedItemCount, deletedItemCount); + return; + } } } @@ -300,14 +479,33 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return self; } -+ (void)sortAndCoalesceChanges:(NSMutableArray *)changes +- (_ASHierarchySectionChange *)changeByFinalizingType { - if (changes.count < 1) { + _ASHierarchyChangeType newType; + switch (_changeType) { + case _ASHierarchyChangeTypeOriginalInsert: + newType = _ASHierarchyChangeTypeInsert; + break; + case _ASHierarchyChangeTypeOriginalDelete: + newType = _ASHierarchyChangeTypeDelete; + break; + default: + ASFailUpdateValidation(@"Attempt to finalize section change of invalid type %@.", NSStringFromASHierarchyChangeType(_changeType)); + return self; + } + return [[_ASHierarchySectionChange alloc] initWithChangeType:newType indexSet:_indexSet animationOptions:_animationOptions]; +} + ++ (void)sortAndCoalesceSectionChanges:(NSMutableArray<_ASHierarchySectionChange *> *)changes +{ + _ASHierarchySectionChange *firstChange = changes.firstObject; + if (firstChange == nil) { return; } + _ASHierarchyChangeType type = [firstChange changeType]; - _ASHierarchyChangeType type = [changes.firstObject changeType]; - + ASDisplayNodeAssert(ASHierarchyChangeTypeIsFinal(type), @"Attempt to sort and coalesce section changes of intermediary type %@. Why?", NSStringFromASHierarchyChangeType(type)); + // Lookup table [Int: AnimationOptions] __block std::unordered_map animationOptions; @@ -326,12 +524,12 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) } // Create new changes by grouping sorted changes by animation option - NSMutableArray *result = [NSMutableArray new]; + NSMutableArray *result = [[NSMutableArray alloc] init]; __block ASDataControllerAnimationOptions currentOptions = 0; NSMutableIndexSet *currentIndexes = [NSMutableIndexSet indexSet]; - BOOL reverse = type == _ASHierarchyChangeTypeDelete; + BOOL reverse = type == _ASHierarchyChangeTypeDelete || type == _ASHierarchyChangeTypeOriginalDelete; NSEnumerationOptions options = reverse ? NSEnumerationReverse : kNilOptions; [allIndexes enumerateRangesWithOptions:options usingBlock:^(NSRange range, BOOL * _Nonnull stop) { @@ -423,19 +621,37 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) return sectionToIndexSetMap; } -+ (void)sortAndCoalesceChanges:(NSMutableArray *)changes ignoringChangesInSections:(NSIndexSet *)ignoredSections +- (_ASHierarchyItemChange *)changeByFinalizingType +{ + _ASHierarchyChangeType newType; + switch (_changeType) { + case _ASHierarchyChangeTypeOriginalInsert: + newType = _ASHierarchyChangeTypeInsert; + break; + case _ASHierarchyChangeTypeOriginalDelete: + newType = _ASHierarchyChangeTypeDelete; + break; + default: + ASFailUpdateValidation(@"Attempt to finalize item change of invalid type %@.", NSStringFromASHierarchyChangeType(_changeType)); + return self; + } + return [[_ASHierarchyItemChange alloc] initWithChangeType:newType indexPaths:_indexPaths animationOptions:_animationOptions presorted:YES]; +} + ++ (void)sortAndCoalesceItemChanges:(NSMutableArray<_ASHierarchyItemChange *> *)changes ignoringChangesInSections:(NSIndexSet *)ignoredSections { if (changes.count < 1) { return; } _ASHierarchyChangeType type = [changes.firstObject changeType]; - + ASDisplayNodeAssert(ASHierarchyChangeTypeIsFinal(type), @"Attempt to sort and coalesce item changes of intermediary type %@. Why?", NSStringFromASHierarchyChangeType(type)); + // Lookup table [NSIndexPath: AnimationOptions] NSMutableDictionary *animationOptions = [NSMutableDictionary new]; // All changed index paths, sorted - NSMutableArray *allIndexPaths = [NSMutableArray new]; + NSMutableArray *allIndexPaths = [[NSMutableArray alloc] init]; for (_ASHierarchyItemChange *change in changes) { for (NSIndexPath *indexPath in change.indexPaths) { @@ -450,7 +666,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) [allIndexPaths sortUsingSelector:sorting]; // Create new changes by grouping sorted changes by animation option - NSMutableArray *result = [NSMutableArray new]; + NSMutableArray *result = [[NSMutableArray alloc] init]; ASDataControllerAnimationOptions currentOptions = 0; NSMutableArray *currentIndexPaths = [NSMutableArray array]; diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.m b/AsyncDisplayKitTests/ASCollectionViewTests.mm similarity index 70% rename from AsyncDisplayKitTests/ASCollectionViewTests.m rename to AsyncDisplayKitTests/ASCollectionViewTests.mm index f20b0665c8..9986f0cd3a 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.m +++ b/AsyncDisplayKitTests/ASCollectionViewTests.mm @@ -14,6 +14,8 @@ #import "ASCollectionViewFlowLayoutInspector.h" #import "ASCellNode.h" #import "ASCollectionNode.h" +#import "ASDisplayNode+Beta.h" +#import @interface ASTextCellNodeWithSetSelectedCounter : ASTextCellNode @@ -33,17 +35,18 @@ @interface ASCollectionViewTestDelegate : NSObject -@property (nonatomic, assign) NSInteger numberOfSections; -@property (nonatomic, assign) NSInteger numberOfItemsInSection; - @end -@implementation ASCollectionViewTestDelegate +@implementation ASCollectionViewTestDelegate { + @package + std::vector _itemCounts; +} - (id)initWithNumberOfSections:(NSInteger)numberOfSections numberOfItemsInSection:(NSInteger)numberOfItemsInSection { if (self = [super init]) { - _numberOfSections = numberOfSections; - _numberOfItemsInSection = numberOfItemsInSection; + for (NSInteger i = 0; i < numberOfSections; i++) { + _itemCounts.push_back(numberOfItemsInSection); + } } return self; @@ -66,11 +69,11 @@ } - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView { - return self.numberOfSections; + return _itemCounts.size(); } - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - return self.numberOfItemsInSection; + return _itemCounts[section]; } @end @@ -84,23 +87,21 @@ @implementation ASCollectionViewTestController -- (void)viewDidLoad { - [super viewDidLoad]; - - self.asyncDelegate = [[ASCollectionViewTestDelegate alloc] initWithNumberOfSections:10 numberOfItemsInSection:10]; - - self.collectionView = [[ASCollectionView alloc] initWithFrame:self.view.bounds - collectionViewLayout:[UICollectionViewFlowLayout new]]; - self.collectionView.asyncDataSource = self.asyncDelegate; - self.collectionView.asyncDelegate = self.asyncDelegate; - - [self.view addSubview:self.collectionView]; -} - -- (void)viewWillLayoutSubviews { - [super viewWillLayoutSubviews]; - - self.collectionView.frame = self.view.bounds; +- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Populate these immediately so that they're not unexpectedly nil during tests. + self.asyncDelegate = [[ASCollectionViewTestDelegate alloc] initWithNumberOfSections:10 numberOfItemsInSection:10]; + + self.collectionView = [[ASCollectionView alloc] initWithFrame:self.view.bounds + collectionViewLayout:[UICollectionViewFlowLayout new]]; + self.collectionView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; + self.collectionView.asyncDataSource = self.asyncDelegate; + self.collectionView.asyncDelegate = self.asyncDelegate; + + [self.view addSubview:self.collectionView]; + } + return self; } @end @@ -252,4 +253,108 @@ XCTAssert([node conformsToProtocol:@protocol(ASRangeControllerUpdateRangeProtocol)]); } +#pragma mark - Update Validations + +#define updateValidationTestPrologue \ + [ASDisplayNode setSuppressesInvalidCollectionUpdateExceptions:NO];\ + ASCollectionViewTestController *testController = [[ASCollectionViewTestController alloc] initWithNibName:nil bundle:nil];\ + __unused ASCollectionViewTestDelegate *del = testController.asyncDelegate;\ + __unused ASCollectionView *cv = testController.collectionView;\ + UIWindow *window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];\ + window.rootViewController = testController;\ + \ + [testController.collectionView reloadDataImmediately];\ + [testController.collectionView layoutIfNeeded]; + +- (void)testThatSubmittingAValidInsertDoesNotThrowAnException +{ + updateValidationTestPrologue + NSInteger sectionCount = del->_itemCounts.size(); + + del->_itemCounts[sectionCount - 1]++; + XCTAssertNoThrow([cv insertItemsAtIndexPaths:@[ [NSIndexPath indexPathForItem:0 inSection:sectionCount - 1] ]]); +} + +- (void)testThatSubmittingAValidReloadDoesNotThrowAnException +{ + updateValidationTestPrologue + NSInteger sectionCount = del->_itemCounts.size(); + + XCTAssertNoThrow([cv reloadItemsAtIndexPaths:@[ [NSIndexPath indexPathForItem:0 inSection:sectionCount - 1] ]]); +} + +- (void)testThatSubmittingAnInvalidInsertThrowsAnException +{ + updateValidationTestPrologue + NSInteger sectionCount = del->_itemCounts.size(); + + XCTAssertThrows([cv insertItemsAtIndexPaths:@[ [NSIndexPath indexPathForItem:0 inSection:sectionCount + 1] ]]); +} + +- (void)testThatSubmittingAnInvalidDeleteThrowsAnException +{ + updateValidationTestPrologue + NSInteger sectionCount = del->_itemCounts.size(); + + XCTAssertThrows([cv deleteItemsAtIndexPaths:@[ [NSIndexPath indexPathForItem:0 inSection:sectionCount + 1] ]]); +} + +- (void)testThatDeletingAndReloadingTheSameItemThrowsAnException +{ + updateValidationTestPrologue + + XCTAssertThrows([cv performBatchUpdates:^{ + NSArray *indexPaths = @[ [NSIndexPath indexPathForItem:0 inSection:0] ]; + [cv deleteItemsAtIndexPaths:indexPaths]; + [cv reloadItemsAtIndexPaths:indexPaths]; + } completion:nil]); +} + +- (void)testThatHavingAnIncorrectSectionCountThrowsAnException +{ + updateValidationTestPrologue + + XCTAssertThrows([cv deleteSections:[NSIndexSet indexSetWithIndex:0]]); +} + +- (void)testThatHavingAnIncorrectItemCountThrowsAnException +{ + updateValidationTestPrologue + + XCTAssertThrows([cv deleteItemsAtIndexPaths:@[ [NSIndexPath indexPathForItem:0 inSection:0] ]]); +} + +- (void)testThatHavingAnIncorrectItemCountWithNoUpdatesThrowsAnException +{ + updateValidationTestPrologue + + XCTAssertThrows([cv performBatchUpdates:^{ + del->_itemCounts[0]++; + } completion:nil]); +} + +- (void)testThatInsertingAnInvalidSectionThrowsAnException +{ + updateValidationTestPrologue + NSInteger sectionCount = del->_itemCounts.size(); + + del->_itemCounts.push_back(10); + XCTAssertThrows([cv performBatchUpdates:^{ + [cv insertSections:[NSIndexSet indexSetWithIndex:sectionCount + 1]]; + } completion:nil]); +} + +- (void)testThatDeletingAndReloadingASectionThrowsAnException +{ + updateValidationTestPrologue + NSInteger sectionCount = del->_itemCounts.size(); + + del->_itemCounts.pop_back(); + XCTAssertThrows([cv performBatchUpdates:^{ + NSIndexSet *sections = [NSIndexSet indexSetWithIndex:sectionCount - 1]; + [cv reloadSections:sections]; + [cv deleteSections:sections]; + } completion:nil]); +} + @end diff --git a/Base/ASAssert.h b/Base/ASAssert.h index d3f88a44d3..2df66b37a7 100644 --- a/Base/ASAssert.h +++ b/Base/ASAssert.h @@ -48,8 +48,8 @@ #define ASDisplayNodeAssertFalse(condition) ASDisplayNodeAssertWithSignal(!(condition), nil, nil) #define ASDisplayNodeCAssertFalse(condition) ASDisplayNodeCAssertWithSignal(!(condition), nil, nil) -#define ASDisplayNodeFailAssert(description, ...) ASDisplayNodeAssertWithSignal(NO, nil, (description), ##__VA_ARGS__) -#define ASDisplayNodeCFailAssert(description, ...) ASDisplayNodeCAssertWithSignal(NO, nil, (description), ##__VA_ARGS__) +#define ASDisplayNodeFailAssert(description, ...) ASDisplayNodeAssertWithSignal(NO, (description), ##__VA_ARGS__) +#define ASDisplayNodeCFailAssert(description, ...) ASDisplayNodeCAssertWithSignal(NO, (description), ##__VA_ARGS__) #define ASDisplayNodeConditionalAssert(shouldTestCondition, condition, description, ...) ASDisplayNodeAssert((!(shouldTestCondition) || (condition)), nil, (description), ##__VA_ARGS__) #define ASDisplayNodeConditionalCAssert(shouldTestCondition, condition, description, ...) ASDisplayNodeCAssert((!(shouldTestCondition) || (condition)), nil, (description), ##__VA_ARGS__) From 4b9ee3c64de33e28c242df2e43d3e982938623a4 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 21 Jul 2016 14:41:19 -0700 Subject: [PATCH 193/247] Don't crash if inserting a nil node --- AsyncDisplayKit/ASDisplayNode.mm | 39 ++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 4dac0e4e5e..18e11365dd 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1315,7 +1315,7 @@ static inline CATransform3D _calculateTransformFromReferenceToTarget(ASDisplayNo return (id)[NSNull null]; } -#pragma mark - +#pragma mark - Managing the Node Hierarchy static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASDisplayNode *to) { @@ -1331,9 +1331,11 @@ static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASD ASDisplayNodeAssertThreadAffinity(self); ASDN::MutexLocker l(__instanceLock__); + ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode"); ASDisplayNode *oldParent = subnode.supernode; - if (!subnode || subnode == self || oldParent == self) + if (!subnode || subnode == self || oldParent == self) { return; + } // Disable appearance methods during move between supernodes, but make sure we restore their state after we do our thing BOOL isMovingEquivalentParents = disableNotificationsForMovingBetweenParents(oldParent, self); @@ -1342,8 +1344,9 @@ static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASD } [subnode removeFromSupernode]; - if (!_subnodes) + if (!_subnodes) { _subnodes = [[NSMutableArray alloc] init]; + } [_subnodes addObject:subnode]; @@ -1379,8 +1382,14 @@ static bool disableNotificationsForMovingBetweenParents(ASDisplayNode *from, ASD */ - (void)_insertSubnode:(ASDisplayNode *)subnode atSubnodeIndex:(NSInteger)subnodeIndex sublayerIndex:(NSInteger)sublayerIndex andRemoveSubnode:(ASDisplayNode *)oldSubnode { - if (subnodeIndex == NSNotFound) + if (subnodeIndex == NSNotFound) { return; + } + + ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode"); + if (!subnode) { + return; + } ASDisplayNode *oldParent = [subnode _deallocSafeSupernode]; // Disable appearance methods during move between supernodes, but make sure we restore their state after we do our thing @@ -1461,12 +1470,14 @@ static NSInteger incrementIfFound(NSInteger i) { ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode"); - if (!subnode) + if (!subnode) { return; + } ASDisplayNodeAssert([below _deallocSafeSupernode] == self, @"Node to insert below must be a subnode"); - if ([below _deallocSafeSupernode] != self) + if ([below _deallocSafeSupernode] != self) { return; + } ASDisplayNodeAssert(_subnodes, @"You should have subnodes if you have a subnode"); @@ -1504,12 +1515,14 @@ static NSInteger incrementIfFound(NSInteger i) { ASDN::MutexLocker l(__instanceLock__); ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode"); - if (!subnode) + if (!subnode) { return; + } ASDisplayNodeAssert([above _deallocSafeSupernode] == self, @"Node to insert above must be a subnode"); - if ([above _deallocSafeSupernode] != self) + if ([above _deallocSafeSupernode] != self) { return; + } ASDisplayNodeAssert(_subnodes, @"You should have subnodes if you have a subnode"); @@ -1553,7 +1566,12 @@ static NSInteger incrementIfFound(NSInteger i) { NSString *reason = [NSString stringWithFormat:@"Cannot insert a subnode at index %zd. Count is %zd", idx, _subnodes.count]; @throw [NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:nil]; } - + + ASDisplayNodeAssert(subnode, @"Cannot insert a nil subnode"); + if (!subnode) { + return; + } + NSInteger sublayerIndex = NSNotFound; // Account for potentially having other subviews @@ -1601,8 +1619,9 @@ static NSInteger incrementIfFound(NSInteger i) { // Don't call self.supernode here because that will retain/autorelease the supernode. This method -_removeSupernode: is often called while tearing down a node hierarchy, and the supernode in question might be in the middle of its -dealloc. The supernode is never messaged, only compared by value, so this is safe. // The particular issue that triggers this edge case is when a node calls -removeFromSupernode on a subnode from within its own -dealloc method. - if (!subnode || [subnode _deallocSafeSupernode] != self) + if (!subnode || [subnode _deallocSafeSupernode] != self) { return; + } [_subnodes removeObjectIdenticalTo:subnode]; From 9b47a9114a51ce0cf281ea4bbcef557b8ee88717 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 21 Jul 2016 14:52:21 -0700 Subject: [PATCH 194/247] Fix compiler warning in as_smallDescription on 32 bit (#1964) --- AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m index 15a4e9ec39..de3314c07a 100644 --- a/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m +++ b/AsyncDisplayKit/Details/NSIndexSet+ASHelpers.m @@ -68,9 +68,9 @@ NSMutableString *result = [NSMutableString stringWithString:@"{ "]; [self enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { if (range.length == 1) { - [result appendFormat:@"%zu ", (unsigned long)range.location]; + [result appendFormat:@"%tu ", range.location]; } else { - [result appendFormat:@"%zu-%lu ", (unsigned long)range.location, NSMaxRange(range) - 1]; + [result appendFormat:@"%tu-%tu ", range.location, NSMaxRange(range) - 1]; } }]; [result appendString:@"}"]; From bbe2fe5f4c3b65d0e32e0b7e49e1a9a72b52270f Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Thu, 21 Jul 2016 14:54:39 -0700 Subject: [PATCH 195/247] Add and fix tests for adding a nil subnode --- AsyncDisplayKitTests/ASDisplayNodeTests.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKitTests/ASDisplayNodeTests.m b/AsyncDisplayKitTests/ASDisplayNodeTests.m index e1efbe7bbc..9be86b49de 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeTests.m @@ -1127,7 +1127,7 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point { ASDisplayNode *parent = [[[ASDisplayNode alloc] init] autorelease]; ASDisplayNode *nilNode = nil; - XCTAssertNoThrow([parent addSubnode:nilNode], @"Don't try to add nil, but we'll deal."); + XCTAssertThrows([parent addSubnode:nilNode], @"Don't try to add nil, but we'll deal with it in production, but throw in development."); XCTAssertNoThrow([parent addSubnode:parent], @"Not good, test that we recover"); XCTAssertEqual(0u, parent.subnodes.count, @"We shouldn't have any subnodes"); } @@ -1320,6 +1320,9 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point XCTAssertEqual(3u, parent.subnodes.count, @"Should have the right subnode count"); XCTAssertEqualObjects(nilParent, d.supernode, @"d's parent is messed up"); + // Check insert a nil node + ASDisplayNode *nilNode = nil; + XCTAssertThrows([parent insertSubnode:nilNode atIndex:0], @"Should not allow insertion of nil node. We will throw in development and deal with it in production"); // Check insert at invalid index XCTAssertThrows([parent insertSubnode:d atIndex:NSNotFound], @"Should not allow insertion at invalid index"); From 3bfa60c445d63bcbd25ebae508b6c8dc13e87a2f Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 21 Jul 2016 15:52:24 -0700 Subject: [PATCH 196/247] Move ASDataController+Subclasses.h to fix Swift build --- AsyncDisplayKit.xcodeproj/project.pbxproj | 2 +- .../{Details => Private}/ASDataController+Subclasses.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename AsyncDisplayKit/{Details => Private}/ASDataController+Subclasses.h (100%) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 9be9cc6860..c237eb4706 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -1404,7 +1404,6 @@ 251B8EF51BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m */, 205F0E1B1B373A2C007741D0 /* ASCollectionViewLayoutController.h */, 205F0E1C1B373A2C007741D0 /* ASCollectionViewLayoutController.mm */, - 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */, 05A6D05819D0EB64002DD95E /* ASDealloc2MainObject.h */, 05A6D05919D0EB64002DD95E /* ASDealloc2MainObject.m */, 698548611CA9E025008A345F /* ASEnvironment.h */, @@ -1482,6 +1481,7 @@ 2967F9E11AB0A4CF0072E4AB /* ASBasicImageDownloaderInternal.h */, 044285051BAA63FE00D16268 /* ASBatchFetching.h */, 044285061BAA63FE00D16268 /* ASBatchFetching.m */, + 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */, AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */, AEB7B0191C5962EA00662EF4 /* ASDefaultPlayButton.m */, 058D0A08195D050800B7D73C /* ASDisplayNode+AsyncDisplay.mm */, diff --git a/AsyncDisplayKit/Details/ASDataController+Subclasses.h b/AsyncDisplayKit/Private/ASDataController+Subclasses.h similarity index 100% rename from AsyncDisplayKit/Details/ASDataController+Subclasses.h rename to AsyncDisplayKit/Private/ASDataController+Subclasses.h From 7ec6f079532646b0d5b8dc6c85dac168b1a083c3 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 22 Jul 2016 13:09:28 -0700 Subject: [PATCH 197/247] [General] Remove dead code, check optional protocol selector before calling (#1970) --- AsyncDisplayKit/ASCollectionNode.h | 1 - AsyncDisplayKit/ASCollectionView.mm | 5 --- AsyncDisplayKit/ASTableView.mm | 5 --- AsyncDisplayKit/Details/ASDataController.h | 2 -- AsyncDisplayKit/Details/ASDataController.mm | 33 -------------------- AsyncDisplayKit/Details/ASLayoutController.h | 8 ----- AsyncDisplayKit/Details/ASRangeController.h | 2 -- AsyncDisplayKit/Details/ASRangeController.mm | 8 +++-- 8 files changed, 6 insertions(+), 58 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionNode.h b/AsyncDisplayKit/ASCollectionNode.h index d3ec3df0c4..568f9d1df9 100644 --- a/AsyncDisplayKit/ASCollectionNode.h +++ b/AsyncDisplayKit/ASCollectionNode.h @@ -12,7 +12,6 @@ #import #import -#import #import #import diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 124dfed1b8..0657caa0b5 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -1059,11 +1059,6 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; return ASInterfaceStateForDisplayNode(self.collectionNode, self.window); } -- (NSArray *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray *)indexPaths -{ - return [_dataController nodesAtIndexPaths:indexPaths]; -} - - (ASDisplayNode *)rangeController:(ASRangeController *)rangeController nodeAtIndexPath:(NSIndexPath *)indexPath { return [_dataController nodeAtIndexPath:indexPath]; diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index a4193ddd4d..4481ed2d4e 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -897,11 +897,6 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; return self.scrollDirection; } -- (NSArray *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray *)indexPaths -{ - return [_dataController nodesAtIndexPaths:indexPaths]; -} - - (ASDisplayNode *)rangeController:(ASRangeController *)rangeController nodeAtIndexPath:(NSIndexPath *)indexPath { return [_dataController nodeAtIndexPath:indexPath]; diff --git a/AsyncDisplayKit/Details/ASDataController.h b/AsyncDisplayKit/Details/ASDataController.h index 84599c1a97..2c9c324425 100644 --- a/AsyncDisplayKit/Details/ASDataController.h +++ b/AsyncDisplayKit/Details/ASDataController.h @@ -181,8 +181,6 @@ FOUNDATION_EXPORT NSString * const ASDataControllerRowNodeKind; - (nullable NSIndexPath *)indexPathForNode:(ASCellNode *)cellNode; -- (NSArray *)nodesAtIndexPaths:(NSArray *)indexPaths; - /** * Direct access to the nodes that have completed calculation and layout */ diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index cd43b9e4a1..21e56e3dc4 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -131,14 +131,6 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; } } -- (void)layoutLoadedNodes:(NSArray *)nodes fromContexts:(NSArray *)contexts ofKind:(NSString *)kind -{ - NSAssert(ASDisplayNodeThreadIsMain(), @"Layout of loaded nodes must happen on the main thread."); - ASDisplayNodeAssertTrue(nodes.count == contexts.count); - - [self _layoutNodes:nodes fromContexts:contexts atIndexesOfRange:NSMakeRange(0, nodes.count) ofKind:kind]; -} - /** * Measure and layout the given node with the constrained size range. */ @@ -162,25 +154,6 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; }]; } -/** - * Perform measurement and layout of loaded or unloaded nodes based if they will be layed out on main thread or not - */ -- (void)_layoutNodes:(NSArray *)nodes fromContexts:(NSArray *)contexts atIndexesOfRange:(NSRange)range ofKind:(NSString *)kind -{ - ASSERT_ON_EDITING_QUEUE; - - if (_dataSource == nil) { - return; - } - - // Layout nodes based on the given context constrained size - for (NSUInteger k = range.location; k < NSMaxRange(range); k++) { - ASCellNode *node = nodes[k]; - ASIndexedNodeContext *context = contexts[k]; - [self _layoutNode:node withConstrainedSize:context.constrainedSize]; - } -} - - (void)_layoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock { ASSERT_ON_EDITING_QUEUE; @@ -939,12 +912,6 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; return nil; } -- (NSArray *)nodesAtIndexPaths:(NSArray *)indexPaths -{ - ASDisplayNodeAssertMainThread(); - return ASFindElementsInMultidimensionalArrayAtIndexPaths((NSMutableArray *)[self completedNodes], [indexPaths sortedArrayUsingSelector:@selector(compare:)]); -} - /// Returns nodes that can be queried externally. _externalCompletedNodes is used if available, _completedNodes otherwise. - (NSArray *)completedNodes { diff --git a/AsyncDisplayKit/Details/ASLayoutController.h b/AsyncDisplayKit/Details/ASLayoutController.h index 759c230e20..d159cc0384 100644 --- a/AsyncDisplayKit/Details/ASLayoutController.h +++ b/AsyncDisplayKit/Details/ASLayoutController.h @@ -37,14 +37,6 @@ FOUNDATION_EXPORT BOOL ASRangeTuningParametersEqualToRangeTuningParameters(ASRan @optional -- (void)insertNodesAtIndexPaths:(NSArray *)indexPaths withSizes:(NSArray *)nodeSizes; - -- (void)deleteNodesAtIndexPaths:(NSArray *)indexPaths; - -- (void)insertSections:(NSArray*> *)sections atIndexSet:(NSIndexSet *)indexSet; - -- (void)deleteSectionsAtIndexSet:(NSIndexSet *)indexSet; - - (void)setVisibleNodeIndexPaths:(NSArray *)indexPaths; - (void)setViewportSize:(CGSize)viewportSize; diff --git a/AsyncDisplayKit/Details/ASRangeController.h b/AsyncDisplayKit/Details/ASRangeController.h index e4a883395d..d682e07b9d 100644 --- a/AsyncDisplayKit/Details/ASRangeController.h +++ b/AsyncDisplayKit/Details/ASRangeController.h @@ -130,8 +130,6 @@ NS_ASSUME_NONNULL_BEGIN */ - (ASInterfaceState)interfaceStateForRangeController:(ASRangeController *)rangeController; -- (NSArray *)rangeController:(ASRangeController *)rangeController nodesAtIndexPaths:(NSArray *)indexPaths; - - (ASDisplayNode *)rangeController:(ASRangeController *)rangeController nodeAtIndexPath:(NSIndexPath *)indexPath; - (NSArray *> *)completedNodes; diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index e002364441..7696a47955 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -26,6 +26,7 @@ BOOL _rangeIsValid; BOOL _needsRangeUpdate; BOOL _layoutControllerImplementsSetVisibleIndexPaths; + BOOL _layoutControllerImplementsSetViewportSize; NSSet *_allPreviousIndexPaths; ASLayoutRangeMode _currentRangeMode; BOOL _didUpdateCurrentRange; @@ -143,7 +144,8 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; - (void)setLayoutController:(id)layoutController { _layoutController = layoutController; - _layoutControllerImplementsSetVisibleIndexPaths = [_layoutController respondsToSelector:@selector(setVisibleNodeIndexPaths:)]; + _layoutControllerImplementsSetVisibleIndexPaths = [layoutController respondsToSelector:@selector(setVisibleNodeIndexPaths:)]; + _layoutControllerImplementsSetViewportSize = [layoutController respondsToSelector:@selector(setViewportSize:)]; if (layoutController && _dataSource) { [self updateIfNeeded]; } @@ -181,7 +183,9 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; } ASScrollDirection scrollDirection = [_dataSource scrollDirectionForRangeController:self]; - [_layoutController setViewportSize:[_dataSource viewportSizeForRangeController:self]]; + if (_layoutControllerImplementsSetViewportSize) { + [_layoutController setViewportSize:[_dataSource viewportSizeForRangeController:self]]; + } // the layout controller needs to know what the current visible indices are to calculate range offsets if (_layoutControllerImplementsSetVisibleIndexPaths) { From a6e03e8d93db495320377ad5275b3f7e216d8f0b Mon Sep 17 00:00:00 2001 From: Tim Johnsen Date: Sat, 23 Jul 2016 20:09:58 -0700 Subject: [PATCH 198/247] Fix issue causing ASPINRemoteImageDownloader to return incorrect progress values. (#1966) --- AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m index 0fdfb22655..5c67a5eaf7 100644 --- a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m +++ b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m @@ -178,10 +178,10 @@ /// If we're targeting the main queue and we're on the main thread, call immediately. if (ASDisplayNodeThreadIsMain() && callbackQueue == dispatch_get_main_queue()) { - downloadProgress(totalBytes / (CGFloat)completedBytes); + downloadProgress(completedBytes / (CGFloat)totalBytes); } else { dispatch_async(callbackQueue, ^{ - downloadProgress(totalBytes / (CGFloat)completedBytes); + downloadProgress(completedBytes / (CGFloat)totalBytes); }); } } completion:^(PINRemoteImageManagerResult * _Nonnull result) { From c6b17ba7bbd32ebe35851848fea7f6842626b368 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Sat, 23 Jul 2016 20:12:26 -0700 Subject: [PATCH 199/247] Add description to ASLayout (#1973) * Add description to ASLayout * Constrained size is a size range, print correctly * Add missing closing bracket --- AsyncDisplayKit/Layout/ASLayout.mm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AsyncDisplayKit/Layout/ASLayout.mm b/AsyncDisplayKit/Layout/ASLayout.mm index 89077eaa2d..29d54f8f13 100644 --- a/AsyncDisplayKit/Layout/ASLayout.mm +++ b/AsyncDisplayKit/Layout/ASLayout.mm @@ -10,6 +10,7 @@ #import "ASLayout.h" +#import "ASDimension.h" #import "ASInternalHelpers.h" #import "ASLayoutSpecUtilities.h" @@ -138,6 +139,12 @@ extern BOOL CGPointIsNull(CGPoint point) sublayouts:layout.sublayouts]; } +- (NSString *)description +{ + return [NSString stringWithFormat:@"<, position = %@; size = %@; constrainedSizeRange = %@>", + self, NSStringFromCGPoint(self.position), NSStringFromCGSize(self.size), NSStringFromASSizeRange(self.constrainedSizeRange)]; +} + #pragma mark - Layout Flattening - (ASLayout *)filteredNodeLayoutTree From 07db6d85b3624e3b4786b2765239fc98c32629a8 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 09:33:33 -0700 Subject: [PATCH 200/247] Update README.md --- README.md | 104 +++++++----------------------------------------------- 1 file changed, 13 insertions(+), 91 deletions(-) diff --git a/README.md b/README.md index 416cdfa9c1..83c4d6000b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ![AsyncDisplayKit](https://github.com/facebook/AsyncDisplayKit/blob/gh-pages/static/images/logo.png) -[![Apps Using](https://img.shields.io/badge/Apps%20Using%20ASDK-%3E4,646-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) -[![Downloads](https://img.shields.io/badge/Total%20Downloads-%3E475,500-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) +[![Apps Using](https://img.shields.io/badge/Apps%20Using%20ASDK-%3E4,974-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) +[![Downloads](https://img.shields.io/badge/Total%20Downloads-%3E512,000-28B9FE.svg)](http://cocoapods.org/pods/AsyncDisplayKit) [![Platform](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS-orange.svg)](http://AsyncDisplayKit.org) [![Languages](https://img.shields.io/badge/languages-ObjC%20%7C%20Swift-orange.svg)](http://AsyncDisplayKit.org) @@ -11,113 +11,35 @@ [![Build Status](https://travis-ci.org/facebook/AsyncDisplayKit.svg)](https://travis-ci.org/facebook/AsyncDisplayKit) [![License](https://img.shields.io/cocoapods/l/AsyncDisplayKit.svg)](https://github.com/facebook/AsyncDisplayKit/blob/master/LICENSE) +## Installation -AsyncDisplayKit is an iOS framework that keeps even the most complex user -interfaces smooth and responsive. It was originally built to make Facebook's -[Paper](https://facebook.com/paper) possible, and goes hand-in-hand with -[pop](https://github.com/facebook/pop)'s physics-based animations — but -it's just as powerful with UIKit Dynamics and conventional app designs. +ASDK is available via CocoaPods or Carthage. See our [Installation](http://asyncdisplaykit.org/docs/installation.html) guide for instructions. -### Quick start +## Performance Gains -ASDK is available on [CocoaPods](http://cocoapods.org). Add the following to your Podfile: +AsyncDisplayKit's basic unit is the `node`. An ASDisplayNode is an abstraction over `UIView`, which in turn is an abstraction over `CALayer`. Unlike views, which can only be used on the main thread, nodes are thread-safe: you can instantiate and configure entire hierarchies of them in parallel on background threads. -```ruby -pod 'AsyncDisplayKit' -``` - -(ASDK can also be used as a regular static library: Copy the project to your -codebase manually, adding `AsyncDisplayKit.xcodeproj` to your workspace. Add -`libAsyncDisplayKit.a`, MapKit, AssetsLibrary, and Photos to the "Link Binary With -Libraries" build phase. Include `-lc++ -ObjC` in your project linker flags.) +To keep its user interface smooth and responsive, your app should render at 60 frames per second — the gold standard on iOS. This means the main thread has one-sixtieth of a second to push each frame. That's 16 milliseconds to execute all layout and drawing code! And because of system overhead, your code usually has less than ten milliseconds to run before it causes a frame drop. -Import the framework header, or create an [Objective-C bridging -header](https://developer.apple.com/library/ios/documentation/swift/conceptual/buildingcocoaapps/MixandMatch.html) -if you're using Swift: +AsyncDisplayKit lets you move image decoding, text sizing and rendering, layout, and other expensive UI operations off the main thread, to keep the main thread available to respond to user interaction. -```objective-c -#import -``` +## Advanced Developer Features -AsyncDisplayKit Nodes are a thread-safe abstraction layer over UIViews and -CALayers: -![node-view-layer diagram](https://github.com/facebook/AsyncDisplayKit/blob/gh-pages/static/images/node-view-layer.png) +## Learn More -You can construct entire node hierarchies in parallel, or instantiate and size -a single node on a background thread — for example, you could do -something like this in a UIViewController: - -```objective-c -dispatch_async(_backgroundQueue, ^{ - ASTextNode *node = [[ASTextNode alloc] init]; - node.attributedString = [[NSAttributedString alloc] initWithString:@"hello!" - attributes:nil]; - [node measure:CGSizeMake(screenWidth, FLT_MAX)]; - node.frame = (CGRect){ CGPointZero, node.calculatedSize }; - - // self.view isn't a node, so we can only use it on the main thread - dispatch_async(dispatch_get_main_queue(), ^{ - [self.view addSubview:node.view]; - }); -}); -``` - -In Swift: - -```swift -dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) { - let node = ASTextNode() - node.attributedString = NSAttributedString(string: "hello") - node.measure(CGSize(width: screenWidth, height: CGFloat.max)) - node.frame = CGRect(origin: CGPointZero, size: node.calculatedSize) - - // self.view isn't a node, so we can only use it on the main thread - dispatch_async(dispatch_get_main_queue()) { - self.view.addSubview(node.view) - } -} -``` - -AsyncDisplayKit at a glance: - -* `ASImageNode` and `ASTextNode` are drop-in replacements for UIImageView and - UITextView. -* `ASMultiplexImageNode` can load and display progressively higher-quality - variants of an image over a slow cell network, letting you quickly show a - low-resolution photo while the full size downloads. -* `ASNetworkImageNode` is a simpler, single-image counterpart to the Multiplex - node. -* `ASTableView` and `ASCollectionView` are a node-aware UITableView and - UICollectionView, respectively, that can asynchronously preload cell nodes - — from loading network data to rendering — all without blocking - the main thread. - -You can also easily [create your own -nodes](https://github.com/facebook/AsyncDisplayKit/blob/master/AsyncDisplayKit/ASDisplayNode%2BSubclasses.h) -to implement node hierarchies or custom drawing. - -## Learn more - -* Read the [Getting Started guide](http://asyncdisplaykit.org/docs/getting-started.html) +* Read the our [Getting Started guide](http://asyncdisplaykit.org/docs/getting-started.html) * Get the [sample projects](https://github.com/facebook/AsyncDisplayKit/tree/master/examples) * Browse the [API reference](http://asyncdisplaykit.org/appledocs.html) -* Watch the [NSLondon talk](http://vimeo.com/103589245) or the [NSSpain talk](https://www.youtube.com/watch?v=RY_X7l1g79Q) ## Getting Help We use Slack for real-time debugging, community updates, and general talk about ASDK. Signup at http://asdk-slack-auto-invite.herokuapp.com or email AsyncDisplayKit(at)gmail.com to get an invite. -## Testing - -AsyncDisplayKit has extensive unit test coverage. You'll need to run `pod install` in the root AsyncDisplayKit directory to set up OCMock. - ## Contributing -See the CONTRIBUTING file for how to help out. +We welcome any contributions. See the [CONTRIBUTING file](https://github.com/facebook/AsyncDisplayKit/blob/master/CONTRIBUTING.md) for how to get involved. ## License -AsyncDisplayKit is BSD-licensed. We also provide an additional patent grant. - -The files in the /examples directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0. +AsyncDisplayKit is BSD-licensed. We also provide an additional patent grant. The files in the `/examples` directory are licensed under a separate license as specified in each file; documentation is licensed CC-BY-4.0. From 923be12f170d246fb752ed68166cb86f9b1692db Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 09:34:40 -0700 Subject: [PATCH 201/247] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83c4d6000b..8ae350ea46 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ AsyncDisplayKit lets you move image decoding, text sizing and rendering, layout, ## Learn More -* Read the our [Getting Started guide](http://asyncdisplaykit.org/docs/getting-started.html) +* Read the our [Getting Started](http://asyncdisplaykit.org/docs/getting-started.html) guide * Get the [sample projects](https://github.com/facebook/AsyncDisplayKit/tree/master/examples) * Browse the [API reference](http://asyncdisplaykit.org/appledocs.html) From 4070c40e6ee766362ec48d9ec0c32e839ed244b9 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 09:36:17 -0700 Subject: [PATCH 202/247] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8ae350ea46..04b2cc6b1c 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,11 @@ AsyncDisplayKit lets you move image decoding, text sizing and rendering, layout, ## Getting Help -We use Slack for real-time debugging, community updates, and general talk about ASDK. Signup at http://asdk-slack-auto-invite.herokuapp.com or email AsyncDisplayKit(at)gmail.com to get an invite. +We use Slack for real-time debugging, community updates, and general talk about ASDK. [Signup](http://asdk-slack-auto-invite.herokuapp.com) youself or email AsyncDisplayKit(at)gmail.com to get an invite. ## Contributing -We welcome any contributions. See the [CONTRIBUTING file](https://github.com/facebook/AsyncDisplayKit/blob/master/CONTRIBUTING.md) for how to get involved. +We welcome any contributions. See the [CONTRIBUTING](https://github.com/facebook/AsyncDisplayKit/blob/master/CONTRIBUTING.md) file for how to get involved. ## License From 54856a52439a77099fe869218c7be7e50a9023d1 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 09:37:55 -0700 Subject: [PATCH 203/247] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 04b2cc6b1c..6631041e76 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ AsyncDisplayKit lets you move image decoding, text sizing and rendering, layout, ## Advanced Developer Features +As the framework has grown, many features have been added that can save developers tons of time by eliminating common boilerplate style structures common in modern iOS apps. If you've ever dealt with cell reuse bugs, tried to performantly preload data for a page or scroll style interface or even just tried to keep your app from dropping too many frames you can benefit from integrating ASDK. ## Learn More From 4a220a452ba01cfa59ade6fcc2c9933782e14127 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 15:10:14 -0700 Subject: [PATCH 204/247] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c96a002f8c..442cb30236 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,6 +14,7 @@ please open an issue on GitHub. *ASDK FILES:* +``` // // ASPagerFlowLayout.h // AsyncDisplayKit @@ -25,9 +26,11 @@ please open an issue on GitHub. // LICENSE file in the root directory of this source tree. An additional grant // of patent rights can be found in the PATENTS file in the same directory. // +``` *EXAMPLE PROJECT FILES:* +``` // // PhotoCellNode.m // Sample @@ -46,6 +49,7 @@ please open an issue on GitHub. // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // +``` ## Contributor License Agreement ("CLA") In order to accept your pull request, we need you to submit a CLA. You only need From 052b5ffc7a7de8d91f150d9aacdfcd2cc05bf79e Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 15:11:07 -0700 Subject: [PATCH 205/247] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 442cb30236..9e57cc3e9d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ please open an issue on GitHub. 6. If you haven't already, complete the Contributor License Agreement ("CLA"). 7. Make sure that any new files conform to the correct file header style below -*ASDK FILES:* +#### ASDK files header style ``` // @@ -28,7 +28,7 @@ please open an issue on GitHub. // ``` -*EXAMPLE PROJECT FILES:* +#### example project files header style ``` // From 6ed5d4a6ac47b3694cd5978705790ea9b3d42267 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Sun, 24 Jul 2016 15:11:19 -0700 Subject: [PATCH 206/247] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e57cc3e9d..2861dc49e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ please open an issue on GitHub. // ``` -#### example project files header style +#### Example project files header style ``` // From 304df12f71c8cae6033bca07cb0d11e74087aca4 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Sun, 24 Jul 2016 15:12:53 -0700 Subject: [PATCH 207/247] Add recursive description debugging method to ASLayout (#1975) * Add recursiveDescription debugging method * Add recursive description implementation * Add LayoutableObject to ASLayout description --- AsyncDisplayKit/Layout/ASLayout.h | 9 ++++++ AsyncDisplayKit/Layout/ASLayout.mm | 46 ++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/Layout/ASLayout.h b/AsyncDisplayKit/Layout/ASLayout.h index 7b23fd704b..17b93dd3c9 100644 --- a/AsyncDisplayKit/Layout/ASLayout.h +++ b/AsyncDisplayKit/Layout/ASLayout.h @@ -145,4 +145,13 @@ extern BOOL CGPointIsNull(CGPoint point); @end +@interface ASLayout (Debugging) + +/** + * Recrusively output the description of the layout tree. + */ +- (NSString *)recursiveDescription; + +@end + NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Layout/ASLayout.mm b/AsyncDisplayKit/Layout/ASLayout.mm index 29d54f8f13..575f593ed6 100644 --- a/AsyncDisplayKit/Layout/ASLayout.mm +++ b/AsyncDisplayKit/Layout/ASLayout.mm @@ -23,6 +23,21 @@ extern BOOL CGPointIsNull(CGPoint point) return isnan(point.x) && isnan(point.y); } +/** + * Creates an defined number of " |" indent blocks for the recursive description. + */ +static inline NSString * descriptionIndents(NSUInteger indents) +{ + NSMutableString *description = [NSMutableString string]; + for (NSUInteger i = 0; i < indents; i++) { + [description appendString:@" |"]; + } + if (indents > 0) { + [description appendString:@" "]; + } + return description; +} + @interface ASLayout () /** @@ -139,12 +154,6 @@ extern BOOL CGPointIsNull(CGPoint point) sublayouts:layout.sublayouts]; } -- (NSString *)description -{ - return [NSString stringWithFormat:@"<, position = %@; size = %@; constrainedSizeRange = %@>", - self, NSStringFromCGPoint(self.position), NSStringFromCGSize(self.size), NSStringFromASSizeRange(self.constrainedSizeRange)]; -} - #pragma mark - Layout Flattening - (ASLayout *)filteredNodeLayoutTree @@ -218,4 +227,29 @@ extern BOOL CGPointIsNull(CGPoint point) return subnodeFrame; } +#pragma mark - Description + +- (NSString *)description +{ + return [NSString stringWithFormat:@"<, layoutable = %@, position = %@; size = %@; constrainedSizeRange = %@>", + self, self.layoutableObject, NSStringFromCGPoint(self.position), NSStringFromCGSize(self.size), NSStringFromASSizeRange(self.constrainedSizeRange)]; +} + +- (NSString *)recursiveDescription +{ + return [self _recursiveDescriptionForLayout:self level:0]; +} + +- (NSString *)_recursiveDescriptionForLayout:(ASLayout *)layout level:(NSUInteger)level +{ + NSMutableString *description = [NSMutableString string]; + [description appendString:descriptionIndents(level)]; + [description appendString:[layout description]]; + for (ASLayout *sublayout in layout.sublayouts) { + [description appendString:@"\n"]; + [description appendString:[self _recursiveDescriptionForLayout:sublayout level:level + 1]]; + } + return description; +} + @end From a79c69a5f1b357e73a4c628402a71856e87895df Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Sun, 24 Jul 2016 15:31:09 -0700 Subject: [PATCH 208/247] [ASWeakSet] Refactor to use NSHashTable (#1976) [ASWeakSet] Tweak it [ASWeakSet] Simplify --- AsyncDisplayKit/Private/ASWeakSet.h | 5 ++-- AsyncDisplayKit/Private/ASWeakSet.m | 42 ++++++++++------------------- 2 files changed, 16 insertions(+), 31 deletions(-) diff --git a/AsyncDisplayKit/Private/ASWeakSet.h b/AsyncDisplayKit/Private/ASWeakSet.h index e44e68a1a5..9a8707eb84 100644 --- a/AsyncDisplayKit/Private/ASWeakSet.h +++ b/AsyncDisplayKit/Private/ASWeakSet.h @@ -35,10 +35,9 @@ NS_ASSUME_NONNULL_BEGIN - (NSArray *)allObjects; /** - How many objects are contained in this set. + * How many objects are contained in this set. - NOTE: This method is O(N). Consider using the `empty` - property. + * NOTE: This computed property is O(N). Consider using the `empty` property. */ @property (nonatomic, readonly) NSUInteger count; diff --git a/AsyncDisplayKit/Private/ASWeakSet.m b/AsyncDisplayKit/Private/ASWeakSet.m index 773af682fd..c68b730db9 100644 --- a/AsyncDisplayKit/Private/ASWeakSet.m +++ b/AsyncDisplayKit/Private/ASWeakSet.m @@ -13,7 +13,7 @@ #import "ASWeakSet.h" @interface ASWeakSet<__covariant ObjectType> () -@property (nonatomic, strong, readonly) NSMapTable *mapTable; +@property (nonatomic, strong, readonly) NSHashTable *hashTable; @end @implementation ASWeakSet @@ -22,59 +22,45 @@ { self = [super init]; if (self) { - _mapTable = [NSMapTable weakToStrongObjectsMapTable]; + _hashTable = [NSHashTable weakObjectsHashTable]; } return self; } - (void)addObject:(id)object { - [_mapTable setObject:(NSNull *)kCFNull forKey:object]; + [_hashTable addObject:object]; } - (void)removeObject:(id)object { - [_mapTable removeObjectForKey:object]; + [_hashTable removeObject:object]; } - (void)removeAllObjects { - [_mapTable removeAllObjects]; + [_hashTable removeAllObjects]; } - (NSArray *)allObjects { - // We use keys instead of values in the map table for efficiency and better characteristics when the keys are deallocated. - // Documentation is currently unclear on whether -keyEnumerator retains its values, but does imply that modifying a - // mutable collection is still not safe while enumerating that way - which is one of the main uses for this method. - // A helper function called NSAllMapTableKeys() might do exactly what we want and should be more efficient, but unfortunately - // is throwing a strange compiler error and may not be available in practice on the latest iOS version. - // Lastly, even -dictionaryRepresentation and then -allKeys won't work, because it attempts to copy the values of each key, - // which may not support copying (such as ASRangeControllers). - NSMutableArray *allObjects = [NSMutableArray array]; - for (id object in _mapTable) { - [allObjects addObject:object]; - } - return allObjects; + return _hashTable.allObjects; } - (BOOL)containsObject:(id)object { - return [_mapTable objectForKey:object] != nil; + return [_hashTable containsObject:object]; } - (BOOL)isEmpty { - for (__unused id object in _mapTable) { - return NO; - } - return YES; + return [_hashTable anyObject] == nil; } /** - Note: The `count` property of NSMapTable is unreliable - in the case of weak-to-strong map tables because entries - whose keys have been deallocated are not removed immediately. + Note: The `count` property of NSHashTable is unreliable + in the case of weak-object hash tables because entries + that have been deallocated are not removed immediately. In order to get the true count we have to fall back to using fast enumeration. @@ -82,7 +68,7 @@ - (NSUInteger)count { NSUInteger count = 0; - for (__unused id object in _mapTable) { + for (__unused id object in _hashTable) { count += 1; } return count; @@ -90,12 +76,12 @@ - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(__unsafe_unretained id _Nonnull *)buffer count:(NSUInteger)len { - return [_mapTable countByEnumeratingWithState:state objects:buffer count:len]; + return [_hashTable countByEnumeratingWithState:state objects:buffer count:len]; } - (NSString *)description { - return [[super description] stringByAppendingFormat:@" count: %lu, contents: %@", (unsigned long)self.count, _mapTable]; + return [[super description] stringByAppendingFormat:@" count: %tu, contents: %@", self.count, _hashTable]; } @end From f434192339b37ef83d680b40695eca8c4dd5a6d4 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Sun, 24 Jul 2016 15:32:27 -0700 Subject: [PATCH 209/247] [Tests] Two Minor Cleanups (#1977) * [Tests] Use XCTestExpectation instead of rolling our own in ASMultiplexImageNode * [Tests] Remove do-nothing ASCollectionView test method --- AsyncDisplayKitTests/ASCollectionViewTests.mm | 12 ------ .../ASMultiplexImageNodeTests.m | 43 +------------------ 2 files changed, 2 insertions(+), 53 deletions(-) diff --git a/AsyncDisplayKitTests/ASCollectionViewTests.mm b/AsyncDisplayKitTests/ASCollectionViewTests.mm index 9986f0cd3a..922b438518 100644 --- a/AsyncDisplayKitTests/ASCollectionViewTests.mm +++ b/AsyncDisplayKitTests/ASCollectionViewTests.mm @@ -142,18 +142,6 @@ XCTAssertEqualObjects([collectionView supplementaryNodeKindsInDataController:nil], @[UICollectionElementKindSectionHeader]); } -- (void)testCollectionViewController -{ - ASCollectionViewTestController *testController = [[ASCollectionViewTestController alloc] initWithNibName:nil bundle:nil]; - - UIView *containerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]; - [containerView addSubview:testController.view]; - - [testController.collectionView reloadData]; - - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:1.0]]; -} - - (void)testSelection { ASCollectionViewTestController *testController = [[ASCollectionViewTestController alloc] initWithNibName:nil bundle:nil]; diff --git a/AsyncDisplayKitTests/ASMultiplexImageNodeTests.m b/AsyncDisplayKitTests/ASMultiplexImageNodeTests.m index 9b7b325660..51d5921753 100644 --- a/AsyncDisplayKitTests/ASMultiplexImageNodeTests.m +++ b/AsyncDisplayKitTests/ASMultiplexImageNodeTests.m @@ -45,42 +45,6 @@ return [[[UIImage alloc] initWithContentsOfFile:[self _testImageURL].path] autorelease]; } -static BOOL ASInvokeConditionBlockWithBarriers(BOOL (^block)()) { - // In case the block does multiple comparisons, ensure it has a consistent view of memory by issuing read-write - // barriers on either side of the block. - OSMemoryBarrier(); - BOOL result = block(); - OSMemoryBarrier(); - return result; -} - -static BOOL ASRunRunLoopUntilBlockIsTrue(BOOL (^block)()) -{ - // Time out after 30 seconds. - CFTimeInterval timeoutDate = CACurrentMediaTime() + 30.0f; - BOOL passed = NO; - - while (true) { - passed = ASInvokeConditionBlockWithBarriers(block); - - if (passed) { - break; - } - - CFTimeInterval now = CACurrentMediaTime(); - if (now > timeoutDate) { - break; - } - - // Run 1000 times a second until the poll timeout or until timeoutDate, whichever is first. - CFTimeInterval runLoopTimeout = MIN(0.001, timeoutDate - now); - CFRunLoopRunInMode(kCFRunLoopDefaultMode, runLoopTimeout, true); - } - - return passed; -} - - #pragma mark - #pragma mark Unit tests. @@ -360,14 +324,11 @@ static BOOL ASRunRunLoopUntilBlockIsTrue(BOOL (^block)()) [imageNode reloadImageIdentifierSources]; // Wait until the image is loaded. - ASRunRunLoopUntilBlockIsTrue(^BOOL{ - return [(id)imageNode.loadedImageIdentifier isEqual:imageIdentifier]; - }); + [self expectationForPredicate:[NSPredicate predicateWithFormat:@"loadedImageIdentifier = %@", imageIdentifier] evaluatedWithObject:imageNode handler:nil]; + [self waitForExpectationsWithTimeout:30 handler:nil]; // Verify the delegation. [mockDelegate verify]; - // Also verify that it's acutally loaded (could be false if we timed out above). - XCTAssertEqualObjects(imageNode.loadedImageIdentifier, imageIdentifier, @"Failed to load image"); [imageNode release]; } From 2bf1b56f550cecd905e9f308dd873126cca38418 Mon Sep 17 00:00:00 2001 From: Alice Chang Date: Sun, 24 Jul 2016 19:01:15 -0400 Subject: [PATCH 210/247] fixed potential ASPINRemoteImageDownloader crash (#1972) --- AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m index 5c67a5eaf7..70e3b194da 100644 --- a/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m +++ b/AsyncDisplayKit/Details/ASPINRemoteImageDownloader.m @@ -214,6 +214,10 @@ - (void)cancelImageDownloadForIdentifier:(id)downloadIdentifier { + if (!downloadIdentifier) { + return; + } + ASDisplayNodeAssert([downloadIdentifier isKindOfClass:[NSUUID class]], @"downloadIdentifier must be NSUUID"); [[self sharedPINRemoteImageManager] cancelTaskWithUUID:downloadIdentifier]; } From 7b2e14c128aa4828f542379341016e80e702def7 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 25 Jul 2016 10:26:51 -0700 Subject: [PATCH 211/247] Disable thrash tests to avoid deallocated-while-visible exception that's popped up --- AsyncDisplayKitTests/ASTableViewThrashTests.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKitTests/ASTableViewThrashTests.m b/AsyncDisplayKitTests/ASTableViewThrashTests.m index 5edb5874b0..90da7eb5bf 100644 --- a/AsyncDisplayKitTests/ASTableViewThrashTests.m +++ b/AsyncDisplayKitTests/ASTableViewThrashTests.m @@ -467,7 +467,8 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; #pragma mark Test Methods -- (void)testInitialDataRead { +// Disabled temporarily due to issue where cell nodes are not marked invisible before deallocation. +- (void)DISABLED_testInitialDataRead { ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:[ASThrashTestSection sectionsWithCount:kInitialSectionCount]]; [self verifyDataSource:ds]; } @@ -488,7 +489,8 @@ static NSInteger ASThrashUpdateCurrentSerializationVersion = 1; [self verifyDataSource:ds]; } -- (void)testThrashingWildly { +// Disabled temporarily due to issue where cell nodes are not marked invisible before deallocation. +- (void)DISABLED_testThrashingWildly { for (NSInteger i = 0; i < kThrashingIterationCount; i++) { [self setUp]; ASThrashDataSource *ds = [[ASThrashDataSource alloc] initWithData:[ASThrashTestSection sectionsWithCount:kInitialSectionCount]]; From e010cd3d9e1b3fa8e48d36e0b175e6ad32a01400 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 25 Jul 2016 13:17:10 -0700 Subject: [PATCH 212/247] Fix compiler warnings in _ASHierarchyChangeSet on 32bit (#1982) --- AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm index aaf6998e44..2b080cece7 100644 --- a/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm +++ b/AsyncDisplayKit/Private/_ASHierarchyChangeSet.mm @@ -277,7 +277,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) for (_ASHierarchySectionChange *change in _reloadSectionChanges) { NSIndexSet *newSections = [change.indexSet as_indexesByMapping:^(NSUInteger idx) { NSUInteger newSec = [self newSectionForOldSection:idx]; - ASDisplayNodeAssert(newSec != NSNotFound, @"Request to reload and delete same section %zu", idx); + ASDisplayNodeAssert(newSec != NSNotFound, @"Request to reload and delete same section %tu", idx); return newSec; }]; @@ -356,7 +356,7 @@ NSString *NSStringFromASHierarchyChangeType(_ASHierarchyChangeType changeType) NSInteger deletedSectionCount = _deletedSections.count; // Assert that the new section count is correct. if (newSectionCount != oldSectionCount + insertedSectionCount - deletedSectionCount) { - ASFailUpdateValidation(@"Invalid number of sections. The number of sections after the update (%zd) must be equal to the number of sections before the update (%zd) plus or minus the number of sections inserted or deleted (%zu inserted, %zu deleted)", newSectionCount, oldSectionCount, insertedSectionCount, deletedSectionCount); + ASFailUpdateValidation(@"Invalid number of sections. The number of sections after the update (%zd) must be equal to the number of sections before the update (%zd) plus or minus the number of sections inserted or deleted (%tu inserted, %tu deleted)", newSectionCount, oldSectionCount, insertedSectionCount, deletedSectionCount); return; } From aeec0b1a145edda87e6a8598a0b40c0bbf06f65f Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Mon, 25 Jul 2016 17:28:24 -0700 Subject: [PATCH 213/247] [ASChangeSetDataController] Enable some assertions (#1984) --- AsyncDisplayKit/Details/ASChangeSetDataController.mm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/Details/ASChangeSetDataController.mm b/AsyncDisplayKit/Details/ASChangeSetDataController.mm index 0660b87d49..b85aacf817 100644 --- a/AsyncDisplayKit/Details/ASChangeSetDataController.mm +++ b/AsyncDisplayKit/Details/ASChangeSetDataController.mm @@ -24,8 +24,7 @@ - (void)beginUpdates { - // NOTE: This assertion is failing in some apps and will be enabled soon. -// ASDisplayNodeAssertMainThread(); + ASDisplayNodeAssertMainThread(); if (_changeSetBatchUpdateCounter <= 0) { _changeSetBatchUpdateCounter = 0; _changeSet = [[_ASHierarchyChangeSet alloc] initWithOldData:[self itemCountsFromDataSource]]; @@ -35,13 +34,11 @@ - (void)endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion { - // NOTE: This assertion is failing in some apps and will be enabled soon. -// ASDisplayNodeAssertMainThread(); + ASDisplayNodeAssertMainThread(); _changeSetBatchUpdateCounter--; // Prevent calling endUpdatesAnimated:completion: in an unbalanced way - // NOTE: This assertion is failing in some apps and will be enabled soon. -// NSAssert(_changeSetBatchUpdateCounter >= 0, @"endUpdatesAnimated:completion: called without having a balanced beginUpdates call"); + NSAssert(_changeSetBatchUpdateCounter >= 0, @"endUpdatesAnimated:completion: called without having a balanced beginUpdates call"); if (_changeSetBatchUpdateCounter == 0) { if (!self.initialReloadDataHasBeenCalled) { From f5b3a282af92ad63a2cd0e08e4a1a4e343791d77 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Wed, 27 Jul 2016 08:23:16 -0700 Subject: [PATCH 214/247] Fix Pinterest Xcode 7.3.1 Analyzer Warnings (#1988) --- AsyncDisplayKit/ASCellNode.h | 2 +- AsyncDisplayKit/ASCollectionView.mm | 7 ++++--- AsyncDisplayKit/ASDisplayNode.mm | 3 ++- AsyncDisplayKit/ASTableView.mm | 9 +++++---- .../Details/ASCollectionViewFlowLayoutInspector.h | 4 ++-- AsyncDisplayKit/Details/ASImageProtocols.h | 4 ++-- 6 files changed, 16 insertions(+), 13 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index 50cdcbab9f..e6b5a6ae9f 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -120,7 +120,7 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { */ - (instancetype)initWithViewControllerBlock:(ASDisplayNodeViewControllerBlock)viewControllerBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock; -- (void)cellNodeVisibilityEvent:(ASCellNodeVisibilityEvent)event inScrollView:(UIScrollView *)scrollView withCellFrame:(CGRect)cellFrame; +- (void)cellNodeVisibilityEvent:(ASCellNodeVisibilityEvent)event inScrollView:(nullable UIScrollView *)scrollView withCellFrame:(CGRect)cellFrame; @end diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 0657caa0b5..1fba98796b 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -721,9 +721,10 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset { + CGPoint contentOffset = scrollView.contentOffset; _deceleratingVelocity = CGPointMake( - scrollView.contentOffset.x - ((targetContentOffset != NULL) ? targetContentOffset->x : 0), - scrollView.contentOffset.y - ((targetContentOffset != NULL) ? targetContentOffset->y : 0) + contentOffset.x - ((targetContentOffset != NULL) ? targetContentOffset->x : 0), + contentOffset.y - ((targetContentOffset != NULL) ? targetContentOffset->y : 0) ); if (targetContentOffset != NULL) { @@ -732,7 +733,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; } if (_asyncDelegateFlags.asyncDelegateScrollViewWillEndDraggingWithVelocityTargetContentOffset) { - [_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:targetContentOffset]; + [_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:(targetContentOffset ? : &contentOffset)]; } } diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 18e11365dd..a3904603b2 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2071,7 +2071,8 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) return _layoutSpecBlock(self, constrainedSize); } - return nil; + ASDisplayNodeAssert(NO, @"-[ASDisplayNode layoutSpecThatFits:] should never fall through to return empty value"); + return [[ASLayoutSpec alloc] init]; } - (ASLayout *)calculatedLayout diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 4481ed2d4e..16e5d3cec9 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -704,18 +704,19 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset { + CGPoint contentOffset = scrollView.contentOffset; _deceleratingVelocity = CGPointMake( - scrollView.contentOffset.x - ((targetContentOffset != NULL) ? targetContentOffset->x : 0), - scrollView.contentOffset.y - ((targetContentOffset != NULL) ? targetContentOffset->y : 0) + contentOffset.x - ((targetContentOffset != NULL) ? targetContentOffset->x : 0), + contentOffset.y - ((targetContentOffset != NULL) ? targetContentOffset->y : 0) ); if (targetContentOffset != NULL) { ASDisplayNodeAssert(_batchContext != nil, @"Batch context should exist"); [self _beginBatchFetchingIfNeededWithScrollView:self forScrollDirection:[self scrollDirection] contentOffset:*targetContentOffset]; } - + if (_asyncDelegateFlags.asyncDelegateScrollViewWillEndDraggingWithVelocityTargetContentOffset) { - [_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:targetContentOffset]; + [_asyncDelegate scrollViewWillEndDragging:scrollView withVelocity:velocity targetContentOffset:(targetContentOffset ? : &contentOffset)]; } } diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h index 7a9f26e680..423c8302a7 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.h @@ -48,14 +48,14 @@ NS_ASSUME_NONNULL_BEGIN * * @discussion A great time to update perform selector caches! */ -- (void)didChangeCollectionViewDelegate:(id)delegate; +- (void)didChangeCollectionViewDelegate:(nullable id)delegate; /** * Allow the inspector to respond to dataSource changes. * * @discussion A great time to update perform selector caches! */ -- (void)didChangeCollectionViewDataSource:(id)dataSource; +- (void)didChangeCollectionViewDataSource:(nullable id)dataSource; @end diff --git a/AsyncDisplayKit/Details/ASImageProtocols.h b/AsyncDisplayKit/Details/ASImageProtocols.h index 676ef4196c..e9074e723b 100644 --- a/AsyncDisplayKit/Details/ASImageProtocols.h +++ b/AsyncDisplayKit/Details/ASImageProtocols.h @@ -17,8 +17,8 @@ NS_ASSUME_NONNULL_BEGIN @protocol ASImageContainerProtocol -- (UIImage *)asdk_image; -- (NSData *)asdk_animatedImageData; +- (nullable UIImage *)asdk_image; +- (nullable NSData *)asdk_animatedImageData; @end From 95bf8bbe1f811d6fc73a4ff8c9008f6e225b6727 Mon Sep 17 00:00:00 2001 From: Yue-Wang-Google Date: Wed, 27 Jul 2016 13:18:21 -0700 Subject: [PATCH 215/247] Fix ASTextNode truncation string (#1992) Initial PR to open source our internal ASDK patch list from Google Inc. :) --- AsyncDisplayKit/ASTextNode.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 999028d618..b1392c0766 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -1278,8 +1278,8 @@ static NSAttributedString *DefaultTruncationAttributedString() NSMutableAttributedString *truncationMutableString = [truncationString mutableCopy]; // Grab the attributes from the full string if (_attributedText.length > 0) { - NSAttributedString *originalString = _truncationAttributedText; - NSInteger originalStringLength = _truncationAttributedText.length; + NSAttributedString *originalString = _attributedText; + NSInteger originalStringLength = _attributedText.length; // Add any of the original string's attributes to the truncation string, // but don't overwrite any of the truncation string's attributes NSDictionary *originalStringAttributes = [originalString attributesAtIndex:originalStringLength-1 effectiveRange:NULL]; From b59e368b7165687b57deb184e6f28c9dd515ee50 Mon Sep 17 00:00:00 2001 From: Yue-Wang-Google Date: Wed, 27 Jul 2016 14:17:56 -0700 Subject: [PATCH 216/247] [PATCH] Fix capitalizations in imports. --- AsyncDisplayKit/Details/ASRangeController.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 7696a47955..092383ad9a 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -14,7 +14,7 @@ #import "ASWeakSet.h" #import "ASDisplayNodeExtras.h" #import "ASDisplayNodeInternal.h" -#import "ASMultiDimensionalArrayUtils.h" +#import "ASMultidimensionalArrayUtils.h" #import "ASInternalHelpers.h" #import "ASDisplayNode+FrameworkPrivate.h" #import "ASCellNode.h" From f0b1f121605ee7b439da5d0787b893a96d55e4c3 Mon Sep 17 00:00:00 2001 From: ricky Date: Thu, 28 Jul 2016 10:03:32 -0700 Subject: [PATCH 217/247] [ASEnvironmentTraitCollection] default user interface idiom to UIUserInterfaceIdiomUnspecified (#1998) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ASEnvironmentTraitCollection] default user interface idiom to ASEnvironmentTraitCollection UIUserInterfaceIdiomUnspecified is -1 so we were actually defaulting our trait collection to UIUserInterfaceIdiomPhone (which is 0). * Fix a few places where we weren’t using the default method to create the base traits --- AsyncDisplayKit/ASDisplayNode.mm | 4 +++- AsyncDisplayKit/Details/ASEnvironment.h | 3 +++ AsyncDisplayKit/Details/ASEnvironment.mm | 13 +++++++------ AsyncDisplayKit/Private/ASEnvironmentInternal.h | 6 +++--- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index a3904603b2..d70f34d76a 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1848,7 +1848,9 @@ static NSInteger incrementIfFound(NSInteger i) { } // now that we have a supernode, propagate its traits to self. - ASEnvironmentStatePropagateDown(self, [newSupernode environmentTraitCollection]); + if (newSupernode != nil) { + ASEnvironmentStatePropagateDown(self, [newSupernode environmentTraitCollection]); + } } } diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index 486f9f8852..4dad9fde9f 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -50,6 +50,7 @@ typedef struct ASEnvironmentLayoutOptionsState { struct ASEnvironmentStateExtensions _extensions; } ASEnvironmentLayoutOptionsState; +extern ASEnvironmentLayoutOptionsState ASEnvironmentLayoutOptionsStateMakeDefault(); #pragma mark - ASEnvironmentHierarchyState @@ -60,6 +61,7 @@ typedef struct ASEnvironmentHierarchyState { unsigned transitioningSupernodes:1; // = NO unsigned layoutPending:1; // = NO } ASEnvironmentHierarchyState; +extern ASEnvironmentHierarchyState ASEnvironmentHierarchyStateMakeDefault(); #pragma mark - ASEnvironmentDisplayTraits @@ -72,6 +74,7 @@ typedef struct ASEnvironmentTraitCollection { CGSize containerSize; } ASEnvironmentTraitCollection; +extern ASEnvironmentTraitCollection ASEnvironmentTraitCollectionMakeDefault(); extern ASEnvironmentTraitCollection ASEnvironmentTraitCollectionFromUITraitCollection(UITraitCollection *traitCollection); extern BOOL ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(ASEnvironmentTraitCollection lhs, ASEnvironmentTraitCollection rhs); diff --git a/AsyncDisplayKit/Details/ASEnvironment.mm b/AsyncDisplayKit/Details/ASEnvironment.mm index b0413de302..68aca910da 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.mm +++ b/AsyncDisplayKit/Details/ASEnvironment.mm @@ -11,24 +11,25 @@ #import "ASEnvironmentInternal.h" #import "ASAvailability.h" -ASEnvironmentLayoutOptionsState _ASEnvironmentLayoutOptionsStateMakeDefault() +ASEnvironmentLayoutOptionsState ASEnvironmentLayoutOptionsStateMakeDefault() { return (ASEnvironmentLayoutOptionsState) { // Default values can be defined in here }; } -ASEnvironmentHierarchyState _ASEnvironmentHierarchyStateMakeDefault() +ASEnvironmentHierarchyState ASEnvironmentHierarchyStateMakeDefault() { return (ASEnvironmentHierarchyState) { // Default values can be defined in here }; } -ASEnvironmentTraitCollection _ASEnvironmentTraitCollectionMakeDefault() +ASEnvironmentTraitCollection ASEnvironmentTraitCollectionMakeDefault() { return (ASEnvironmentTraitCollection) { // Default values can be defined in here + .userInterfaceIdiom = UIUserInterfaceIdiomUnspecified, .containerSize = CGSizeZero, }; } @@ -62,9 +63,9 @@ BOOL ASEnvironmentTraitCollectionIsEqualToASEnvironmentTraitCollection(ASEnviron ASEnvironmentState ASEnvironmentStateMakeDefault() { return (ASEnvironmentState) { - .layoutOptionsState = _ASEnvironmentLayoutOptionsStateMakeDefault(), - .hierarchyState = _ASEnvironmentHierarchyStateMakeDefault(), - .environmentTraitCollection = _ASEnvironmentTraitCollectionMakeDefault() + .layoutOptionsState = ASEnvironmentLayoutOptionsStateMakeDefault(), + .hierarchyState = ASEnvironmentHierarchyStateMakeDefault(), + .environmentTraitCollection = ASEnvironmentTraitCollectionMakeDefault() }; } diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.h b/AsyncDisplayKit/Private/ASEnvironmentInternal.h index 0f1bcf1919..7179830eef 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.h +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.h @@ -43,13 +43,13 @@ enum class ASEnvironmentStatePropagation { DOWN, UP }; static const struct ASEnvironmentStateExtensions ASEnvironmentDefaultStateExtensions = {}; -static const struct ASEnvironmentLayoutOptionsState ASEnvironmentDefaultLayoutOptionsState = {}; +static const struct ASEnvironmentLayoutOptionsState ASEnvironmentDefaultLayoutOptionsState = ASEnvironmentLayoutOptionsStateMakeDefault(); ASEnvironmentState ASEnvironmentMergeObjectAndState(ASEnvironmentState environmentState, ASEnvironmentLayoutOptionsState state, ASEnvironmentStatePropagation propagation); -static const struct ASEnvironmentHierarchyState ASEnvironmentDefaultHierarchyState = {}; +static const struct ASEnvironmentHierarchyState ASEnvironmentDefaultHierarchyState = ASEnvironmentHierarchyStateMakeDefault(); ASEnvironmentState ASEnvironmentMergeObjectAndState(ASEnvironmentState environmentState, ASEnvironmentHierarchyState state, ASEnvironmentStatePropagation propagation); -static const struct ASEnvironmentTraitCollection ASEnvironmentDefaultTraitCollection = {}; +static const struct ASEnvironmentTraitCollection ASEnvironmentDefaultTraitCollection = ASEnvironmentTraitCollectionMakeDefault(); ASEnvironmentState ASEnvironmentMergeObjectAndState(ASEnvironmentState environmentState, ASEnvironmentTraitCollection state, ASEnvironmentStatePropagation propagation); From 93a5c36a39dcd364dde0bff9ea3ec28dad39b317 Mon Sep 17 00:00:00 2001 From: Yue-Wang-Google Date: Thu, 28 Jul 2016 10:13:49 -0700 Subject: [PATCH 218/247] Fixed typo in ASCollectionViewFlowLayoutInspector.m pertaining to supplementary node layout. (#1996) Patch from iOS teams at Google Inc. --- AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m index 480dbb1514..25ba06b71d 100644 --- a/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m +++ b/AsyncDisplayKit/Details/ASCollectionViewFlowLayoutInspector.m @@ -166,7 +166,7 @@ static inline ASSizeRange NodeConstrainedSizeForScrollDirection(ASCollectionView if (_layout.scrollDirection == UICollectionViewScrollDirectionVertical) { constrainedSize = CGSizeMake(CGRectGetWidth(collectionView.bounds), supplementarySize.height); } else { - constrainedSize = CGSizeMake(supplementarySize.height, CGRectGetHeight(collectionView.bounds)); + constrainedSize = CGSizeMake(supplementarySize.width, CGRectGetHeight(collectionView.bounds)); } return ASSizeRangeMake(CGSizeZero, constrainedSize); } From d481ce54238a826afd2585f80606a72643d3da85 Mon Sep 17 00:00:00 2001 From: Yue-Wang-Google Date: Thu, 28 Jul 2016 10:53:48 -0700 Subject: [PATCH 219/247] [ASTextNode] Fix ascender to include line height specified in attributed string paragraph style (#1997) * Fix ASTextNode's ascender to also include the line height specified by paragraph style in the attributed string. * Merge conflict (original patch is for an old version) --- AsyncDisplayKit/ASTextNode.mm | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index b1392c0766..17079418a5 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -351,9 +351,8 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; CGSize size = [self _renderer].size; if (_attributedText.length > 0) { - CGFloat screenScale = ASScreenScale(); - self.ascender = round([[_attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; - self.descender = round([[_attributedText attribute:NSFontAttributeName atIndex:_attributedText.length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; + self.ascender = [[self class] ascenderWithAttributedString:_attributedText]; + self.descender = [[_attributedText attribute:NSFontAttributeName atIndex:_attributedText.length - 1 effectiveRange:NULL] descender]; if (_renderer.currentScaleFactor > 0 && _renderer.currentScaleFactor < 1.0) { // while not perfect, this is a good estimate of what the ascender of the scaled font will be. self.ascender *= _renderer.currentScaleFactor; @@ -365,6 +364,21 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; #pragma mark - Modifying User Text +// Returns the ascender of the first character in attributedString by also including the line height if specified in paragraph style. ++ (CGFloat)ascenderWithAttributedString:(NSAttributedString *)attributedString +{ + UIFont *font = [attributedString attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL]; + NSParagraphStyle *paragraphStyle = [attributedString attribute:NSParagraphStyleAttributeName atIndex:0 effectiveRange:NULL]; + if (!paragraphStyle) { + return font.ascender; + } + CGFloat lineHeight = MAX(font.lineHeight, paragraphStyle.minimumLineHeight); + if (paragraphStyle.maximumLineHeight > 0) { + lineHeight = MIN(lineHeight, paragraphStyle.maximumLineHeight); + } + return lineHeight + font.descender; +} + - (void)setAttributedText:(NSAttributedString *)attributedText { @@ -392,9 +406,8 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; NSUInteger length = attributedText.length; if (length > 0) { - CGFloat screenScale = ASScreenScale(); - self.ascender = round([[attributedText attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL] ascender] * screenScale)/screenScale; - self.descender = round([[attributedText attribute:NSFontAttributeName atIndex:length - 1 effectiveRange:NULL] descender] * screenScale)/screenScale; + self.ascender = [[self class] ascenderWithAttributedString:attributedText]; + self.descender = [[attributedText attribute:NSFontAttributeName atIndex:attributedText.length - 1 effectiveRange:NULL] descender]; } // Tell the display node superclasses that the cached layout is incorrect now From b0aeb2997d769f435cb4c0602979234b70238cd4 Mon Sep 17 00:00:00 2001 From: Yue-Wang-Google Date: Thu, 28 Jul 2016 14:57:23 -0700 Subject: [PATCH 220/247] Fixed recursively setting displaysAsynchronously in ASDK snapshot tests to recurse through all descendant nodes instead of just the root node's subnodes (#1995) Patch from Google Inc. --- AsyncDisplayKitTests/ASSnapshotTestCase.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKitTests/ASSnapshotTestCase.mm b/AsyncDisplayKitTests/ASSnapshotTestCase.mm index 1a68e47cfa..3b2aaaadd0 100644 --- a/AsyncDisplayKitTests/ASSnapshotTestCase.mm +++ b/AsyncDisplayKitTests/ASSnapshotTestCase.mm @@ -43,7 +43,7 @@ node.displaysAsynchronously = flag; for (ASDisplayNode *subnode in node.subnodes) { - subnode.displaysAsynchronously = flag; + [self _recursivelySetDisplaysAsynchronously:flag forNode:subnode]; } } From 7426c1dd6698e92b3aa52a3463739fb71f017224 Mon Sep 17 00:00:00 2001 From: Yue-Wang-Google Date: Thu, 28 Jul 2016 17:03:02 -0700 Subject: [PATCH 221/247] Fixed implicit cast for 64-bit devices in ASTextKitComponents.h (#1994) --- AsyncDisplayKit/TextKit/ASTextKitComponents.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AsyncDisplayKit/TextKit/ASTextKitComponents.h b/AsyncDisplayKit/TextKit/ASTextKitComponents.h index 5acb59c491..8359f38d2d 100644 --- a/AsyncDisplayKit/TextKit/ASTextKitComponents.h +++ b/AsyncDisplayKit/TextKit/ASTextKitComponents.h @@ -10,13 +10,14 @@ #import #import +#import NS_ASSUME_NONNULL_BEGIN ASDISPLAYNODE_INLINE CGFloat ceilPixelValueForScale(CGFloat f, CGFloat scale) { // Round up to device pixel (.5 on retina) - return ceilf(f * scale) / scale; + return ceil(f * scale) / scale; } ASDISPLAYNODE_INLINE CGSize ceilSizeValue(CGSize s) From 5ff5a2771737548a518db1d973398da552460219 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 28 Jul 2016 20:43:27 -0700 Subject: [PATCH 222/247] [ASTextKitComponents] Remove unused, somewhat dangerous functions (#2007) [ASTextKitComponents] Remove Unused Scale Conversion Functions --- AsyncDisplayKit/TextKit/ASTextKitComponents.h | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/AsyncDisplayKit/TextKit/ASTextKitComponents.h b/AsyncDisplayKit/TextKit/ASTextKitComponents.h index 8359f38d2d..0b873c3191 100644 --- a/AsyncDisplayKit/TextKit/ASTextKitComponents.h +++ b/AsyncDisplayKit/TextKit/ASTextKitComponents.h @@ -10,24 +10,9 @@ #import #import -#import NS_ASSUME_NONNULL_BEGIN -ASDISPLAYNODE_INLINE CGFloat ceilPixelValueForScale(CGFloat f, CGFloat scale) -{ - // Round up to device pixel (.5 on retina) - return ceil(f * scale) / scale; -} - -ASDISPLAYNODE_INLINE CGSize ceilSizeValue(CGSize s) -{ - CGFloat screenScale = [UIScreen mainScreen].scale; - s.width = ceilPixelValueForScale(s.width, screenScale); - s.height = ceilPixelValueForScale(s.height, screenScale); - return s; -} - @interface ASTextKitComponents : NSObject /** From 6a21daa80f4b7f55bde46adc72569ae0d72deeaa Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 28 Jul 2016 20:44:14 -0700 Subject: [PATCH 223/247] [ASInternalHelpers] Use type-generic math (#2006) --- AsyncDisplayKit.xcodeproj/project.pbxproj | 12 ++++++------ .../{ASInternalHelpers.mm => ASInternalHelpers.m} | 10 +++++++--- 2 files changed, 13 insertions(+), 9 deletions(-) rename AsyncDisplayKit/Private/{ASInternalHelpers.mm => ASInternalHelpers.m} (92%) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index c237eb4706..ccdb08268d 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -133,7 +133,7 @@ 34EFC75B1B701BAF00AD841F /* ASDimension.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED071B17843500DA7C62 /* ASDimension.h */; settings = {ATTRIBUTES = (Public, ); }; }; 34EFC75C1B701BD200AD841F /* ASDimension.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED081B17843500DA7C62 /* ASDimension.mm */; }; 34EFC75D1B701BE900AD841F /* ASInternalHelpers.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */; }; - 34EFC75E1B701BF000AD841F /* ASInternalHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.mm */; }; + 34EFC75E1B701BF000AD841F /* ASInternalHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */; }; 34EFC75F1B701C8600AD841F /* ASInsetLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED091B17843500DA7C62 /* ASInsetLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; 34EFC7601B701C8B00AD841F /* ASInsetLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED0A1B17843500DA7C62 /* ASInsetLayoutSpec.mm */; }; 34EFC7611B701C9C00AD841F /* ASBackgroundLayoutSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = ACF6ED011B17843500DA7C62 /* ASBackgroundLayoutSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -298,7 +298,7 @@ ACF6ED2E1B17843500DA7C62 /* ASRatioLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED151B17843500DA7C62 /* ASRatioLayoutSpec.mm */; }; ACF6ED301B17843500DA7C62 /* ASStackLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED171B17843500DA7C62 /* ASStackLayoutSpec.mm */; }; ACF6ED321B17843500DA7C62 /* ASStaticLayoutSpec.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED191B17843500DA7C62 /* ASStaticLayoutSpec.mm */; }; - ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.mm */; }; + ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */; }; ACF6ED501B17847A00DA7C62 /* ASStackPositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED481B17847A00DA7C62 /* ASStackPositionedLayout.mm */; }; ACF6ED521B17847A00DA7C62 /* ASStackUnpositionedLayout.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED4A1B17847A00DA7C62 /* ASStackUnpositionedLayout.mm */; }; ACF6ED5C1B178DC700DA7C62 /* ASCenterLayoutSpecSnapshotTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = ACF6ED531B178DC700DA7C62 /* ASCenterLayoutSpecSnapshotTests.mm */; }; @@ -1052,7 +1052,7 @@ ACF6ED181B17843500DA7C62 /* ASStaticLayoutSpec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASStaticLayoutSpec.h; path = AsyncDisplayKit/Layout/ASStaticLayoutSpec.h; sourceTree = ""; }; ACF6ED191B17843500DA7C62 /* ASStaticLayoutSpec.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; name = ASStaticLayoutSpec.mm; path = AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm; sourceTree = ""; }; ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASInternalHelpers.h; sourceTree = ""; }; - ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASInternalHelpers.mm; sourceTree = ""; }; + ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASInternalHelpers.m; sourceTree = ""; }; ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASLayoutSpecUtilities.h; sourceTree = ""; }; ACF6ED461B17847A00DA7C62 /* ASStackLayoutSpecUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASStackLayoutSpecUtilities.h; sourceTree = ""; }; ACF6ED471B17847A00DA7C62 /* ASStackPositionedLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASStackPositionedLayout.h; sourceTree = ""; }; @@ -1498,7 +1498,7 @@ 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, - ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.mm */, + ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */, 0442850C1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm */, @@ -2100,7 +2100,7 @@ 058D0A16195D050800B7D73C /* ASImageNode.mm in Sources */, 430E7C911B4C23F100697A4C /* ASIndexPath.m in Sources */, ACF6ED231B17843500DA7C62 /* ASInsetLayoutSpec.mm in Sources */, - ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.mm in Sources */, + ACF6ED4C1B17847A00DA7C62 /* ASInternalHelpers.m in Sources */, 68FC85DF1CE29AB700EDD713 /* ASNavigationController.m in Sources */, ACF6ED251B17843500DA7C62 /* ASLayout.mm in Sources */, CC4981BD1D1C7F65004E13CC /* NSIndexSet+ASHelpers.m in Sources */, @@ -2279,7 +2279,7 @@ 254C6B821BF94F8A003EC431 /* ASTextKitComponents.m in Sources */, 430E7C921B4C23F100697A4C /* ASIndexPath.m in Sources */, 34EFC7601B701C8B00AD841F /* ASInsetLayoutSpec.mm in Sources */, - 34EFC75E1B701BF000AD841F /* ASInternalHelpers.mm in Sources */, + 34EFC75E1B701BF000AD841F /* ASInternalHelpers.m in Sources */, 34EFC7681B701CDE00AD841F /* ASLayout.mm in Sources */, DECBD6EA1BE56E1900CF4905 /* ASButtonNode.mm in Sources */, 254C6B841BF94F8A003EC431 /* ASTextNodeWordKerner.m in Sources */, diff --git a/AsyncDisplayKit/Private/ASInternalHelpers.mm b/AsyncDisplayKit/Private/ASInternalHelpers.m similarity index 92% rename from AsyncDisplayKit/Private/ASInternalHelpers.mm rename to AsyncDisplayKit/Private/ASInternalHelpers.m index dbe7f16795..61a554a7f8 100644 --- a/AsyncDisplayKit/Private/ASInternalHelpers.mm +++ b/AsyncDisplayKit/Private/ASInternalHelpers.m @@ -13,6 +13,7 @@ #import #import "ASThread.h" +#import BOOL ASSubclassOverridesSelector(Class superclass, Class subclass, SEL selector) { @@ -80,17 +81,20 @@ CGFloat ASScreenScale() CGFloat ASFloorPixelValue(CGFloat f) { - return floorf(f * ASScreenScale()) / ASScreenScale(); + CGFloat scale = ASScreenScale(); + return floor(f * scale) / scale; } CGFloat ASCeilPixelValue(CGFloat f) { - return ceilf(f * ASScreenScale()) / ASScreenScale(); + CGFloat scale = ASScreenScale(); + return ceil(f * scale) / scale; } CGFloat ASRoundPixelValue(CGFloat f) { - return roundf(f * ASScreenScale()) / ASScreenScale(); + CGFloat scale = ASScreenScale(); + return round(f * scale) / scale; } @implementation NSIndexPath (ASInverseComparison) From ff2c47c415ce4019db0c44598980d46073f2badd Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Fri, 29 Jul 2016 10:38:20 -0700 Subject: [PATCH 224/247] add assertion for ASRelativeDimensionTypePercent value to be between 0-1 (#2009) --- AsyncDisplayKit/Layout/ASDimension.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AsyncDisplayKit/Layout/ASDimension.mm b/AsyncDisplayKit/Layout/ASDimension.mm index 53b03b7670..cf58e1c517 100644 --- a/AsyncDisplayKit/Layout/ASDimension.mm +++ b/AsyncDisplayKit/Layout/ASDimension.mm @@ -18,16 +18,21 @@ ASRelativeDimension const ASRelativeDimensionUnconstrained = {}; ASRelativeDimension ASRelativeDimensionMake(ASRelativeDimensionType type, CGFloat value) { if (type == ASRelativeDimensionTypePoints) { ASDisplayNodeCAssertPositiveReal(@"Points", value); } + if (type == ASRelativeDimensionTypePercent) { + ASDisplayNodeCAssert( 0 <= value && value <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", value); + } ASRelativeDimension dimension; dimension.type = type; dimension.value = value; return dimension; } ASRelativeDimension ASRelativeDimensionMakeWithPoints(CGFloat points) { + ASDisplayNodeCAssertPositiveReal(@"Points", points); return ASRelativeDimensionMake(ASRelativeDimensionTypePoints, points); } ASRelativeDimension ASRelativeDimensionMakeWithPercent(CGFloat percent) { + ASDisplayNodeCAssert( 0 <= percent && percent <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", percent); return ASRelativeDimensionMake(ASRelativeDimensionTypePercent, percent); } From 678df3701772ddc03c8cbe55e6d895ab3943d404 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 29 Jul 2016 10:52:55 -0700 Subject: [PATCH 225/247] [Layout Transition API] Simplify applying layout transition (#1886) * Simplify applying layout transition in preparation for bigger layout transition API work * Change from apply to complete in if layout transitions are involved and _applyLayout: to _setCalculatedLayout: for layout * Change to applySubnodeInsertions and applySubnodeRemovals * Change from completeTransition to commitTransition and flip logic around when to trampoline to the main thread for implicit hierarchy management * More internal API improvements * Fix merge conflicts * Rename _layout to _calculatedLayout --- AsyncDisplayKit/ASDisplayNode.mm | 247 +++++++++++------- .../Private/ASDisplayNodeInternal.h | 4 +- AsyncDisplayKit/Private/ASLayoutTransition.h | 4 +- AsyncDisplayKit/Private/ASLayoutTransition.mm | 4 +- 4 files changed, 163 insertions(+), 96 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index d70f34d76a..99125c4458 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -642,30 +642,23 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { ASDN::MutexLocker l(__instanceLock__); if (! [self shouldMeasureWithSizeRange:constrainedSize]) { - return _layout; + return _calculatedLayout; } [self cancelLayoutTransitionsInProgress]; - ASLayout *previousLayout = _layout; + ASLayout *previousLayout = _calculatedLayout; ASLayout *newLayout = [self calculateLayoutThatFits:constrainedSize]; - if (ASHierarchyStateIncludesLayoutPending(_hierarchyState)) { - _pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self - pendingLayout:newLayout - previousLayout:previousLayout]; - } else { - ASLayoutTransition *layoutTransition = nil; - if (self.usesImplicitHierarchyManagement) { - layoutTransition = [[ASLayoutTransition alloc] initWithNode:self - pendingLayout:newLayout - previousLayout:previousLayout]; - } - - [self _applyLayout:newLayout layoutTransition:layoutTransition]; - [self _completeLayoutCalculation]; + _pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self + pendingLayout:newLayout + previousLayout:previousLayout]; + + if (ASHierarchyStateIncludesLayoutPending(_hierarchyState) == NO) { + // Complete the pending layout transition immediately + [self _completePendingLayoutTransition]; } - + return newLayout; } @@ -686,12 +679,12 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) // Only generate a new layout if: // - The current layout is dirty // - The passed constrained size is different than the layout's constrained size - return ([self _hasDirtyLayout] || !ASSizeRangeEqualToSizeRange(constrainedSize, _layout.constrainedSizeRange)); + return ([self _hasDirtyLayout] || !ASSizeRangeEqualToSizeRange(constrainedSize, _calculatedLayout.constrainedSizeRange)); } - (BOOL)_hasDirtyLayout { - return _layout == nil || _layout.isDirty; + return _calculatedLayout == nil || _calculatedLayout.isDirty; } - (ASLayoutableType)layoutableType @@ -710,13 +703,14 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) shouldMeasureAsync:(BOOL)shouldMeasureAsync measurementCompletion:(void(^)())completion { - if (_layout == nil) { + if (_calculatedLayout == nil) { // constrainedSizeRange returns a struct and is invalid to call on nil. // Defaulting to CGSizeZero can cause negative values in client layout code. return; } + [self invalidateCalculatedLayout]; - [self transitionLayoutWithSizeRange:_layout.constrainedSizeRange + [self transitionLayoutWithSizeRange:_calculatedLayout.constrainedSizeRange animated:animated shouldMeasureAsync:shouldMeasureAsync measurementCompletion:completion]; @@ -778,12 +772,11 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) return; } - ASLayout *previousLayout = _layout; - [self _applyLayout:newLayout layoutTransition:nil]; + ASLayout *previousLayout = _calculatedLayout; + [self setCalculatedLayout:newLayout]; ASDisplayNodePerformBlockOnEverySubnode(self, ^(ASDisplayNode * _Nonnull node) { - [node _applyPendingLayoutContext]; - [node _completeLayoutCalculation]; + [node _completePendingLayoutTransition]; node.hierarchyState &= (~ASHierarchyStateLayoutPending); }); @@ -793,48 +786,26 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) completion(); } + // Setup pending layout transition for animation _pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self pendingLayout:newLayout - previousLayout:previousLayout]; + previousLayout:previousLayout]; + // Setup context for pending layout transition. we need to hold a strong reference to the context + _pendingLayoutTransitionContext = [[_ASTransitionContext alloc] initWithAnimation:animated + layoutDelegate:_pendingLayoutTransition + completionDelegate:self]; + + // Apply the subnode insertion immediately to be able to animate the nodes [_pendingLayoutTransition applySubnodeInsertions]; - - _transitionContext = [[_ASTransitionContext alloc] initWithAnimation:animated - layoutDelegate:_pendingLayoutTransition - completionDelegate:self]; - [self animateLayoutTransition:_transitionContext]; + + // Kick off animating the layout transition + [self animateLayoutTransition:_pendingLayoutTransitionContext]; }); }; ASPerformBlockOnBackgroundThread(transitionBlock); } -- (void)_completeLayoutCalculation -{ - ASDN::MutexLocker l(__instanceLock__); - [self calculatedLayoutDidChange]; - - // We generate placeholders at measureWithSizeRange: time so that a node is guaranteed to have a placeholder ready to go. - // This is also because measurement is usually asynchronous, but placeholders need to be set up synchronously. - // First measurement is guaranteed to be before the node is onscreen, so we can create the image async. but still have it appear sync. - if (_placeholderEnabled && [self _displaysAsynchronously] && self.contents == nil) { - - // Zero-sized nodes do not require a placeholder. - CGSize layoutSize = (_layout ? _layout.size : CGSizeZero); - if (CGSizeEqualToSize(layoutSize, CGSizeZero)) { - return; - } - - if (!_placeholderImage) { - _placeholderImage = [self placeholderImage]; - } - } -} - -- (void)calculatedLayoutDidChange -{ - // subclass override -} - - (void)cancelLayoutTransitionsInProgress { ASDN::MutexLocker l(__instanceLock__); @@ -888,25 +859,108 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) return (!_transitionInProgress || _transitionID != transitionID); } +#pragma mark - Layout Transition API / ASDisplayNode (Beta) + +/* + * Hook for subclasse to perform an animation based on the given ASContextTransitioning. By default this just layouts + * applies all subnodes without animation and calls completes the transition on the context. + */ - (void)animateLayoutTransition:(id)context { - [self __layoutSubnodes]; + [self __layoutSublayouts]; [context completeTransition:YES]; } +/* + * Hook for subclasses to clean up nodes after the transition happened. Furthermore this can be used from subclasses + * to manually perform deletions. + */ - (void)didCompleteLayoutTransition:(id)context { [_pendingLayoutTransition applySubnodeRemovals]; - [self _completeLayoutCalculation]; - _pendingLayoutTransition = nil; } #pragma mark - _ASTransitionContextCompletionDelegate +/* + * After completeTransition: is called on the ASContextTransitioning object in animateLayoutTransition: this + * delegate method will be called that start the completion process of the + */ - (void)transitionContext:(_ASTransitionContext *)context didComplete:(BOOL)didComplete { [self didCompleteLayoutTransition:context]; - _transitionContext = nil; + _pendingLayoutTransitionContext = nil; + + [self _pendingLayoutTransitionDidComplete]; +} + +#pragma mark - Layout + +/* + * Completes the pending layout transition immediately without going through the the Layout Transition Animation API + */ +- (void)_completePendingLayoutTransition +{ + ASDN::MutexLocker l(__instanceLock__); + if (_pendingLayoutTransition) { + [self setCalculatedLayout:_pendingLayoutTransition.pendingLayout]; + [self _completeLayoutTransition:_pendingLayoutTransition]; + } + [self _pendingLayoutTransitionDidComplete]; +} + +/* + * Can be directly called to commit the given layout transition immediately to complete without calling through to the + * Layout Transition Animation API + */ +- (void)_completeLayoutTransition:(ASLayoutTransition *)layoutTransition +{ + // Layout transition is not supported for non implicit hierarchy managed nodes yet + if (layoutTransition == nil || self.usesImplicitHierarchyManagement == NO) { + return; + } + + // Trampoline to the main thread if necessary + if (ASDisplayNodeThreadIsMain() || layoutTransition.isSynchronous == NO) { + [layoutTransition commitTransition]; + } else { + // Subnode insertions and removals need to happen always on the main thread if at least one subnode is already loaded + ASPerformBlockOnMainThread(^{ + [layoutTransition commitTransition]; + }); + } +} + +- (void)_pendingLayoutTransitionDidComplete +{ + ASDN::MutexLocker l(__instanceLock__); + + // Subclass hook + [self calculatedLayoutDidChange]; + + // We generate placeholders at measureWithSizeRange: time so that a node is guaranteed to have a placeholder ready to go. + // This is also because measurement is usually asynchronous, but placeholders need to be set up synchronously. + // First measurement is guaranteed to be before the node is onscreen, so we can create the image async. but still have it appear sync. + if (_placeholderEnabled && [self _displaysAsynchronously] && self.contents == nil) { + + // Zero-sized nodes do not require a placeholder. + CGSize layoutSize = (_calculatedLayout ? _calculatedLayout.size : CGSizeZero); + if (CGSizeEqualToSize(layoutSize, CGSizeZero)) { + return; + } + + if (!_placeholderImage) { + _placeholderImage = [self placeholderImage]; + } + } + + // Cleanup pending layout transition + _pendingLayoutTransition = nil; +} + +- (void)calculatedLayoutDidChange +{ + // subclass override } #pragma mark - Asynchronous display @@ -1068,7 +1122,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) __instanceLock__.lock(); - if (_layout == nil) { + if (_calculatedLayout == nil) { // Can't proceed without a layout as no constrained size would be available __instanceLock__.unlock(); return; @@ -1086,11 +1140,11 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } // This is the root node. Trigger a full measurement pass on *current* thread. Old constrained size is re-used. - [self measureWithSizeRange:_layout.constrainedSizeRange]; + [self measureWithSizeRange:_calculatedLayout.constrainedSizeRange]; CGRect oldBounds = self.bounds; CGSize oldSize = oldBounds.size; - CGSize newSize = _layout.size; + CGSize newSize = _calculatedLayout.size; if (! CGSizeEqualToSize(oldSize, newSize)) { self.bounds = (CGRect){ oldBounds.origin, newSize }; @@ -1168,24 +1222,6 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } } -- (void)layout -{ - ASDisplayNodeAssertMainThread(); - - if ([self _hasDirtyLayout]) { - return; - } - - [self __layoutSubnodes]; -} - -- (void)__layoutSubnodes -{ - for (ASLayout *subnodeLayout in _layout.sublayouts) { - ((ASDisplayNode *)subnodeLayout.layoutableObject).frame = [subnodeLayout frame]; - } -} - - (void)layoutDidFinish { // Hook for subclasses @@ -2080,19 +2116,30 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (ASLayout *)calculatedLayout { ASDN::MutexLocker l(__instanceLock__); - return _layout; + return _calculatedLayout; +} + +- (void)setCalculatedLayout:(ASLayout *)calculatedLayout +{ + ASDN::MutexLocker l(__instanceLock__); + + ASDisplayNodeAssertTrue(calculatedLayout.layoutableObject == self); + ASDisplayNodeAssertTrue(calculatedLayout.size.width >= 0.0); + ASDisplayNodeAssertTrue(calculatedLayout.size.height >= 0.0); + + _calculatedLayout = calculatedLayout; } - (CGSize)calculatedSize { ASDN::MutexLocker l(__instanceLock__); - return _layout.size; + return _calculatedLayout.size; } - (ASSizeRange)constrainedSizeForCalculatedLayout { ASDN::MutexLocker l(__instanceLock__); - return _layout.constrainedSizeRange; + return _calculatedLayout.constrainedSizeRange; } - (void)setLayoutSpecBlock:(ASLayoutSpecBlock)layoutSpecBlock @@ -2149,7 +2196,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) // This will cause the next call to -measureWithSizeRange: to actually compute a new layout // instead of returning the current layout - _layout.dirty = YES; + _calculatedLayout.dirty = YES; } - (void)__didLoad @@ -2516,7 +2563,7 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) - (void)_applyLayout:(ASLayout *)layout layoutTransition:(ASLayoutTransition *)layoutTransition { ASDN::MutexLocker l(__instanceLock__); - _layout = layout; + _calculatedLayout = layout; ASDisplayNodeAssertTrue(layout.layoutableObject == self); ASDisplayNodeAssertTrue(layout.size.width >= 0.0); @@ -2531,15 +2578,35 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) // Subnode insertions and removals need to happen always on the main thread if at least one subnode is already loaded ASPerformBlockOnMainThread(^{ - [layoutTransition startTransition]; + [layoutTransition commitTransition]; }); return; } - [layoutTransition startTransition]; + [layoutTransition commitTransition]; } +- (void)layout +{ + ASDisplayNodeAssertMainThread(); + + if ([self _hasDirtyLayout]) { + return; + } + + [self __layoutSublayouts]; +} + +- (void)__layoutSublayouts +{ + for (ASLayout *subnodeLayout in _calculatedLayout.sublayouts) { + ((ASDisplayNode *)subnodeLayout.layoutableObject).frame = [subnodeLayout frame]; + } +} + +#pragma mark - Display + - (void)displayWillStart { ASDisplayNodeAssertMainThread(); diff --git a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h index c894bf762e..f6337ba03c 100644 --- a/AsyncDisplayKit/Private/ASDisplayNodeInternal.h +++ b/AsyncDisplayKit/Private/ASDisplayNodeInternal.h @@ -116,14 +116,14 @@ FOUNDATION_EXPORT NSString * const ASRenderingEngineDidDisplayNodesScheduledBefo CGFloat _contentsScaleForDisplay; ASEnvironmentState _environmentState; - ASLayout *_layout; + ASLayout *_calculatedLayout; UIEdgeInsets _hitTestSlop; NSMutableArray *_subnodes; // Main thread only - _ASTransitionContext *_transitionContext; + _ASTransitionContext *_pendingLayoutTransitionContext; BOOL _usesImplicitHierarchyManagement; int32_t _pendingTransitionID; diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.h b/AsyncDisplayKit/Private/ASLayoutTransition.h index 3c8e5781cb..64869dc085 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.h +++ b/AsyncDisplayKit/Private/ASLayoutTransition.h @@ -34,7 +34,7 @@ @property (nonatomic, readonly, strong) ASLayout *pendingLayout; /** - * Returns if the layout transition can happen asynchronously + * Returns if the layout transition needs to happen synchronously */ @property (nonatomic, readonly, assign) BOOL isSynchronous; @@ -47,7 +47,7 @@ /** * Insert and remove subnodes that where added or removed between the previousLayout and the pendingLayout */ -- (void)startTransition; +- (void)commitTransition; /** * Insert all new subnodes that where added between the previous layout and the pending layout diff --git a/AsyncDisplayKit/Private/ASLayoutTransition.mm b/AsyncDisplayKit/Private/ASLayoutTransition.mm index e71760770f..e169b6e142 100644 --- a/AsyncDisplayKit/Private/ASLayoutTransition.mm +++ b/AsyncDisplayKit/Private/ASLayoutTransition.mm @@ -71,10 +71,10 @@ static inline BOOL ASLayoutCanTransitionAsynchronous(ASLayout *layout) { - (BOOL)isSynchronous { ASDN::MutexLocker l(__instanceLock__); - return ASLayoutCanTransitionAsynchronous(_pendingLayout); + return !ASLayoutCanTransitionAsynchronous(_pendingLayout); } -- (void)startTransition +- (void)commitTransition { [self applySubnodeInsertions]; [self applySubnodeRemovals]; From c90ed08d1073701e2c7f8a2677d460c140f05264 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 29 Jul 2016 10:53:31 -0700 Subject: [PATCH 226/247] [ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK (#1937) * Use childrenMap directly to prevent creating an NSArray in ASDK for ASLayoutSpec children * Add locking for parent property in ASLayoutSpec * Remove unnecessary import * Add newline * Add NSFastEnumeration to ASEnvironment and ASDisplayNode / ASLayoutSpec * Change NSMutableArray initializer to arrayWithCapacity: * Move ASLayoutSpec+Private.h into Private folder Fixes building with Swift * Remove lock for ASLayoutSpec parent --- AsyncDisplayKit.xcodeproj/project.pbxproj | 16 ++-- AsyncDisplayKit/ASDisplayNode.mm | 9 ++ AsyncDisplayKit/ASViewController.mm | 3 +- AsyncDisplayKit/Details/ASEnvironment.h | 3 +- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 84 ++++++++++++++----- AsyncDisplayKit/Layout/ASStackLayoutSpec.mm | 31 ++++--- AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm | 7 +- .../Private/ASEnvironmentInternal.mm | 2 +- .../Private/ASLayoutSpec+Private.h | 25 ++++++ 9 files changed, 135 insertions(+), 45 deletions(-) create mode 100644 AsyncDisplayKit/Private/ASLayoutSpec+Private.h diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index ccdb08268d..bd0a553ab7 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -214,6 +214,7 @@ 69E1006F1CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69E100701CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69F10C871C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */; }; 7630FFA81C9E267E007A7C0E /* ASVideoNode.h in Headers */ = {isa = PBXBuildFile; fileRef = AEEC47DF1C20C2DD00EC1693 /* ASVideoNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D51C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D61C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m in Sources */ = {isa = PBXBuildFile; fileRef = 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */; }; @@ -977,6 +978,7 @@ 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASEnvironmentInternal.h; sourceTree = ""; }; 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASEnvironmentInternal.mm; sourceTree = ""; }; 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASRangeControllerUpdateRangeProtocol+Beta.h"; sourceTree = ""; }; + 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASLayoutSpec+Private.h"; sourceTree = ""; }; 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; path = AsyncDisplayKit.h; sourceTree = ""; }; 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AsyncDisplayKit+Debug.h"; sourceTree = ""; }; 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AsyncDisplayKit+Debug.m"; sourceTree = ""; }; @@ -1482,6 +1484,8 @@ 044285051BAA63FE00D16268 /* ASBatchFetching.h */, 044285061BAA63FE00D16268 /* ASBatchFetching.m */, 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */, + 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, + 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */, AEB7B0191C5962EA00662EF4 /* ASDefaultPlayButton.m */, 058D0A08195D050800B7D73C /* ASDisplayNode+AsyncDisplay.mm */, @@ -1490,16 +1494,17 @@ DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */, 058D0A0B195D050800B7D73C /* ASDisplayNode+UIViewBridge.mm */, 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */, - E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */, - E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */, 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */, 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */, + 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */, 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, - 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, - ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, + ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.mm */, + 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */, ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, + E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */, + E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */, 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */, 0442850C1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm */, CC3B20811C3F76D600798563 /* ASPendingStateController.h */, @@ -1517,8 +1522,6 @@ CC3B20881C3F7A5400798563 /* ASWeakSet.m */, DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */, DBC452DA1C5BF64600B16017 /* NSArray+Diffing.m */, - 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, - 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, ); path = Private; sourceTree = ""; @@ -1752,6 +1755,7 @@ B350625B1B010F070018CF92 /* ASEqualityHelpers.h in Headers */, 680346941CE4052A0009FEB4 /* ASNavigationController.h in Headers */, B350621B1B010EFD0018CF92 /* ASFlowLayoutController.h in Headers */, + 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */, B350621D1B010EFD0018CF92 /* ASHighlightOverlayLayer.h in Headers */, C78F7E2B1BF7809800CDEAFC /* ASTableNode.h in Headers */, AC7A2C181BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */, diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 99125c4458..e4da5f697e 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2954,6 +2954,15 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; } } +#pragma mark - NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(id __unsafe_unretained [])stackbuf + count:(NSUInteger)stackbufLength +{ + return [self.children countByEnumeratingWithState:state objects:stackbuf count:stackbufLength]; +} + ASEnvironmentLayoutOptionsForwarding ASEnvironmentLayoutExtensibilityForwarding diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index e754633ca0..9b355dd8e5 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -289,8 +289,7 @@ ASVisibilityDepthImplementation; self.node.environmentState = environmentState; [self.node setNeedsLayout]; - NSArray> *children = [self.node children]; - for (id child in children) { + for (id child in self.node) { ASEnvironmentStatePropagateDown(child, environmentState.environmentTraitCollection); } } diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index 4dad9fde9f..3717ae5d0d 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -99,7 +99,7 @@ ASDISPLAYNODE_EXTERN_C_END * defined in an ASEnvironmentState up and down the ASEnvironment tree. To be able to define how merges of * States should happen, specific merge functions can be provided */ -@protocol ASEnvironment +@protocol ASEnvironment /// The environment collection of an object which class conforms to the ASEnvironment protocol - (ASEnvironmentState)environmentState; @@ -126,6 +126,7 @@ ASDISPLAYNODE_EXTERN_C_END /// sets a trait collection on this environment state. - (void)setEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection; + @end // ASCollection/TableNodes don't actually have ASCellNodes as subnodes. Because of this we can't rely on display trait diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index 4c66b3c129..848b8c3836 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -8,7 +8,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASLayoutSpec.h" +#import "ASLayoutSpec+Private.h" #import "ASAssert.h" #import "ASEnvironmentInternal.h" @@ -17,16 +17,12 @@ #import "ASThread.h" #import "ASTraitCollection.h" -#import -#import #import -typedef std::map, std::less> ASChildMap; - @interface ASLayoutSpec() { ASEnvironmentState _environmentState; ASDN::RecursiveMutex __instanceLock__; - ASChildMap _children; + ASChildrenMap _childrenMap; } @end @@ -35,6 +31,7 @@ typedef std::map, std::less> ASCh // these dynamic properties all defined in ASLayoutOptionsPrivate.m @dynamic spacingAfter, spacingBefore, flexGrow, flexShrink, flexBasis, alignSelf, ascender, descender, sizeRange, layoutPosition, layoutableType; +@synthesize parent = _parent; @synthesize isFinalLayoutable = _isFinalLayoutable; - (instancetype)init @@ -105,9 +102,10 @@ typedef std::map, std::less> ASCh return child; } +#pragma mark - Parent + - (void)setParent:(id)parent { - // FIXME: Locking should be evaluated here. _parent is not widely used yet, though. _parent = parent; if ([parent supportsUpwardPropagation]) { @@ -115,17 +113,24 @@ typedef std::map, std::less> ASCh } } +- (id)parent +{ + return _parent; +} + +#pragma mark - Children + - (void)setChild:(id)child { ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); if (child) { id finalLayoutable = [self layoutableToAddFromLayoutable:child]; if (finalLayoutable) { - _children[0] = finalLayoutable; + _childrenMap[0] = finalLayoutable; [self propagateUpLayoutable:finalLayoutable]; } } else { - _children.erase(0); + _childrenMap.erase(0); } } @@ -134,9 +139,9 @@ typedef std::map, std::less> ASCh ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); if (child) { id finalLayoutable = [self layoutableToAddFromLayoutable:child]; - _children[index] = finalLayoutable; + _childrenMap[index] = finalLayoutable; } else { - _children.erase(index); + _childrenMap.erase(index); } // TODO: Should we propagate up the layoutable at it could happen that multiple children will propagated up their // layout options and one child will overwrite values from another child @@ -147,35 +152,67 @@ typedef std::map, std::less> ASCh { ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); - _children.clear(); + _childrenMap.clear(); NSUInteger i = 0; for (id child in children) { - _children[i] = [self layoutableToAddFromLayoutable:child]; + _childrenMap[i] = [self layoutableToAddFromLayoutable:child]; i += 1; } } - (id)childForIndex:(NSUInteger)index { - if (index < _children.size()) { - return _children[index]; + if (index < _childrenMap.size()) { + return _childrenMap[index]; } return nil; } - (id)child { - return _children[0]; + return _childrenMap[0]; } - (NSArray *)children { + // If used inside ASDK, the childrenMap property should be preferred over the children array to prevent unecessary + // boxing std::vector children; - for (ASChildMap::iterator it = _children.begin(); it != _children.end(); ++it ) { - children.push_back(it->second); + for (auto const &entry : _childrenMap) { + children.push_back(entry.second); + } + + return [NSArray arrayWithObjects:&children[0] count:children.size()]; +} + +#pragma mark - NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(id __unsafe_unretained [])stackbuf + count:(NSUInteger)stackbufLength +{ + NSUInteger count = 0; + unsigned long countOfItemsAlreadyEnumerated = state->state; + + if (countOfItemsAlreadyEnumerated == 0) { + state->mutationsPtr = &state->extra[0]; + } + + if (countOfItemsAlreadyEnumerated < _childrenMap.size()) { + state->itemsPtr = stackbuf; + + while((countOfItemsAlreadyEnumerated < _childrenMap.size()) && (count < stackbufLength)) { + stackbuf[count] = _childrenMap[countOfItemsAlreadyEnumerated]; + countOfItemsAlreadyEnumerated++; + count++; + } + } else { + count = 0; } - return [NSArray arrayWithObjects:&children[0] count:children.size()]; + state->state = countOfItemsAlreadyEnumerated; + + return count; } #pragma mark - ASEnvironment @@ -233,6 +270,15 @@ ASEnvironmentLayoutExtensibilityForwarding @end +@implementation ASLayoutSpec (Private) + +- (ASChildrenMap)childrenMap +{ + return _childrenMap; +} + +@end + @implementation ASLayoutSpec (Debugging) #pragma mark - ASLayoutableAsciiArtProtocol diff --git a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm index 2393972a53..a6ab9d3fea 100644 --- a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm @@ -13,6 +13,7 @@ #import "ASInternalHelpers.h" +#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASStackBaselinePositionedLayout.h" #import "ASThread.h" @@ -58,7 +59,7 @@ _alignItems = alignItems; _justifyContent = justifyContent; - [self setChildren:children]; + self.children = children; return self; } @@ -120,7 +121,9 @@ - (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize { - if (self.children.count == 0) { + auto const &children = self.childrenMap; + + if (children.size() == 0) { return [ASLayout layoutWithLayoutableObject:self constrainedSizeRange:constrainedSize size:constrainedSize.min]; @@ -129,9 +132,9 @@ ASStackLayoutSpecStyle style = {.direction = _direction, .spacing = _spacing, .justifyContent = _justifyContent, .alignItems = _alignItems, .baselineRelativeArrangement = _baselineRelativeArrangement}; BOOL needsBaselinePass = _baselineRelativeArrangement || _alignItems == ASStackLayoutAlignItemsBaselineFirst || _alignItems == ASStackLayoutAlignItemsBaselineLast; - std::vector> stackChildren = std::vector>(); - for (id child in self.children) { - stackChildren.push_back(child); + std::vector> stackChildren; + for (auto const &entry : children) { + stackChildren.push_back(entry.second); } const auto unpositionedLayout = ASStackUnpositionedLayout::compute(stackChildren, style, constrainedSize); @@ -143,14 +146,18 @@ // regardless of whether or not this stack aligns to baseline, we should let ASStackBaselinePositionedLayout::compute find the max ascender // and min descender in case this spec is a child in another spec that wants to align to a baseline. const auto baselinePositionedLayout = ASStackBaselinePositionedLayout::compute(positionedLayout, style, constrainedSize); - if (self.direction == ASStackLayoutDirectionVertical) { + { ASDN::MutexLocker l(__instanceLock__); - self.ascender = [[self.children firstObject] ascender]; - self.descender = [[self.children lastObject] descender]; - } else { - ASDN::MutexLocker l(__instanceLock__); - self.ascender = baselinePositionedLayout.ascender; - self.descender = baselinePositionedLayout.descender; + if (self.direction == ASStackLayoutDirectionVertical) { + if (stackChildren.size() > 0) { + self.ascender = stackChildren.front().ascender; + self.descender = stackChildren.back().descender; + } + + } else { + self.ascender = baselinePositionedLayout.ascender; + self.descender = baselinePositionedLayout.descender; + } } if (needsBaselinePass) { diff --git a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm index 516e79e721..86ca74908d 100644 --- a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm @@ -10,6 +10,7 @@ #import "ASStaticLayoutSpec.h" +#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASLayout.h" @@ -38,10 +39,8 @@ { CGSize maxConstrainedSize = CGSizeMake(constrainedSize.max.width, constrainedSize.max.height); - NSArray *children = self.children; - NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:children.count]; - - for (id child in children) { + NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:self.childrenMap.size()]; + for (id child in self) { CGPoint layoutPosition = child.layoutPosition; CGSize autoMaxSize = CGSizeMake(maxConstrainedSize.width - layoutPosition.x, maxConstrainedSize.height - layoutPosition.y); diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm index 5a3c88b784..05b6ad894d 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm @@ -44,7 +44,7 @@ void ASEnvironmentPerformBlockOnObjectAndChildren(id object, void block(object); - for (id child in [object children]) { + for (id child in object) { queue.push(child); } } diff --git a/AsyncDisplayKit/Private/ASLayoutSpec+Private.h b/AsyncDisplayKit/Private/ASLayoutSpec+Private.h new file mode 100644 index 0000000000..0ba0390ee8 --- /dev/null +++ b/AsyncDisplayKit/Private/ASLayoutSpec+Private.h @@ -0,0 +1,25 @@ +// +// ASLayoutSpec+Private.h +// AsyncDisplayKit +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// + +#import "ASLayoutSpec.h" + +#import +#import + +typedef std::map, std::less> ASChildrenMap; + +@interface ASLayoutSpec (Private) + +/* + * Inside ASDK the childrenMap property should be preferred over the children array to prevent unecessary boxing + */ +@property (nonatomic, assign, readonly) ASChildrenMap childrenMap; + +@end From e0ada479a0345275108e8f3f9e9405ebb8d12a9d Mon Sep 17 00:00:00 2001 From: gazreese Date: Fri, 29 Jul 2016 19:09:38 +0100 Subject: [PATCH 227/247] [ASVideoPlayerNode] Expose the UIActivityIndicatorViewStyle to clients (#1911) --- AsyncDisplayKit/ASVideoPlayerNode.h | 1 + AsyncDisplayKit/ASVideoPlayerNode.mm | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/AsyncDisplayKit/ASVideoPlayerNode.h b/AsyncDisplayKit/ASVideoPlayerNode.h index 0a7b36d324..1e8aead6d9 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.h +++ b/AsyncDisplayKit/ASVideoPlayerNode.h @@ -119,6 +119,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma mark - Spinner delegate methods - (UIColor *)videoPlayerNodeSpinnerTint:(ASVideoPlayerNode *)videoPlayer; +- (UIActivityIndicatorViewStyle)videoPlayerNodeSpinnerStyle:(ASVideoPlayerNode *)videoPlayer; #pragma mark - Playback button delegate methods - (UIColor *)videoPlayerNodePlaybackButtonTint:(ASVideoPlayerNode *)videoPlayer; diff --git a/AsyncDisplayKit/ASVideoPlayerNode.mm b/AsyncDisplayKit/ASVideoPlayerNode.mm index 30549c9288..4976c59a84 100644 --- a/AsyncDisplayKit/ASVideoPlayerNode.mm +++ b/AsyncDisplayKit/ASVideoPlayerNode.mm @@ -24,6 +24,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; unsigned int delegateNeededDefaultControls:1; unsigned int delegateCustomControls:1; unsigned int delegateSpinnerTintColor:1; + unsigned int delegateSpinnerStyle:1; unsigned int delegatePlaybackButtonTint:1; unsigned int delegateScrubberMaximumTrackTintColor:1; unsigned int delegateScrubberMinimumTrackTintColor:1; @@ -591,6 +592,10 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; spinnnerView.color = _defaultControlsColor; } + if (_delegateFlags.delegateSpinnerStyle) { + spinnnerView.activityIndicatorViewStyle = [_delegate videoPlayerNodeSpinnerStyle:strongSelf]; + } + return spinnnerView; }]; _spinnerNode.preferredFrameSize = CGSizeMake(44.0, 44.0); @@ -772,6 +777,7 @@ static void *ASVideoPlayerNodeContext = &ASVideoPlayerNodeContext; _delegateFlags.delegateNeededDefaultControls = [_delegate respondsToSelector:@selector(videoPlayerNodeNeededDefaultControls:)]; _delegateFlags.delegateCustomControls = [_delegate respondsToSelector:@selector(videoPlayerNodeCustomControls:)]; _delegateFlags.delegateSpinnerTintColor = [_delegate respondsToSelector:@selector(videoPlayerNodeSpinnerTint:)]; + _delegateFlags.delegateSpinnerStyle = [_delegate respondsToSelector:@selector(videoPlayerNodeSpinnerStyle:)]; _delegateFlags.delegateScrubberMaximumTrackTintColor = [_delegate respondsToSelector:@selector(videoPlayerNodeScrubberMaximumTrackTint:)]; _delegateFlags.delegateScrubberMinimumTrackTintColor = [_delegate respondsToSelector:@selector(videoPlayerNodeScrubberMinimumTrackTint:)]; _delegateFlags.delegateScrubberThumbTintColor = [_delegate respondsToSelector:@selector(videoPlayerNodeScrubberThumbTint:)]; From 965fe05c113f06cb346b7dee6aaa2e6da7fcd90b Mon Sep 17 00:00:00 2001 From: appleguy Date: Sat, 30 Jul 2016 18:04:08 -0700 Subject: [PATCH 228/247] [ASDisplayNode] Ensure that nil can never be returned from -measureWithSizeRange: (#2014) * [ASDisplayNode] Ensure that nil can never be returned from -measureWithSizeRange: This can happen in rare cases when multiple relayouts occur while a transition is being measured. * [ASDisplayNode] Use ternary operator style for nil check. --- AsyncDisplayKit/ASDisplayNode.mm | 6 +++++- AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index e4da5f697e..48810ac2f3 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -642,7 +642,8 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { ASDN::MutexLocker l(__instanceLock__); if (! [self shouldMeasureWithSizeRange:constrainedSize]) { - return _calculatedLayout; + ASDisplayNodeAssertNotNil(_calculatedLayout, @"-[ASDisplayNode measureWithSizeRange:] _layout should not be nil! %@", self); + return _calculatedLayout ? : [ASLayout layoutWithLayoutableObject:self constrainedSizeRange:constrainedSize size:CGSizeZero]; } [self cancelLayoutTransitionsInProgress]; @@ -659,6 +660,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) [self _completePendingLayoutTransition]; } + ASDisplayNodeAssertNotNil(newLayout, @"-[ASDisplayNode measureWithSizeRange:] newLayout should not be nil! %@", self); return newLayout; } @@ -2071,6 +2073,8 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) layoutSpec.isMutable = NO; ASLayout *layout = [layoutSpec measureWithSizeRange:constrainedSize]; + ASDisplayNodeAssertNotNil(layout, @"[ASLayoutSpec measureWithSizeRange:] should never return nil! %@, %@", self, layoutSpec); + // Make sure layoutableObject of the root layout is `self`, so that the flattened layout will be structurally correct. BOOL isFinalLayoutable = (layout.layoutableObject != self); if (isFinalLayoutable) { diff --git a/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm b/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm index 9e143ae139..e0026fcba9 100644 --- a/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm +++ b/AsyncDisplayKit/Private/ASStackUnpositionedLayout.mm @@ -28,7 +28,9 @@ static ASLayout *crossChildLayout(const id child, // stretched children will have a cross dimension of at least crossMin const CGFloat childCrossMin = alignItems == ASStackLayoutAlignItemsStretch ? crossMin : 0; const ASSizeRange childSizeRange = directionSizeRange(style.direction, stackMin, stackMax, childCrossMin, crossMax); - return [child measureWithSizeRange:childSizeRange]; + ASLayout *layout = [child measureWithSizeRange:childSizeRange]; + ASDisplayNodeCAssertNotNil(layout, @"ASLayout returned from measureWithSizeRange: must not be nil: %@", child); + return layout ? : [ASLayout layoutWithLayoutableObject:child constrainedSizeRange:childSizeRange size:CGSizeZero]; } /** From da674589c6a4f2967c0b0cb615debcb1124fba39 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 30 Jul 2016 18:14:58 -0700 Subject: [PATCH 229/247] [Cocoapods] Update podspec to version 1.9.90. --- AsyncDisplayKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit.podspec b/AsyncDisplayKit.podspec index bccf8ba945..2e0d09b989 100644 --- a/AsyncDisplayKit.podspec +++ b/AsyncDisplayKit.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |spec| spec.name = 'AsyncDisplayKit' - spec.version = '1.9.81' + spec.version = '1.9.90' spec.license = { :type => 'BSD' } spec.homepage = 'http://asyncdisplaykit.org' spec.authors = { 'Scott Goodson' => 'scottgoodson@gmail.com', 'Ryan Nystrom' => 'rnystrom@fb.com' } spec.summary = 'Smooth asynchronous user interfaces for iOS apps.' - spec.source = { :git => 'https://github.com/facebook/AsyncDisplayKit.git', :tag => '1.9.81' } + spec.source = { :git => 'https://github.com/facebook/AsyncDisplayKit.git', :tag => '1.9.90' } spec.documentation_url = 'http://asyncdisplaykit.org/appledoc/' From 26e23d541cfc064156799164bee0872bb895190d Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 30 Jul 2016 18:51:47 -0700 Subject: [PATCH 230/247] [Build] Update copy headers build phase with recently added header, remove extraneous .mm files. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index bd0a553ab7..b0fac5c217 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -434,6 +434,7 @@ DE4843DB1C93EAB100A1F33B /* ASLayoutTransition.mm in Sources */ = {isa = PBXBuildFile; fileRef = E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */; }; DE4843DC1C93EAC100A1F33B /* ASLayoutTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */; }; DE6EA3231C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */; }; + DE72E2AC1D4D90E000DDB258 /* ASLayoutSpec+Private.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */; }; DE84918D1C8FFF2B003D89E9 /* ASRunLoopQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 81EE384D1C8E94F000456208 /* ASRunLoopQueue.h */; settings = {ATTRIBUTES = (Public, ); }; }; DE84918E1C8FFF9F003D89E9 /* ASRunLoopQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */; }; DE8BEAC21C2DF3FC00D57C12 /* ASDelegateProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = DE8BEABF1C2DF3FC00D57C12 /* ASDelegateProxy.h */; }; @@ -494,7 +495,6 @@ F7CE6C391D2CDB3E00BE4C15 /* ASBasicImageDownloader.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 054963471A1EA066000F8E56 /* ASBasicImageDownloader.h */; }; F7CE6C3A1D2CDB3E00BE4C15 /* ASBatchContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 299DA1A71A828D2900162D41 /* ASBatchContext.h */; }; F7CE6C3B1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF41BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.h */; }; - F7CE6C3C1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF51BBB3D690087C538 /* ASCollectionViewFlowLayoutInspector.m */; }; F7CE6C3D1D2CDB3E00BE4C15 /* ASCollectionViewLayoutController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 205F0E1B1B373A2C007741D0 /* ASCollectionViewLayoutController.h */; }; F7CE6C3E1D2CDB3E00BE4C15 /* ASDealloc2MainObject.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 05A6D05819D0EB64002DD95E /* ASDealloc2MainObject.h */; }; F7CE6C3F1D2CDB3E00BE4C15 /* ASEnvironment.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 698548611CA9E025008A345F /* ASEnvironment.h */; }; @@ -570,17 +570,11 @@ F7CE6C851D2CDB5800BE4C15 /* NSIndexSet+ASHelpers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CC4981BA1D1C7F65004E13CC /* NSIndexSet+ASHelpers.h */; }; F7CE6C861D2CDB5800BE4C15 /* _ASDisplayViewAccessiblity.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 69CB62A91CB8165900024920 /* _ASDisplayViewAccessiblity.h */; }; F7CE6C871D2CDB5800BE4C15 /* ASDataController+Subclasses.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */; }; - F7CE6C881D2CDB5800BE4C15 /* ASIndexPath.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 430E7C8E1B4C23F100697A4C /* ASIndexPath.m */; }; - F7CE6C891D2CDB5800BE4C15 /* ASRunLoopQueue.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */; }; - F7CE6C8A1D2CDB5800BE4C15 /* ASWeakProxy.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 68B8A4E01CBDB958007E4543 /* ASWeakProxy.m */; }; F7CE6C8B1D2CDB5800BE4C15 /* ASCollectionDataController.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 251B8EF21BBB3D690087C538 /* ASCollectionDataController.h */; }; F7CE6C8C1D2CDB5800BE4C15 /* _ASCoreAnimationExtras.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A03195D050800B7D73C /* _ASCoreAnimationExtras.h */; }; F7CE6C8D1D2CDB5800BE4C15 /* _ASHierarchyChangeSet.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = AC026B6D1BD57DBF00BBC17E /* _ASHierarchyChangeSet.h */; }; - F7CE6C8E1D2CDB5800BE4C15 /* _ASPendingState.mm in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A06195D050800B7D73C /* _ASPendingState.mm */; }; F7CE6C8F1D2CDB5800BE4C15 /* _ASScopeTimer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A07195D050800B7D73C /* _ASScopeTimer.h */; }; F7CE6C901D2CDB5800BE4C15 /* _ASTransitionContext.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB55C25F1C6408D6004EDCF5 /* _ASTransitionContext.h */; }; - F7CE6C911D2CDB5800BE4C15 /* _ASTransitionContext.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = DB55C2601C6408D6004EDCF5 /* _ASTransitionContext.m */; }; - F7CE6C921D2CDB5800BE4C15 /* ASBatchFetching.m in CopyFiles */ = {isa = PBXBuildFile; fileRef = 044285061BAA63FE00D16268 /* ASBatchFetching.m */; }; F7CE6C941D2CDB5800BE4C15 /* ASDisplayNodeInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */; }; F7CE6C951D2CDB5800BE4C15 /* ASLayoutTransition.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */; }; F7CE6C961D2CDB5800BE4C15 /* ASEnvironmentInternal.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */; }; @@ -675,7 +669,6 @@ F7CE6C391D2CDB3E00BE4C15 /* ASBasicImageDownloader.h in CopyFiles */, F7CE6C3A1D2CDB3E00BE4C15 /* ASBatchContext.h in CopyFiles */, F7CE6C3B1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.h in CopyFiles */, - F7CE6C3C1D2CDB3E00BE4C15 /* ASCollectionViewFlowLayoutInspector.m in CopyFiles */, F7CE6C3D1D2CDB3E00BE4C15 /* ASCollectionViewLayoutController.h in CopyFiles */, F7CE6C3E1D2CDB3E00BE4C15 /* ASDealloc2MainObject.h in CopyFiles */, F7CE6C3F1D2CDB3E00BE4C15 /* ASEnvironment.h in CopyFiles */, @@ -712,6 +705,7 @@ F7CE6C611D2CDB3E00BE4C15 /* ASLayoutable.h in CopyFiles */, F7CE6C621D2CDB3E00BE4C15 /* ASLayoutablePrivate.h in CopyFiles */, F7CE6C631D2CDB3E00BE4C15 /* ASLayoutSpec.h in CopyFiles */, + DE72E2AC1D4D90E000DDB258 /* ASLayoutSpec+Private.h in CopyFiles */, F7CE6C641D2CDB3E00BE4C15 /* ASOverlayLayoutSpec.h in CopyFiles */, F7CE6C651D2CDB3E00BE4C15 /* ASRatioLayoutSpec.h in CopyFiles */, F7CE6C661D2CDB3E00BE4C15 /* ASRelativeLayoutSpec.h in CopyFiles */, @@ -748,20 +742,14 @@ F7CE6C851D2CDB5800BE4C15 /* NSIndexSet+ASHelpers.h in CopyFiles */, F7CE6C861D2CDB5800BE4C15 /* _ASDisplayViewAccessiblity.h in CopyFiles */, F7CE6C871D2CDB5800BE4C15 /* ASDataController+Subclasses.h in CopyFiles */, - F7CE6C881D2CDB5800BE4C15 /* ASIndexPath.m in CopyFiles */, F7CE6C451D2CDB3E00BE4C15 /* ASPINRemoteImageDownloader.h in CopyFiles */, - F7CE6C891D2CDB5800BE4C15 /* ASRunLoopQueue.mm in CopyFiles */, - F7CE6C8A1D2CDB5800BE4C15 /* ASWeakProxy.m in CopyFiles */, F7CE6C8B1D2CDB5800BE4C15 /* ASCollectionDataController.h in CopyFiles */, F7CE6C591D2CDB3E00BE4C15 /* UIView+ASConvenience.h in CopyFiles */, F7CE6C5A1D2CDB3E00BE4C15 /* ASTraitCollection.h in CopyFiles */, F7CE6C8C1D2CDB5800BE4C15 /* _ASCoreAnimationExtras.h in CopyFiles */, F7CE6C8D1D2CDB5800BE4C15 /* _ASHierarchyChangeSet.h in CopyFiles */, - F7CE6C8E1D2CDB5800BE4C15 /* _ASPendingState.mm in CopyFiles */, F7CE6C8F1D2CDB5800BE4C15 /* _ASScopeTimer.h in CopyFiles */, F7CE6C901D2CDB5800BE4C15 /* _ASTransitionContext.h in CopyFiles */, - F7CE6C911D2CDB5800BE4C15 /* _ASTransitionContext.m in CopyFiles */, - F7CE6C921D2CDB5800BE4C15 /* ASBatchFetching.m in CopyFiles */, F7CE6C941D2CDB5800BE4C15 /* ASDisplayNodeInternal.h in CopyFiles */, F7CE6C951D2CDB5800BE4C15 /* ASLayoutTransition.h in CopyFiles */, F7CE6C961D2CDB5800BE4C15 /* ASEnvironmentInternal.h in CopyFiles */, @@ -1500,7 +1488,7 @@ 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */, 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, - ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.mm */, + ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */, ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */, From 589efefcf2dd64a94de8ae44f48d8a8781796eae Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 30 Jul 2016 23:44:46 -0700 Subject: [PATCH 231/247] [ASDimension] Disable assertions for Percent values being between 0.0 and 1.0. This triggers on existing code that needs to be updated, but also there is some investigation needed as to whether it is a valid use case to have a >1.0 value in order to position greater-than-bounds elements. --- AsyncDisplayKit/Layout/ASDimension.mm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/Layout/ASDimension.mm b/AsyncDisplayKit/Layout/ASDimension.mm index cf58e1c517..d7309d7370 100644 --- a/AsyncDisplayKit/Layout/ASDimension.mm +++ b/AsyncDisplayKit/Layout/ASDimension.mm @@ -17,9 +17,11 @@ ASRelativeDimension const ASRelativeDimensionUnconstrained = {}; ASRelativeDimension ASRelativeDimensionMake(ASRelativeDimensionType type, CGFloat value) { - if (type == ASRelativeDimensionTypePoints) { ASDisplayNodeCAssertPositiveReal(@"Points", value); } - if (type == ASRelativeDimensionTypePercent) { - ASDisplayNodeCAssert( 0 <= value && value <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", value); + if (type == ASRelativeDimensionTypePoints) { + ASDisplayNodeCAssertPositiveReal(@"Points", value); + } else if (type == ASRelativeDimensionTypePercent) { + // TODO: Enable this assertion for 2.0. Check that there is no use case for using a larger value, e.g. to layout for a clipsToBounds = NO element. + // ASDisplayNodeCAssert( 0 <= value && value <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", value); } ASRelativeDimension dimension; dimension.type = type; dimension.value = value; return dimension; } @@ -32,7 +34,7 @@ ASRelativeDimension ASRelativeDimensionMakeWithPoints(CGFloat points) ASRelativeDimension ASRelativeDimensionMakeWithPercent(CGFloat percent) { - ASDisplayNodeCAssert( 0 <= percent && percent <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", percent); + // ASDisplayNodeCAssert( 0 <= percent && percent <= 1.0, @"ASRelativeDimension percent value (%f) must be between 0 and 1.", percent); return ASRelativeDimensionMake(ASRelativeDimensionTypePercent, percent); } From c797fdf23ae10689d0a9f32bb3c5a660ff2b6841 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Sun, 31 Jul 2016 18:29:38 -0700 Subject: [PATCH 232/247] Use children directly instead of fast enumeration of ASEnvironment object (#2015) --- AsyncDisplayKit/Private/ASEnvironmentInternal.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm index 05b6ad894d..5a3c88b784 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm @@ -44,7 +44,7 @@ void ASEnvironmentPerformBlockOnObjectAndChildren(id object, void block(object); - for (id child in object) { + for (id child in [object children]) { queue.push(child); } } From 735b4ebd0872483044d98a5d05b43324e76fc8d4 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sun, 31 Jul 2016 18:43:20 -0700 Subject: [PATCH 233/247] Revert "[ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK (#1937)" Something interesting going on here with ARC / Objective-C++ that we are investigating and will re-land. This reverts commit c90ed08d1073701e2c7f8a2677d460c140f05264. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 24 +++--- AsyncDisplayKit/ASDisplayNode.mm | 9 -- AsyncDisplayKit/ASViewController.mm | 3 +- AsyncDisplayKit/Details/ASEnvironment.h | 3 +- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 84 +++++-------------- AsyncDisplayKit/Layout/ASStackLayoutSpec.mm | 31 +++---- AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm | 7 +- .../Private/ASLayoutSpec+Private.h | 25 ------ 8 files changed, 48 insertions(+), 138 deletions(-) delete mode 100644 AsyncDisplayKit/Private/ASLayoutSpec+Private.h diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index b0fac5c217..e573a8c423 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -214,7 +214,6 @@ 69E1006F1CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69E100701CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69F10C871C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */; }; 7630FFA81C9E267E007A7C0E /* ASVideoNode.h in Headers */ = {isa = PBXBuildFile; fileRef = AEEC47DF1C20C2DD00EC1693 /* ASVideoNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D51C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D61C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m in Sources */ = {isa = PBXBuildFile; fileRef = 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */; }; @@ -966,7 +965,6 @@ 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASEnvironmentInternal.h; sourceTree = ""; }; 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASEnvironmentInternal.mm; sourceTree = ""; }; 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASRangeControllerUpdateRangeProtocol+Beta.h"; sourceTree = ""; }; - 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASLayoutSpec+Private.h"; sourceTree = ""; }; 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; path = AsyncDisplayKit.h; sourceTree = ""; }; 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AsyncDisplayKit+Debug.h"; sourceTree = ""; }; 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AsyncDisplayKit+Debug.m"; sourceTree = ""; }; @@ -1472,8 +1470,6 @@ 044285051BAA63FE00D16268 /* ASBatchFetching.h */, 044285061BAA63FE00D16268 /* ASBatchFetching.m */, 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */, - 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, - 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */, AEB7B0191C5962EA00662EF4 /* ASDefaultPlayButton.m */, 058D0A08195D050800B7D73C /* ASDisplayNode+AsyncDisplay.mm */, @@ -1482,17 +1478,16 @@ DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */, 058D0A0B195D050800B7D73C /* ASDisplayNode+UIViewBridge.mm */, 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */, - 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */, - 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */, - 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, - 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */, - 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, - ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, - ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, - 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */, - ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */, E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */, + 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */, + 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */, + 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */, + 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, + 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, + ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, + ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, + ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */, 0442850C1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm */, CC3B20811C3F76D600798563 /* ASPendingStateController.h */, @@ -1510,6 +1505,8 @@ CC3B20881C3F7A5400798563 /* ASWeakSet.m */, DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */, DBC452DA1C5BF64600B16017 /* NSArray+Diffing.m */, + 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, + 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, ); path = Private; sourceTree = ""; @@ -1743,7 +1740,6 @@ B350625B1B010F070018CF92 /* ASEqualityHelpers.h in Headers */, 680346941CE4052A0009FEB4 /* ASNavigationController.h in Headers */, B350621B1B010EFD0018CF92 /* ASFlowLayoutController.h in Headers */, - 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */, B350621D1B010EFD0018CF92 /* ASHighlightOverlayLayer.h in Headers */, C78F7E2B1BF7809800CDEAFC /* ASTableNode.h in Headers */, AC7A2C181BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */, diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 48810ac2f3..9dc3b2c2c3 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2958,15 +2958,6 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; } } -#pragma mark - NSFastEnumeration - -- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id __unsafe_unretained [])stackbuf - count:(NSUInteger)stackbufLength -{ - return [self.children countByEnumeratingWithState:state objects:stackbuf count:stackbufLength]; -} - ASEnvironmentLayoutOptionsForwarding ASEnvironmentLayoutExtensibilityForwarding diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index 9b355dd8e5..e754633ca0 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -289,7 +289,8 @@ ASVisibilityDepthImplementation; self.node.environmentState = environmentState; [self.node setNeedsLayout]; - for (id child in self.node) { + NSArray> *children = [self.node children]; + for (id child in children) { ASEnvironmentStatePropagateDown(child, environmentState.environmentTraitCollection); } } diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index 3717ae5d0d..4dad9fde9f 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -99,7 +99,7 @@ ASDISPLAYNODE_EXTERN_C_END * defined in an ASEnvironmentState up and down the ASEnvironment tree. To be able to define how merges of * States should happen, specific merge functions can be provided */ -@protocol ASEnvironment +@protocol ASEnvironment /// The environment collection of an object which class conforms to the ASEnvironment protocol - (ASEnvironmentState)environmentState; @@ -126,7 +126,6 @@ ASDISPLAYNODE_EXTERN_C_END /// sets a trait collection on this environment state. - (void)setEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection; - @end // ASCollection/TableNodes don't actually have ASCellNodes as subnodes. Because of this we can't rely on display trait diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index 848b8c3836..4c66b3c129 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -8,7 +8,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASLayoutSpec+Private.h" +#import "ASLayoutSpec.h" #import "ASAssert.h" #import "ASEnvironmentInternal.h" @@ -17,12 +17,16 @@ #import "ASThread.h" #import "ASTraitCollection.h" +#import +#import #import +typedef std::map, std::less> ASChildMap; + @interface ASLayoutSpec() { ASEnvironmentState _environmentState; ASDN::RecursiveMutex __instanceLock__; - ASChildrenMap _childrenMap; + ASChildMap _children; } @end @@ -31,7 +35,6 @@ // these dynamic properties all defined in ASLayoutOptionsPrivate.m @dynamic spacingAfter, spacingBefore, flexGrow, flexShrink, flexBasis, alignSelf, ascender, descender, sizeRange, layoutPosition, layoutableType; -@synthesize parent = _parent; @synthesize isFinalLayoutable = _isFinalLayoutable; - (instancetype)init @@ -102,10 +105,9 @@ return child; } -#pragma mark - Parent - - (void)setParent:(id)parent { + // FIXME: Locking should be evaluated here. _parent is not widely used yet, though. _parent = parent; if ([parent supportsUpwardPropagation]) { @@ -113,24 +115,17 @@ } } -- (id)parent -{ - return _parent; -} - -#pragma mark - Children - - (void)setChild:(id)child { ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); if (child) { id finalLayoutable = [self layoutableToAddFromLayoutable:child]; if (finalLayoutable) { - _childrenMap[0] = finalLayoutable; + _children[0] = finalLayoutable; [self propagateUpLayoutable:finalLayoutable]; } } else { - _childrenMap.erase(0); + _children.erase(0); } } @@ -139,9 +134,9 @@ ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); if (child) { id finalLayoutable = [self layoutableToAddFromLayoutable:child]; - _childrenMap[index] = finalLayoutable; + _children[index] = finalLayoutable; } else { - _childrenMap.erase(index); + _children.erase(index); } // TODO: Should we propagate up the layoutable at it could happen that multiple children will propagated up their // layout options and one child will overwrite values from another child @@ -152,69 +147,37 @@ { ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); - _childrenMap.clear(); + _children.clear(); NSUInteger i = 0; for (id child in children) { - _childrenMap[i] = [self layoutableToAddFromLayoutable:child]; + _children[i] = [self layoutableToAddFromLayoutable:child]; i += 1; } } - (id)childForIndex:(NSUInteger)index { - if (index < _childrenMap.size()) { - return _childrenMap[index]; + if (index < _children.size()) { + return _children[index]; } return nil; } - (id)child { - return _childrenMap[0]; + return _children[0]; } - (NSArray *)children { - // If used inside ASDK, the childrenMap property should be preferred over the children array to prevent unecessary - // boxing std::vector children; - for (auto const &entry : _childrenMap) { - children.push_back(entry.second); + for (ASChildMap::iterator it = _children.begin(); it != _children.end(); ++it ) { + children.push_back(it->second); } - + return [NSArray arrayWithObjects:&children[0] count:children.size()]; } -#pragma mark - NSFastEnumeration - -- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id __unsafe_unretained [])stackbuf - count:(NSUInteger)stackbufLength -{ - NSUInteger count = 0; - unsigned long countOfItemsAlreadyEnumerated = state->state; - - if (countOfItemsAlreadyEnumerated == 0) { - state->mutationsPtr = &state->extra[0]; - } - - if (countOfItemsAlreadyEnumerated < _childrenMap.size()) { - state->itemsPtr = stackbuf; - - while((countOfItemsAlreadyEnumerated < _childrenMap.size()) && (count < stackbufLength)) { - stackbuf[count] = _childrenMap[countOfItemsAlreadyEnumerated]; - countOfItemsAlreadyEnumerated++; - count++; - } - } else { - count = 0; - } - - state->state = countOfItemsAlreadyEnumerated; - - return count; -} - #pragma mark - ASEnvironment - (ASEnvironmentState)environmentState @@ -270,15 +233,6 @@ ASEnvironmentLayoutExtensibilityForwarding @end -@implementation ASLayoutSpec (Private) - -- (ASChildrenMap)childrenMap -{ - return _childrenMap; -} - -@end - @implementation ASLayoutSpec (Debugging) #pragma mark - ASLayoutableAsciiArtProtocol diff --git a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm index a6ab9d3fea..2393972a53 100644 --- a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm @@ -13,7 +13,6 @@ #import "ASInternalHelpers.h" -#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASStackBaselinePositionedLayout.h" #import "ASThread.h" @@ -59,7 +58,7 @@ _alignItems = alignItems; _justifyContent = justifyContent; - self.children = children; + [self setChildren:children]; return self; } @@ -121,9 +120,7 @@ - (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize { - auto const &children = self.childrenMap; - - if (children.size() == 0) { + if (self.children.count == 0) { return [ASLayout layoutWithLayoutableObject:self constrainedSizeRange:constrainedSize size:constrainedSize.min]; @@ -132,9 +129,9 @@ ASStackLayoutSpecStyle style = {.direction = _direction, .spacing = _spacing, .justifyContent = _justifyContent, .alignItems = _alignItems, .baselineRelativeArrangement = _baselineRelativeArrangement}; BOOL needsBaselinePass = _baselineRelativeArrangement || _alignItems == ASStackLayoutAlignItemsBaselineFirst || _alignItems == ASStackLayoutAlignItemsBaselineLast; - std::vector> stackChildren; - for (auto const &entry : children) { - stackChildren.push_back(entry.second); + std::vector> stackChildren = std::vector>(); + for (id child in self.children) { + stackChildren.push_back(child); } const auto unpositionedLayout = ASStackUnpositionedLayout::compute(stackChildren, style, constrainedSize); @@ -146,18 +143,14 @@ // regardless of whether or not this stack aligns to baseline, we should let ASStackBaselinePositionedLayout::compute find the max ascender // and min descender in case this spec is a child in another spec that wants to align to a baseline. const auto baselinePositionedLayout = ASStackBaselinePositionedLayout::compute(positionedLayout, style, constrainedSize); - { + if (self.direction == ASStackLayoutDirectionVertical) { ASDN::MutexLocker l(__instanceLock__); - if (self.direction == ASStackLayoutDirectionVertical) { - if (stackChildren.size() > 0) { - self.ascender = stackChildren.front().ascender; - self.descender = stackChildren.back().descender; - } - - } else { - self.ascender = baselinePositionedLayout.ascender; - self.descender = baselinePositionedLayout.descender; - } + self.ascender = [[self.children firstObject] ascender]; + self.descender = [[self.children lastObject] descender]; + } else { + ASDN::MutexLocker l(__instanceLock__); + self.ascender = baselinePositionedLayout.ascender; + self.descender = baselinePositionedLayout.descender; } if (needsBaselinePass) { diff --git a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm index 86ca74908d..516e79e721 100644 --- a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm @@ -10,7 +10,6 @@ #import "ASStaticLayoutSpec.h" -#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASLayout.h" @@ -39,8 +38,10 @@ { CGSize maxConstrainedSize = CGSizeMake(constrainedSize.max.width, constrainedSize.max.height); - NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:self.childrenMap.size()]; - for (id child in self) { + NSArray *children = self.children; + NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:children.count]; + + for (id child in children) { CGPoint layoutPosition = child.layoutPosition; CGSize autoMaxSize = CGSizeMake(maxConstrainedSize.width - layoutPosition.x, maxConstrainedSize.height - layoutPosition.y); diff --git a/AsyncDisplayKit/Private/ASLayoutSpec+Private.h b/AsyncDisplayKit/Private/ASLayoutSpec+Private.h deleted file mode 100644 index 0ba0390ee8..0000000000 --- a/AsyncDisplayKit/Private/ASLayoutSpec+Private.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// ASLayoutSpec+Private.h -// AsyncDisplayKit -// -// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -#import "ASLayoutSpec.h" - -#import -#import - -typedef std::map, std::less> ASChildrenMap; - -@interface ASLayoutSpec (Private) - -/* - * Inside ASDK the childrenMap property should be preferred over the children array to prevent unecessary boxing - */ -@property (nonatomic, assign, readonly) ASChildrenMap childrenMap; - -@end From 3a1a987dbeb7f955c9b7f7c511ea1ba5e58446a1 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 1 Aug 2016 09:44:02 -0700 Subject: [PATCH 234/247] Fix not propagating updating and propagating down the layout transition id if a subnode is added (#2018) If a node was added to a supernode, the supernode could be in a layout pending state. All of the hierarchy state properties related to the transition need to be copied over as well as propagated down the subtree. This is especially important as with Implicit Hierarchy Management adding subnodes can happen while a transition is in fly --- AsyncDisplayKit/ASDisplayNode.mm | 33 +++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 9dc3b2c2c3..0b56764e6e 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -1877,6 +1877,28 @@ static NSInteger incrementIfFound(NSInteger i) { } if (newSupernode) { [self enterHierarchyState:stateToEnterOrExit]; + + // If a node was added to a supernode, the supernode could be in a layout pending state. All of the hierarchy state + // properties related to the transition need to be copied over as well as propagated down the subtree. + // This is especially important as with Implicit Hierarchy Management adding subnodes can happen while a transition + // is in fly + if (ASHierarchyStateIncludesLayoutPending(stateToEnterOrExit)) { + int32_t pendingTransitionId = newSupernode.pendingTransitionID; + if (pendingTransitionId != ASLayoutableContextInvalidTransitionID) { + { + ASDN::MutexLocker l(__instanceLock__); + _pendingTransitionID = pendingTransitionId; + + // Propagate down the new pending transition id + ASDisplayNodePerformBlockOnEverySubnode(self, ^(ASDisplayNode * _Nonnull node) { + node.pendingTransitionID = _pendingTransitionID; + }); + } + } + } + + // Now that we have a supernode, propagate its traits to self. + ASEnvironmentStatePropagateDown(self, [newSupernode environmentTraitCollection]); } else { // If a node will be removed from the supernode it should go out from the layout pending state to remove all // layout pending state related properties on the node @@ -1884,11 +1906,6 @@ static NSInteger incrementIfFound(NSInteger i) { [self exitHierarchyState:stateToEnterOrExit]; } - - // now that we have a supernode, propagate its traits to self. - if (newSupernode != nil) { - ASEnvironmentStatePropagateDown(self, [newSupernode environmentTraitCollection]); - } } } @@ -2160,6 +2177,12 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) ASDisplayNodeAssertTrue(_pendingTransitionID < pendingTransitionID); _pendingTransitionID = pendingTransitionID; } + +- (int32_t)pendingTransitionID +{ + ASDN::MutexLocker l(__instanceLock__); + return _pendingTransitionID; +} - (void)setPreferredFrameSize:(CGSize)preferredFrameSize { From d5a7c195226925e483c74fb210120d15ff423378 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Mon, 1 Aug 2016 18:08:48 -0700 Subject: [PATCH 235/247] [ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK Part 2 (#2021) * Revert "Revert "[ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK (#1937)"" This reverts commit 735b4ebd0872483044d98a5d05b43324e76fc8d4. * Fix crash and add exception for mutating while using fast enumeration of ASLayoutSpec children NSFastEnumeration is potentially quite dangerous in the wrong hands. In particular, it does not provide a safe mechanism for you to return temporary objects directly, and it does not provide any guarantee that you will be called when the enumeration has completed; therefore if we generate temporaries and store them in an instance variable, we will not necessarily be able to clean them up! This means fast enumeration methods should never be called within an autorelease pool or the autorelease pool be drained within the fast enumeration loop. The reason is we store references to objects in the stackBuf struct by casting the child pointer to __autoreleasing id. If we pop the autorelease pool between calls to -countByEnumeratingWithState:objects:count:, it will die in a messy explosion of pointer dereferences and EXC_BAD_ACCESS. * Add tests for ASDisplayNode and ASLayoutSpec fast enumeration --- AsyncDisplayKit.xcodeproj/project.pbxproj | 14 ++- AsyncDisplayKit/ASDisplayNode.mm | 9 ++ AsyncDisplayKit/ASViewController.mm | 3 +- AsyncDisplayKit/Details/ASEnvironment.h | 3 +- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 103 +++++++++++++----- AsyncDisplayKit/Layout/ASStackLayoutSpec.mm | 31 ++++-- AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm | 7 +- .../Private/ASEnvironmentInternal.mm | 2 +- .../Private/ASLayoutSpec+Private.h | 25 +++++ AsyncDisplayKitTests/ASDisplayNodeTests.m | 18 +++ .../ASLayoutSpecSnapshotTestsHelper.m | 17 +++ 11 files changed, 180 insertions(+), 52 deletions(-) create mode 100644 AsyncDisplayKit/Private/ASLayoutSpec+Private.h diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index e573a8c423..b0fac5c217 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -214,6 +214,7 @@ 69E1006F1CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69E100701CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69F10C871C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */; }; 7630FFA81C9E267E007A7C0E /* ASVideoNode.h in Headers */ = {isa = PBXBuildFile; fileRef = AEEC47DF1C20C2DD00EC1693 /* ASVideoNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D51C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D61C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m in Sources */ = {isa = PBXBuildFile; fileRef = 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */; }; @@ -965,6 +966,7 @@ 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASEnvironmentInternal.h; sourceTree = ""; }; 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASEnvironmentInternal.mm; sourceTree = ""; }; 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASRangeControllerUpdateRangeProtocol+Beta.h"; sourceTree = ""; }; + 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASLayoutSpec+Private.h"; sourceTree = ""; }; 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; path = AsyncDisplayKit.h; sourceTree = ""; }; 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AsyncDisplayKit+Debug.h"; sourceTree = ""; }; 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AsyncDisplayKit+Debug.m"; sourceTree = ""; }; @@ -1470,6 +1472,8 @@ 044285051BAA63FE00D16268 /* ASBatchFetching.h */, 044285061BAA63FE00D16268 /* ASBatchFetching.m */, 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */, + 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, + 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */, AEB7B0191C5962EA00662EF4 /* ASDefaultPlayButton.m */, 058D0A08195D050800B7D73C /* ASDisplayNode+AsyncDisplay.mm */, @@ -1478,16 +1482,17 @@ DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */, 058D0A0B195D050800B7D73C /* ASDisplayNode+UIViewBridge.mm */, 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */, - E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */, - E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */, 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */, 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */, + 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */, 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, - 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, + 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */, ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, + E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */, + E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */, 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */, 0442850C1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm */, CC3B20811C3F76D600798563 /* ASPendingStateController.h */, @@ -1505,8 +1510,6 @@ CC3B20881C3F7A5400798563 /* ASWeakSet.m */, DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */, DBC452DA1C5BF64600B16017 /* NSArray+Diffing.m */, - 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, - 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, ); path = Private; sourceTree = ""; @@ -1740,6 +1743,7 @@ B350625B1B010F070018CF92 /* ASEqualityHelpers.h in Headers */, 680346941CE4052A0009FEB4 /* ASNavigationController.h in Headers */, B350621B1B010EFD0018CF92 /* ASFlowLayoutController.h in Headers */, + 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */, B350621D1B010EFD0018CF92 /* ASHighlightOverlayLayer.h in Headers */, C78F7E2B1BF7809800CDEAFC /* ASTableNode.h in Headers */, AC7A2C181BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */, diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 0b56764e6e..d875aabb5f 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2981,6 +2981,15 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; } } +#pragma mark - NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(id __unsafe_unretained [])stackbuf + count:(NSUInteger)stackbufLength +{ + return [self.children countByEnumeratingWithState:state objects:stackbuf count:stackbufLength]; +} + ASEnvironmentLayoutOptionsForwarding ASEnvironmentLayoutExtensibilityForwarding diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index e754633ca0..9b355dd8e5 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -289,8 +289,7 @@ ASVisibilityDepthImplementation; self.node.environmentState = environmentState; [self.node setNeedsLayout]; - NSArray> *children = [self.node children]; - for (id child in children) { + for (id child in self.node) { ASEnvironmentStatePropagateDown(child, environmentState.environmentTraitCollection); } } diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index 4dad9fde9f..3717ae5d0d 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -99,7 +99,7 @@ ASDISPLAYNODE_EXTERN_C_END * defined in an ASEnvironmentState up and down the ASEnvironment tree. To be able to define how merges of * States should happen, specific merge functions can be provided */ -@protocol ASEnvironment +@protocol ASEnvironment /// The environment collection of an object which class conforms to the ASEnvironment protocol - (ASEnvironmentState)environmentState; @@ -126,6 +126,7 @@ ASDISPLAYNODE_EXTERN_C_END /// sets a trait collection on this environment state. - (void)setEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection; + @end // ASCollection/TableNodes don't actually have ASCellNodes as subnodes. Because of this we can't rely on display trait diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index 4c66b3c129..18686178ac 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -8,7 +8,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASLayoutSpec.h" +#import "ASLayoutSpec+Private.h" #import "ASAssert.h" #import "ASEnvironmentInternal.h" @@ -17,16 +17,13 @@ #import "ASThread.h" #import "ASTraitCollection.h" -#import -#import #import -typedef std::map, std::less> ASChildMap; - @interface ASLayoutSpec() { ASEnvironmentState _environmentState; ASDN::RecursiveMutex __instanceLock__; - ASChildMap _children; + ASChildrenMap _childrenMap; + unsigned long _mutations; } @end @@ -35,6 +32,7 @@ typedef std::map, std::less> ASCh // these dynamic properties all defined in ASLayoutOptionsPrivate.m @dynamic spacingAfter, spacingBefore, flexGrow, flexShrink, flexBasis, alignSelf, ascender, descender, sizeRange, layoutPosition, layoutableType; +@synthesize parent = _parent; @synthesize isFinalLayoutable = _isFinalLayoutable; - (instancetype)init @@ -44,6 +42,7 @@ typedef std::map, std::less> ASCh } _isMutable = YES; _environmentState = ASEnvironmentStateMakeDefault(); + _mutations = 0; return self; } @@ -105,6 +104,8 @@ typedef std::map, std::less> ASCh return child; } +#pragma mark - Parent + - (void)setParent:(id)parent { // FIXME: Locking should be evaluated here. _parent is not widely used yet, though. @@ -115,18 +116,16 @@ typedef std::map, std::less> ASCh } } +- (id)parent +{ + return _parent; +} + +#pragma mark - Children + - (void)setChild:(id)child { - ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); - if (child) { - id finalLayoutable = [self layoutableToAddFromLayoutable:child]; - if (finalLayoutable) { - _children[0] = finalLayoutable; - [self propagateUpLayoutable:finalLayoutable]; - } - } else { - _children.erase(0); - } + [self setChild:child forIndex:0]; } - (void)setChild:(id)child forIndex:(NSUInteger)index @@ -134,11 +133,16 @@ typedef std::map, std::less> ASCh ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); if (child) { id finalLayoutable = [self layoutableToAddFromLayoutable:child]; - _children[index] = finalLayoutable; + if (finalLayoutable) { + _childrenMap[index] = finalLayoutable; + [self propagateUpLayoutable:finalLayoutable]; + } } else { - _children.erase(index); + _childrenMap.erase(index); } - // TODO: Should we propagate up the layoutable at it could happen that multiple children will propagated up their + _mutations++; + + // TODO: Should we propagate up the layoutable as it could happen that multiple children will propagated up their // layout options and one child will overwrite values from another child // [self propagateUpLayoutable:finalLayoutable]; } @@ -147,35 +151,71 @@ typedef std::map, std::less> ASCh { ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); - _children.clear(); + _childrenMap.clear(); NSUInteger i = 0; for (id child in children) { - _children[i] = [self layoutableToAddFromLayoutable:child]; + _childrenMap[i] = [self layoutableToAddFromLayoutable:child]; i += 1; + + _mutations++; } } - (id)childForIndex:(NSUInteger)index { - if (index < _children.size()) { - return _children[index]; + if (index < _childrenMap.size()) { + return _childrenMap[index]; } return nil; } - (id)child { - return _children[0]; + return _childrenMap[0]; } - (NSArray *)children { + // If used inside ASDK, the childrenMap property should be preferred over the children array to prevent + // unecessary boxing std::vector children; - for (ASChildMap::iterator it = _children.begin(); it != _children.end(); ++it ) { - children.push_back(it->second); + for (auto const &entry : _childrenMap) { + children.push_back(entry.second); + } + + return [NSArray arrayWithObjects:&children[0] count:children.size()]; +} + +#pragma mark - NSFastEnumeration + +- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state + objects:(id __unsafe_unretained [])stackbuf + count:(NSUInteger)stackbufLength +{ + NSUInteger count = 0; + unsigned long countOfItemsAlreadyEnumerated = state->state; + + if (countOfItemsAlreadyEnumerated == 0) { + state->mutationsPtr = &_mutations; + } + + if (countOfItemsAlreadyEnumerated < _childrenMap.size()) { + state->itemsPtr = stackbuf; + + while((countOfItemsAlreadyEnumerated < _childrenMap.size()) && (count < stackbufLength)) { + // Hold on for the object while enumerating + __autoreleasing id child = _childrenMap[countOfItemsAlreadyEnumerated]; + stackbuf[count] = child; + countOfItemsAlreadyEnumerated++; + count++; + } + } else { + count = 0; } - return [NSArray arrayWithObjects:&children[0] count:children.size()]; + state->state = countOfItemsAlreadyEnumerated; + + return count; } #pragma mark - ASEnvironment @@ -233,6 +273,15 @@ ASEnvironmentLayoutExtensibilityForwarding @end +@implementation ASLayoutSpec (Private) + +- (ASChildrenMap)childrenMap +{ + return _childrenMap; +} + +@end + @implementation ASLayoutSpec (Debugging) #pragma mark - ASLayoutableAsciiArtProtocol diff --git a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm index 2393972a53..a6ab9d3fea 100644 --- a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm @@ -13,6 +13,7 @@ #import "ASInternalHelpers.h" +#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASStackBaselinePositionedLayout.h" #import "ASThread.h" @@ -58,7 +59,7 @@ _alignItems = alignItems; _justifyContent = justifyContent; - [self setChildren:children]; + self.children = children; return self; } @@ -120,7 +121,9 @@ - (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize { - if (self.children.count == 0) { + auto const &children = self.childrenMap; + + if (children.size() == 0) { return [ASLayout layoutWithLayoutableObject:self constrainedSizeRange:constrainedSize size:constrainedSize.min]; @@ -129,9 +132,9 @@ ASStackLayoutSpecStyle style = {.direction = _direction, .spacing = _spacing, .justifyContent = _justifyContent, .alignItems = _alignItems, .baselineRelativeArrangement = _baselineRelativeArrangement}; BOOL needsBaselinePass = _baselineRelativeArrangement || _alignItems == ASStackLayoutAlignItemsBaselineFirst || _alignItems == ASStackLayoutAlignItemsBaselineLast; - std::vector> stackChildren = std::vector>(); - for (id child in self.children) { - stackChildren.push_back(child); + std::vector> stackChildren; + for (auto const &entry : children) { + stackChildren.push_back(entry.second); } const auto unpositionedLayout = ASStackUnpositionedLayout::compute(stackChildren, style, constrainedSize); @@ -143,14 +146,18 @@ // regardless of whether or not this stack aligns to baseline, we should let ASStackBaselinePositionedLayout::compute find the max ascender // and min descender in case this spec is a child in another spec that wants to align to a baseline. const auto baselinePositionedLayout = ASStackBaselinePositionedLayout::compute(positionedLayout, style, constrainedSize); - if (self.direction == ASStackLayoutDirectionVertical) { + { ASDN::MutexLocker l(__instanceLock__); - self.ascender = [[self.children firstObject] ascender]; - self.descender = [[self.children lastObject] descender]; - } else { - ASDN::MutexLocker l(__instanceLock__); - self.ascender = baselinePositionedLayout.ascender; - self.descender = baselinePositionedLayout.descender; + if (self.direction == ASStackLayoutDirectionVertical) { + if (stackChildren.size() > 0) { + self.ascender = stackChildren.front().ascender; + self.descender = stackChildren.back().descender; + } + + } else { + self.ascender = baselinePositionedLayout.ascender; + self.descender = baselinePositionedLayout.descender; + } } if (needsBaselinePass) { diff --git a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm index 516e79e721..86ca74908d 100644 --- a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm @@ -10,6 +10,7 @@ #import "ASStaticLayoutSpec.h" +#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASLayout.h" @@ -38,10 +39,8 @@ { CGSize maxConstrainedSize = CGSizeMake(constrainedSize.max.width, constrainedSize.max.height); - NSArray *children = self.children; - NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:children.count]; - - for (id child in children) { + NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:self.childrenMap.size()]; + for (id child in self) { CGPoint layoutPosition = child.layoutPosition; CGSize autoMaxSize = CGSizeMake(maxConstrainedSize.width - layoutPosition.x, maxConstrainedSize.height - layoutPosition.y); diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm index 5a3c88b784..05b6ad894d 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm @@ -44,7 +44,7 @@ void ASEnvironmentPerformBlockOnObjectAndChildren(id object, void block(object); - for (id child in [object children]) { + for (id child in object) { queue.push(child); } } diff --git a/AsyncDisplayKit/Private/ASLayoutSpec+Private.h b/AsyncDisplayKit/Private/ASLayoutSpec+Private.h new file mode 100644 index 0000000000..0ba0390ee8 --- /dev/null +++ b/AsyncDisplayKit/Private/ASLayoutSpec+Private.h @@ -0,0 +1,25 @@ +// +// ASLayoutSpec+Private.h +// AsyncDisplayKit +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// + +#import "ASLayoutSpec.h" + +#import +#import + +typedef std::map, std::less> ASChildrenMap; + +@interface ASLayoutSpec (Private) + +/* + * Inside ASDK the childrenMap property should be preferred over the children array to prevent unecessary boxing + */ +@property (nonatomic, assign, readonly) ASChildrenMap childrenMap; + +@end diff --git a/AsyncDisplayKitTests/ASDisplayNodeTests.m b/AsyncDisplayKitTests/ASDisplayNodeTests.m index 9be86b49de..88b96a665c 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeTests.m @@ -1723,6 +1723,24 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point XCTAssertEqual(1, view.subviews.count, @"View should have 1 subview"); } +- (void)testFastEnumeration +{ + ASDisplayNode *parent = [[ASDisplayNode alloc] init]; + + NSMutableArray *children = [NSMutableArray array]; + for (int i = 0; i < 100; i++) { + ASDisplayNode *child = [[[ASDisplayNode alloc] init] autorelease]; + [children addObject:child]; + [parent addSubnode:child]; + } + + NSInteger i = 0; + for (ASDisplayNode *child in parent) { + XCTAssertEqualObjects(child, children[i]); + i++; + } +} + - (void)checkBackgroundColorOpaqueRelationshipWithViewLoaded:(BOOL)loaded layerBacked:(BOOL)isLayerBacked { ASDisplayNode *node = [[ASDisplayNode alloc] init]; diff --git a/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m b/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m index bb182aa4a7..31801fb2b2 100644 --- a/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m +++ b/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m @@ -42,6 +42,23 @@ ASSnapshotVerifyNode(node, identifier); } +- (void)testFastEnumeration +{ + ASLayoutSpec *layoutSpec = [[ASLayoutSpec alloc] init]; + + NSMutableArray *children = [NSMutableArray array]; + for (int i = 0; i < 100; i++) { + [children addObject:[[ASDisplayNode alloc] init]]; + } + layoutSpec.children = children; + + NSInteger i = 0; + for (ASDisplayNode *child in layoutSpec) { + XCTAssertEqualObjects(child, children[i]); + i++; + } +} + @end @implementation ASTestNode From d5cbe33686f5d75d264c8dc7b4ba680da491c5bc Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Tue, 2 Aug 2016 10:10:36 -0700 Subject: [PATCH 236/247] Revert "[ASLayoutSpec] Use childrenMap directly to prevent creating an NSArray within ASDK Part 2 (#2021)" This reverts commit d5a7c195226925e483c74fb210120d15ff423378. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 24 ++-- AsyncDisplayKit/ASDisplayNode.mm | 9 -- AsyncDisplayKit/ASViewController.mm | 3 +- AsyncDisplayKit/Details/ASEnvironment.h | 3 +- AsyncDisplayKit/Layout/ASLayoutSpec.mm | 103 +++++------------- AsyncDisplayKit/Layout/ASStackLayoutSpec.mm | 31 ++---- AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm | 7 +- .../Private/ASEnvironmentInternal.mm | 2 +- .../Private/ASLayoutSpec+Private.h | 25 ----- AsyncDisplayKitTests/ASDisplayNodeTests.m | 18 --- .../ASLayoutSpecSnapshotTestsHelper.m | 17 --- 11 files changed, 57 insertions(+), 185 deletions(-) delete mode 100644 AsyncDisplayKit/Private/ASLayoutSpec+Private.h diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index b0fac5c217..e573a8c423 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -214,7 +214,6 @@ 69E1006F1CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69E100701CA89CB600D88C1B /* ASEnvironmentInternal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */; }; 69F10C871C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */; }; 7630FFA81C9E267E007A7C0E /* ASVideoNode.h in Headers */ = {isa = PBXBuildFile; fileRef = AEEC47DF1C20C2DD00EC1693 /* ASVideoNode.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D51C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h in Headers */ = {isa = PBXBuildFile; fileRef = 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */; settings = {ATTRIBUTES = (Public, ); }; }; 764D83D61C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m in Sources */ = {isa = PBXBuildFile; fileRef = 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */; }; @@ -966,7 +965,6 @@ 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASEnvironmentInternal.h; sourceTree = ""; }; 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASEnvironmentInternal.mm; sourceTree = ""; }; 69F10C851C84C35D0026140C /* ASRangeControllerUpdateRangeProtocol+Beta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASRangeControllerUpdateRangeProtocol+Beta.h"; sourceTree = ""; }; - 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ASLayoutSpec+Private.h"; sourceTree = ""; }; 6BDC61F51978FEA400E50D21 /* AsyncDisplayKit.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.c.h; path = AsyncDisplayKit.h; sourceTree = ""; }; 764D83D21C8EA515009B4FB8 /* AsyncDisplayKit+Debug.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "AsyncDisplayKit+Debug.h"; sourceTree = ""; }; 764D83D31C8EA515009B4FB8 /* AsyncDisplayKit+Debug.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "AsyncDisplayKit+Debug.m"; sourceTree = ""; }; @@ -1472,8 +1470,6 @@ 044285051BAA63FE00D16268 /* ASBatchFetching.h */, 044285061BAA63FE00D16268 /* ASBatchFetching.m */, 251B8EF61BBB3D690087C538 /* ASDataController+Subclasses.h */, - 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, - 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, AEB7B0181C5962EA00662EF4 /* ASDefaultPlayButton.h */, AEB7B0191C5962EA00662EF4 /* ASDefaultPlayButton.m */, 058D0A08195D050800B7D73C /* ASDisplayNode+AsyncDisplay.mm */, @@ -1482,17 +1478,16 @@ DE6EA3211C14000600183B10 /* ASDisplayNode+FrameworkPrivate.h */, 058D0A0B195D050800B7D73C /* ASDisplayNode+UIViewBridge.mm */, 058D0A0C195D050800B7D73C /* ASDisplayNodeInternal.h */, - 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */, - 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */, - 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, - 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */, - 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, - ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, - ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, - 69F6058C1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h */, - ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, E52405B41C8FEF16004DC8E7 /* ASLayoutTransition.h */, E52405B21C8FEF03004DC8E7 /* ASLayoutTransition.mm */, + 69E100691CA89CB600D88C1B /* ASEnvironmentInternal.h */, + 69E1006A1CA89CB600D88C1B /* ASEnvironmentInternal.mm */, + 058D0A0D195D050800B7D73C /* ASImageNode+CGExtras.h */, + 058D0A0E195D050800B7D73C /* ASImageNode+CGExtras.m */, + 68B8A4DB1CBD911D007E4543 /* ASImageNode+AnimatedImagePrivate.h */, + ACF6ED431B17847A00DA7C62 /* ASInternalHelpers.h */, + ACF6ED441B17847A00DA7C62 /* ASInternalHelpers.m */, + ACF6ED451B17847A00DA7C62 /* ASLayoutSpecUtilities.h */, 0442850B1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.h */, 0442850C1BAA64EC00D16268 /* ASMultidimensionalArrayUtils.mm */, CC3B20811C3F76D600798563 /* ASPendingStateController.h */, @@ -1510,6 +1505,8 @@ CC3B20881C3F7A5400798563 /* ASWeakSet.m */, DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */, DBC452DA1C5BF64600B16017 /* NSArray+Diffing.m */, + 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */, + 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */, ); path = Private; sourceTree = ""; @@ -1743,7 +1740,6 @@ B350625B1B010F070018CF92 /* ASEqualityHelpers.h in Headers */, 680346941CE4052A0009FEB4 /* ASNavigationController.h in Headers */, B350621B1B010EFD0018CF92 /* ASFlowLayoutController.h in Headers */, - 69F6058D1D3DA27E00C8CA38 /* ASLayoutSpec+Private.h in Headers */, B350621D1B010EFD0018CF92 /* ASHighlightOverlayLayer.h in Headers */, C78F7E2B1BF7809800CDEAFC /* ASTableNode.h in Headers */, AC7A2C181BDE11DF0093FE1A /* ASTableViewInternal.h in Headers */, diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index d875aabb5f..0b56764e6e 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2981,15 +2981,6 @@ static const char *ASDisplayNodeDrawingPriorityKey = "ASDrawingPriority"; } } -#pragma mark - NSFastEnumeration - -- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id __unsafe_unretained [])stackbuf - count:(NSUInteger)stackbufLength -{ - return [self.children countByEnumeratingWithState:state objects:stackbuf count:stackbufLength]; -} - ASEnvironmentLayoutOptionsForwarding ASEnvironmentLayoutExtensibilityForwarding diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index 9b355dd8e5..e754633ca0 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -289,7 +289,8 @@ ASVisibilityDepthImplementation; self.node.environmentState = environmentState; [self.node setNeedsLayout]; - for (id child in self.node) { + NSArray> *children = [self.node children]; + for (id child in children) { ASEnvironmentStatePropagateDown(child, environmentState.environmentTraitCollection); } } diff --git a/AsyncDisplayKit/Details/ASEnvironment.h b/AsyncDisplayKit/Details/ASEnvironment.h index 3717ae5d0d..4dad9fde9f 100644 --- a/AsyncDisplayKit/Details/ASEnvironment.h +++ b/AsyncDisplayKit/Details/ASEnvironment.h @@ -99,7 +99,7 @@ ASDISPLAYNODE_EXTERN_C_END * defined in an ASEnvironmentState up and down the ASEnvironment tree. To be able to define how merges of * States should happen, specific merge functions can be provided */ -@protocol ASEnvironment +@protocol ASEnvironment /// The environment collection of an object which class conforms to the ASEnvironment protocol - (ASEnvironmentState)environmentState; @@ -126,7 +126,6 @@ ASDISPLAYNODE_EXTERN_C_END /// sets a trait collection on this environment state. - (void)setEnvironmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection; - @end // ASCollection/TableNodes don't actually have ASCellNodes as subnodes. Because of this we can't rely on display trait diff --git a/AsyncDisplayKit/Layout/ASLayoutSpec.mm b/AsyncDisplayKit/Layout/ASLayoutSpec.mm index 18686178ac..4c66b3c129 100644 --- a/AsyncDisplayKit/Layout/ASLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASLayoutSpec.mm @@ -8,7 +8,7 @@ // of patent rights can be found in the PATENTS file in the same directory. // -#import "ASLayoutSpec+Private.h" +#import "ASLayoutSpec.h" #import "ASAssert.h" #import "ASEnvironmentInternal.h" @@ -17,13 +17,16 @@ #import "ASThread.h" #import "ASTraitCollection.h" +#import +#import #import +typedef std::map, std::less> ASChildMap; + @interface ASLayoutSpec() { ASEnvironmentState _environmentState; ASDN::RecursiveMutex __instanceLock__; - ASChildrenMap _childrenMap; - unsigned long _mutations; + ASChildMap _children; } @end @@ -32,7 +35,6 @@ // these dynamic properties all defined in ASLayoutOptionsPrivate.m @dynamic spacingAfter, spacingBefore, flexGrow, flexShrink, flexBasis, alignSelf, ascender, descender, sizeRange, layoutPosition, layoutableType; -@synthesize parent = _parent; @synthesize isFinalLayoutable = _isFinalLayoutable; - (instancetype)init @@ -42,7 +44,6 @@ } _isMutable = YES; _environmentState = ASEnvironmentStateMakeDefault(); - _mutations = 0; return self; } @@ -104,8 +105,6 @@ return child; } -#pragma mark - Parent - - (void)setParent:(id)parent { // FIXME: Locking should be evaluated here. _parent is not widely used yet, though. @@ -116,16 +115,18 @@ } } -- (id)parent -{ - return _parent; -} - -#pragma mark - Children - - (void)setChild:(id)child { - [self setChild:child forIndex:0]; + ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); + if (child) { + id finalLayoutable = [self layoutableToAddFromLayoutable:child]; + if (finalLayoutable) { + _children[0] = finalLayoutable; + [self propagateUpLayoutable:finalLayoutable]; + } + } else { + _children.erase(0); + } } - (void)setChild:(id)child forIndex:(NSUInteger)index @@ -133,16 +134,11 @@ ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); if (child) { id finalLayoutable = [self layoutableToAddFromLayoutable:child]; - if (finalLayoutable) { - _childrenMap[index] = finalLayoutable; - [self propagateUpLayoutable:finalLayoutable]; - } + _children[index] = finalLayoutable; } else { - _childrenMap.erase(index); + _children.erase(index); } - _mutations++; - - // TODO: Should we propagate up the layoutable as it could happen that multiple children will propagated up their + // TODO: Should we propagate up the layoutable at it could happen that multiple children will propagated up their // layout options and one child will overwrite values from another child // [self propagateUpLayoutable:finalLayoutable]; } @@ -151,73 +147,37 @@ { ASDisplayNodeAssert(self.isMutable, @"Cannot set properties when layout spec is not mutable"); - _childrenMap.clear(); + _children.clear(); NSUInteger i = 0; for (id child in children) { - _childrenMap[i] = [self layoutableToAddFromLayoutable:child]; + _children[i] = [self layoutableToAddFromLayoutable:child]; i += 1; - - _mutations++; } } - (id)childForIndex:(NSUInteger)index { - if (index < _childrenMap.size()) { - return _childrenMap[index]; + if (index < _children.size()) { + return _children[index]; } return nil; } - (id)child { - return _childrenMap[0]; + return _children[0]; } - (NSArray *)children { - // If used inside ASDK, the childrenMap property should be preferred over the children array to prevent - // unecessary boxing std::vector children; - for (auto const &entry : _childrenMap) { - children.push_back(entry.second); + for (ASChildMap::iterator it = _children.begin(); it != _children.end(); ++it ) { + children.push_back(it->second); } - + return [NSArray arrayWithObjects:&children[0] count:children.size()]; } -#pragma mark - NSFastEnumeration - -- (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state - objects:(id __unsafe_unretained [])stackbuf - count:(NSUInteger)stackbufLength -{ - NSUInteger count = 0; - unsigned long countOfItemsAlreadyEnumerated = state->state; - - if (countOfItemsAlreadyEnumerated == 0) { - state->mutationsPtr = &_mutations; - } - - if (countOfItemsAlreadyEnumerated < _childrenMap.size()) { - state->itemsPtr = stackbuf; - - while((countOfItemsAlreadyEnumerated < _childrenMap.size()) && (count < stackbufLength)) { - // Hold on for the object while enumerating - __autoreleasing id child = _childrenMap[countOfItemsAlreadyEnumerated]; - stackbuf[count] = child; - countOfItemsAlreadyEnumerated++; - count++; - } - } else { - count = 0; - } - - state->state = countOfItemsAlreadyEnumerated; - - return count; -} - #pragma mark - ASEnvironment - (ASEnvironmentState)environmentState @@ -273,15 +233,6 @@ ASEnvironmentLayoutExtensibilityForwarding @end -@implementation ASLayoutSpec (Private) - -- (ASChildrenMap)childrenMap -{ - return _childrenMap; -} - -@end - @implementation ASLayoutSpec (Debugging) #pragma mark - ASLayoutableAsciiArtProtocol diff --git a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm index a6ab9d3fea..2393972a53 100644 --- a/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStackLayoutSpec.mm @@ -13,7 +13,6 @@ #import "ASInternalHelpers.h" -#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASStackBaselinePositionedLayout.h" #import "ASThread.h" @@ -59,7 +58,7 @@ _alignItems = alignItems; _justifyContent = justifyContent; - self.children = children; + [self setChildren:children]; return self; } @@ -121,9 +120,7 @@ - (ASLayout *)measureWithSizeRange:(ASSizeRange)constrainedSize { - auto const &children = self.childrenMap; - - if (children.size() == 0) { + if (self.children.count == 0) { return [ASLayout layoutWithLayoutableObject:self constrainedSizeRange:constrainedSize size:constrainedSize.min]; @@ -132,9 +129,9 @@ ASStackLayoutSpecStyle style = {.direction = _direction, .spacing = _spacing, .justifyContent = _justifyContent, .alignItems = _alignItems, .baselineRelativeArrangement = _baselineRelativeArrangement}; BOOL needsBaselinePass = _baselineRelativeArrangement || _alignItems == ASStackLayoutAlignItemsBaselineFirst || _alignItems == ASStackLayoutAlignItemsBaselineLast; - std::vector> stackChildren; - for (auto const &entry : children) { - stackChildren.push_back(entry.second); + std::vector> stackChildren = std::vector>(); + for (id child in self.children) { + stackChildren.push_back(child); } const auto unpositionedLayout = ASStackUnpositionedLayout::compute(stackChildren, style, constrainedSize); @@ -146,18 +143,14 @@ // regardless of whether or not this stack aligns to baseline, we should let ASStackBaselinePositionedLayout::compute find the max ascender // and min descender in case this spec is a child in another spec that wants to align to a baseline. const auto baselinePositionedLayout = ASStackBaselinePositionedLayout::compute(positionedLayout, style, constrainedSize); - { + if (self.direction == ASStackLayoutDirectionVertical) { ASDN::MutexLocker l(__instanceLock__); - if (self.direction == ASStackLayoutDirectionVertical) { - if (stackChildren.size() > 0) { - self.ascender = stackChildren.front().ascender; - self.descender = stackChildren.back().descender; - } - - } else { - self.ascender = baselinePositionedLayout.ascender; - self.descender = baselinePositionedLayout.descender; - } + self.ascender = [[self.children firstObject] ascender]; + self.descender = [[self.children lastObject] descender]; + } else { + ASDN::MutexLocker l(__instanceLock__); + self.ascender = baselinePositionedLayout.ascender; + self.descender = baselinePositionedLayout.descender; } if (needsBaselinePass) { diff --git a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm index 86ca74908d..516e79e721 100644 --- a/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm +++ b/AsyncDisplayKit/Layout/ASStaticLayoutSpec.mm @@ -10,7 +10,6 @@ #import "ASStaticLayoutSpec.h" -#import "ASLayoutSpec+Private.h" #import "ASLayoutSpecUtilities.h" #import "ASLayout.h" @@ -39,8 +38,10 @@ { CGSize maxConstrainedSize = CGSizeMake(constrainedSize.max.width, constrainedSize.max.height); - NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:self.childrenMap.size()]; - for (id child in self) { + NSArray *children = self.children; + NSMutableArray *sublayouts = [NSMutableArray arrayWithCapacity:children.count]; + + for (id child in children) { CGPoint layoutPosition = child.layoutPosition; CGSize autoMaxSize = CGSizeMake(maxConstrainedSize.width - layoutPosition.x, maxConstrainedSize.height - layoutPosition.y); diff --git a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm index 05b6ad894d..5a3c88b784 100644 --- a/AsyncDisplayKit/Private/ASEnvironmentInternal.mm +++ b/AsyncDisplayKit/Private/ASEnvironmentInternal.mm @@ -44,7 +44,7 @@ void ASEnvironmentPerformBlockOnObjectAndChildren(id object, void block(object); - for (id child in object) { + for (id child in [object children]) { queue.push(child); } } diff --git a/AsyncDisplayKit/Private/ASLayoutSpec+Private.h b/AsyncDisplayKit/Private/ASLayoutSpec+Private.h deleted file mode 100644 index 0ba0390ee8..0000000000 --- a/AsyncDisplayKit/Private/ASLayoutSpec+Private.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// ASLayoutSpec+Private.h -// AsyncDisplayKit -// -// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. An additional grant -// of patent rights can be found in the PATENTS file in the same directory. -// - -#import "ASLayoutSpec.h" - -#import -#import - -typedef std::map, std::less> ASChildrenMap; - -@interface ASLayoutSpec (Private) - -/* - * Inside ASDK the childrenMap property should be preferred over the children array to prevent unecessary boxing - */ -@property (nonatomic, assign, readonly) ASChildrenMap childrenMap; - -@end diff --git a/AsyncDisplayKitTests/ASDisplayNodeTests.m b/AsyncDisplayKitTests/ASDisplayNodeTests.m index 88b96a665c..9be86b49de 100644 --- a/AsyncDisplayKitTests/ASDisplayNodeTests.m +++ b/AsyncDisplayKitTests/ASDisplayNodeTests.m @@ -1723,24 +1723,6 @@ static inline BOOL _CGPointEqualToPointWithEpsilon(CGPoint point1, CGPoint point XCTAssertEqual(1, view.subviews.count, @"View should have 1 subview"); } -- (void)testFastEnumeration -{ - ASDisplayNode *parent = [[ASDisplayNode alloc] init]; - - NSMutableArray *children = [NSMutableArray array]; - for (int i = 0; i < 100; i++) { - ASDisplayNode *child = [[[ASDisplayNode alloc] init] autorelease]; - [children addObject:child]; - [parent addSubnode:child]; - } - - NSInteger i = 0; - for (ASDisplayNode *child in parent) { - XCTAssertEqualObjects(child, children[i]); - i++; - } -} - - (void)checkBackgroundColorOpaqueRelationshipWithViewLoaded:(BOOL)loaded layerBacked:(BOOL)isLayerBacked { ASDisplayNode *node = [[ASDisplayNode alloc] init]; diff --git a/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m b/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m index 31801fb2b2..bb182aa4a7 100644 --- a/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m +++ b/AsyncDisplayKitTests/ASLayoutSpecSnapshotTestsHelper.m @@ -42,23 +42,6 @@ ASSnapshotVerifyNode(node, identifier); } -- (void)testFastEnumeration -{ - ASLayoutSpec *layoutSpec = [[ASLayoutSpec alloc] init]; - - NSMutableArray *children = [NSMutableArray array]; - for (int i = 0; i < 100; i++) { - [children addObject:[[ASDisplayNode alloc] init]]; - } - layoutSpec.children = children; - - NSInteger i = 0; - for (ASDisplayNode *child in layoutSpec) { - XCTAssertEqualObjects(child, children[i]); - i++; - } -} - @end @implementation ASTestNode From 36a1ac49970ca9e1e2a482065eb9121b76256a49 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Tue, 2 Aug 2016 22:58:56 -0700 Subject: [PATCH 237/247] [Cocoapods] Update PINCache dependency to include performance improvements Includes PINCache 3 beta (in latest PINRemoteImage release) --- AsyncDisplayKit.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit.podspec b/AsyncDisplayKit.podspec index 2e0d09b989..c48542d403 100644 --- a/AsyncDisplayKit.podspec +++ b/AsyncDisplayKit.podspec @@ -59,7 +59,7 @@ Pod::Spec.new do |spec| spec.subspec 'PINRemoteImage' do |pin| pin.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) PIN_REMOTE_IMAGE=1' } - pin.dependency 'PINRemoteImage/iOS', '>= 3.0.0-beta.2' + pin.dependency 'PINRemoteImage/iOS', '>= 3.0.0-beta.3' pin.dependency 'AsyncDisplayKit/Core' end From 76a81b2a57a7ee16dbe310e32950ce09a390c9c8 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Tue, 2 Aug 2016 23:01:02 -0700 Subject: [PATCH 238/247] [Cocoapods] Update PINCache dependency to include performance improvements Includes PINCache 3 beta (in latest PINRemoteImage release) AND Update master version number to 2.0-beta.1 ahead of API changes --- AsyncDisplayKit.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsyncDisplayKit.podspec b/AsyncDisplayKit.podspec index 2e0d09b989..bdcdb556ce 100644 --- a/AsyncDisplayKit.podspec +++ b/AsyncDisplayKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'AsyncDisplayKit' - spec.version = '1.9.90' + spec.version = '2.0-beta.1' spec.license = { :type => 'BSD' } spec.homepage = 'http://asyncdisplaykit.org' spec.authors = { 'Scott Goodson' => 'scottgoodson@gmail.com', 'Ryan Nystrom' => 'rnystrom@fb.com' } @@ -59,7 +59,7 @@ Pod::Spec.new do |spec| spec.subspec 'PINRemoteImage' do |pin| pin.xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) PIN_REMOTE_IMAGE=1' } - pin.dependency 'PINRemoteImage/iOS', '>= 3.0.0-beta.2' + pin.dependency 'PINRemoteImage/iOS', '>= 3.0.0-beta.3' pin.dependency 'AsyncDisplayKit/Core' end From c09db1cb17d9ff4a590f622d6b12497ee85a03dc Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Wed, 3 Aug 2016 13:10:50 -0700 Subject: [PATCH 239/247] ASImageNode backing store sharing for memory and CPU reduction (#1974) --- AsyncDisplayKit.xcodeproj/project.pbxproj | 14 ++ AsyncDisplayKit/ASImageNode.mm | 178 ++++++++++++++++++++-- AsyncDisplayKit/Private/ASWeakMap.h | 59 +++++++ AsyncDisplayKit/Private/ASWeakMap.m | 85 +++++++++++ AsyncDisplayKitTests/ASWeakMapTests.m | 57 +++++++ 5 files changed, 377 insertions(+), 16 deletions(-) create mode 100644 AsyncDisplayKit/Private/ASWeakMap.h create mode 100644 AsyncDisplayKit/Private/ASWeakMap.m create mode 100644 AsyncDisplayKitTests/ASWeakMapTests.m diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index e573a8c423..9cf13a4e4b 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -226,6 +226,10 @@ 8021EC1E1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */; }; 8021EC1F1D2B00B100799119 /* UIImage+ASConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */; }; 81EE38501C8E94F000456208 /* ASRunLoopQueue.mm in Sources */ = {isa = PBXBuildFile; fileRef = 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */; }; + 83A7D95A1D44542100BF333E /* ASWeakMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A7D9591D44542100BF333E /* ASWeakMap.m */; }; + 83A7D95B1D44547700BF333E /* ASWeakMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A7D9591D44542100BF333E /* ASWeakMap.m */; }; + 83A7D95C1D44548100BF333E /* ASWeakMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 83A7D9581D44542100BF333E /* ASWeakMap.h */; }; + 83A7D95E1D446A6E00BF333E /* ASWeakMapTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 83A7D95D1D446A6E00BF333E /* ASWeakMapTests.m */; }; 8B0768B41CE752EC002E1453 /* ASDefaultPlaybackButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */; }; 8BBBAB8C1CEBAF1700107FC6 /* ASDefaultPlaybackButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */; }; 8BBBAB8D1CEBAF1E00107FC6 /* ASDefaultPlaybackButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */; }; @@ -975,6 +979,9 @@ 8021EC1B1D2B00B100799119 /* UIImage+ASConvenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ASConvenience.m"; sourceTree = ""; }; 81EE384D1C8E94F000456208 /* ASRunLoopQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ASRunLoopQueue.h; path = ../ASRunLoopQueue.h; sourceTree = ""; }; 81EE384E1C8E94F000456208 /* ASRunLoopQueue.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASRunLoopQueue.mm; path = ../ASRunLoopQueue.mm; sourceTree = ""; }; + 83A7D9581D44542100BF333E /* ASWeakMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASWeakMap.h; sourceTree = ""; }; + 83A7D9591D44542100BF333E /* ASWeakMap.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASWeakMap.m; sourceTree = ""; }; + 83A7D95D1D446A6E00BF333E /* ASWeakMapTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASWeakMapTests.m; sourceTree = ""; }; 8B0768B11CE752EC002E1453 /* ASDefaultPlaybackButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASDefaultPlaybackButton.h; sourceTree = ""; }; 8B0768B21CE752EC002E1453 /* ASDefaultPlaybackButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASDefaultPlaybackButton.m; sourceTree = ""; }; 8BDA5FC31CDBDDE1007D13B2 /* ASVideoPlayerNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASVideoPlayerNode.h; sourceTree = ""; }; @@ -1313,6 +1320,7 @@ 058D09C5195D04C000B7D73C /* AsyncDisplayKitTests */ = { isa = PBXGroup; children = ( + 83A7D95D1D446A6E00BF333E /* ASWeakMapTests.m */, DBC453211C5FD97200B16017 /* ASDisplayNodeImplicitHierarchyTests.m */, DBC452DD1C5C6A6A00B16017 /* ArrayDiffingTests.m */, CC3B208F1C3F892D00798563 /* ASBridgedPropertiesTests.mm */, @@ -1501,6 +1509,8 @@ ACF6ED481B17847A00DA7C62 /* ASStackPositionedLayout.mm */, ACF6ED491B17847A00DA7C62 /* ASStackUnpositionedLayout.h */, ACF6ED4A1B17847A00DA7C62 /* ASStackUnpositionedLayout.mm */, + 83A7D9581D44542100BF333E /* ASWeakMap.h */, + 83A7D9591D44542100BF333E /* ASWeakMap.m */, CC3B20871C3F7A5400798563 /* ASWeakSet.h */, CC3B20881C3F7A5400798563 /* ASWeakSet.m */, DBC452D91C5BF64600B16017 /* NSArray+Diffing.h */, @@ -1782,6 +1792,7 @@ DB55C2671C641AE4004EDCF5 /* ASContextTransitioning.h in Headers */, 68B0277B1C1A79D60041016B /* ASDisplayNode+Beta.h in Headers */, CCF18FF41D2575E300DF5895 /* NSIndexSet+ASHelpers.h in Headers */, + 83A7D95C1D44548100BF333E /* ASWeakMap.h in Headers */, B350622D1B010EFD0018CF92 /* ASScrollDirection.h in Headers */, 254C6B751BF94DF4003EC431 /* ASTextKitComponents.h in Headers */, B35062081B010EFD0018CF92 /* ASScrollNode.h in Headers */, @@ -2128,6 +2139,7 @@ 697C0DE51CF38F28001DE0D4 /* ASLayoutValidation.mm in Sources */, ACF6ED501B17847A00DA7C62 /* ASStackPositionedLayout.mm in Sources */, ACF6ED521B17847A00DA7C62 /* ASStackUnpositionedLayout.mm in Sources */, + 83A7D95A1D44542100BF333E /* ASWeakMap.m in Sources */, 257754A61BEE44CD00737CA5 /* ASTextKitAttributes.mm in Sources */, 81EE38501C8E94F000456208 /* ASRunLoopQueue.mm in Sources */, 9C70F2041CDA4EFA007D6C76 /* ASTraitCollection.m in Sources */, @@ -2168,6 +2180,7 @@ 058D0A3A195D057000B7D73C /* ASDisplayNodeTests.m in Sources */, CC4981B31D1A02BE004E13CC /* ASTableViewThrashTests.m in Sources */, 058D0A3B195D057000B7D73C /* ASDisplayNodeTestsHelper.m in Sources */, + 83A7D95E1D446A6E00BF333E /* ASWeakMapTests.m in Sources */, 056D21551ABCEF50001107EF /* ASImageNodeSnapshotTests.m in Sources */, AC026B581BD3F61800BBC17E /* ASStaticLayoutSpecSnapshotTests.m in Sources */, ACF6ED5E1B178DC700DA7C62 /* ASInsetLayoutSpecSnapshotTests.mm in Sources */, @@ -2296,6 +2309,7 @@ 7AB338661C55B3420055FDE8 /* ASRelativeLayoutSpec.mm in Sources */, 697C0DE61CF38F28001DE0D4 /* ASLayoutValidation.mm in Sources */, 9C70F2051CDA4F06007D6C76 /* ASTraitCollection.m in Sources */, + 83A7D95B1D44547700BF333E /* ASWeakMap.m in Sources */, 34EFC7781B701D3100AD841F /* ASStackUnpositionedLayout.mm in Sources */, DE84918E1C8FFF9F003D89E9 /* ASRunLoopQueue.mm in Sources */, 68FC85E51CE29B7E00EDD713 /* ASTabBarController.m in Sources */, diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index 73691bcde9..d85a347ec5 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -24,6 +24,10 @@ #import "ASInternalHelpers.h" #import "ASEqualityHelpers.h" +#import "ASEqualityHashHelpers.h" +#import "ASWeakMap.h" + +#include struct ASImageNodeDrawParameters { BOOL opaque; @@ -38,10 +42,81 @@ struct ASImageNodeDrawParameters { asimagenode_modification_block_t imageModificationBlock; }; +/** + * Contains all data that is needed to generate the content bitmap. + */ +@interface ASImageNodeContentsKey : NSObject {} + +@property (nonatomic, strong) UIImage *image; +@property CGSize backingSize; +@property CGRect imageDrawRect; +@property BOOL isOpaque; +@property (nonatomic, strong) UIColor *backgroundColor; +@property ASDisplayNodeContextModifier preContextBlock; +@property ASDisplayNodeContextModifier postContextBlock; +@property asimagenode_modification_block_t imageModificationBlock; + +@end + +@implementation ASImageNodeContentsKey + +- (BOOL)isEqual:(id)object +{ + if (self == object) { + return YES; + } + + // Optimization opportunity: The `isKindOfClass` call here could be avoided by not using the NSObject `isEqual:` + // convention and instead using a custom comparison function that assumes all items are heterogeneous. + // However, profiling shows that our entire `isKindOfClass` expression is only ~1/40th of the total + // overheard of our caching, so it's likely not high-impact. + if ([object isKindOfClass:[ASImageNodeContentsKey class]]) { + ASImageNodeContentsKey *other = (ASImageNodeContentsKey *)object; + return [_image isEqual:other.image] + && CGSizeEqualToSize(_backingSize, other.backingSize) + && CGRectEqualToRect(_imageDrawRect, other.imageDrawRect) + && _isOpaque == other.isOpaque + && [_backgroundColor isEqual:other.backgroundColor] + && _preContextBlock == other.preContextBlock + && _postContextBlock == other.postContextBlock + && _imageModificationBlock == other.imageModificationBlock; + } else { + return NO; + } +} + +- (NSUInteger)hash +{ + NSUInteger subhashes[] = { + // Profiling shows that the work done in UIImage's `hash` is on the order of 0.005ms on an A5 processor + // and isn't proportional to the size of the image. + [_image hash], + + // TODO: Hashing the floats in a CGRect or CGSize is tricky. Equality of floats is + // fuzzy, but it's a 100% requirement that two equal values must produce an identical hash value. + // Until there's a robust solution for hashing floats, leave all float values out of the hash. + // This may lead to a greater number of isEqual comparisons but does not comprimise correctness. + //AS::hash()(_backingSize), + //AS::hash()(_imageDrawRect), + + AS::hash()(_isOpaque), + [_backgroundColor hash], + AS::hash()((void*)_preContextBlock), + AS::hash()((void*)_postContextBlock), + AS::hash()((void*)_imageModificationBlock), + }; + return ASIntegerArrayHash(subhashes, sizeof(subhashes) / sizeof(subhashes[0])); +} + +@end + + @implementation ASImageNode { @private UIImage *_image; + ASWeakMapEntry *_weakCacheEntry; // Holds a reference that keeps our contents in cache. + void (^_displayCompletionBlock)(BOOL canceled); @@ -295,25 +370,85 @@ struct ASImageNodeDrawParameters { imageDrawRect.size.width <= 0.0f || imageDrawRect.size.height <= 0.0f) { return nil; } - + + ASImageNodeContentsKey *contentsKey = [[ASImageNodeContentsKey alloc] init]; + contentsKey.image = image; + contentsKey.backingSize = backingSize; + contentsKey.imageDrawRect = imageDrawRect; + contentsKey.isOpaque = isOpaque; + contentsKey.backgroundColor = backgroundColor; + contentsKey.preContextBlock = preContextBlock; + contentsKey.postContextBlock = postContextBlock; + contentsKey.imageModificationBlock = imageModificationBlock; + + if (isCancelled()) { + return nil; + } + + ASWeakMapEntry *entry = [self.class contentsForkey:contentsKey isCancelled:(asdisplaynode_iscancelled_block_t)isCancelled]; + if (entry == nil) { // If nil, we were cancelled. + return nil; + } + _weakCacheEntry = entry; // Retain so that the entry remains in the weak cache + return entry.value; +} + +static ASWeakMap *cache = nil; +static ASDN::Mutex cacheLock; + ++ (ASWeakMapEntry *)contentsForkey:(ASImageNodeContentsKey *)key isCancelled:(asdisplaynode_iscancelled_block_t)isCancelled +{ + { + ASDN::MutexLocker l(cacheLock); + if (!cache) { + cache = [[ASWeakMap alloc] init]; + } + ASWeakMapEntry *entry = [cache entryForKey:key]; + if (entry != nil) { + // cache hit + return entry; + } + } + + // cache miss + UIImage *contents = [self createContentsForkey:key isCancelled:isCancelled]; + if (contents == nil) { // If nil, we were cancelled + return nil; + } + + { + ASDN::MutexLocker l(cacheLock); + return [cache setObject:contents forKey:key]; + } +} + ++ (UIImage *)createContentsForkey:(ASImageNodeContentsKey *)key isCancelled:(asdisplaynode_iscancelled_block_t)isCancelled +{ + // The following `UIGraphicsBeginImageContextWithOptions` call will sometimes take take longer than 5ms on an + // A5 processor for a 400x800 backingSize. + // Check for cancellation before we call it. + if (isCancelled()) { + return nil; + } + // Use contentsScale of 1.0 and do the contentsScale handling in boundsSizeInPixels so ASCroppedImageBackingSizeAndDrawRectInBounds // will do its rounding on pixel instead of point boundaries - UIGraphicsBeginImageContextWithOptions(backingSize, isOpaque, 1.0); + UIGraphicsBeginImageContextWithOptions(key.backingSize, key.isOpaque, 1.0); CGContextRef context = UIGraphicsGetCurrentContext(); - if (context && preContextBlock) { - preContextBlock(context); + if (context && key.preContextBlock) { + key.preContextBlock(context); } // if view is opaque, fill the context with background color - if (isOpaque && backgroundColor) { - [backgroundColor setFill]; - UIRectFill({ .size = backingSize }); + if (key.isOpaque && key.backgroundColor) { + [key.backgroundColor setFill]; + UIRectFill({ .size = key.backingSize }); } // iOS 9 appears to contain a thread safety regression when drawing the same CGImageRef on // multiple threads concurrently. In fact, instead of crashing, it appears to deadlock. - // The issue is present in Mac OS X El Capitan and has been seen hanging Pro apps like Adobe Premier, + // The issue is present in Mac OS X El Capitan and has been seen hanging Pro apps like Adobe Premiere, // as well as iOS games, and a small number of ASDK apps that provide the same image reference // to many separate ASImageNodes. A workaround is to set .displaysAsynchronously = NO for the nodes // that may get the same pointer for a given UI asset image, etc. @@ -323,25 +458,27 @@ struct ASImageNodeDrawParameters { // Another option is to have ASDisplayNode+AsyncDisplay coordinate these cases, and share the decoded buffer. // Details tracked in https://github.com/facebook/AsyncDisplayKit/issues/1068 - @synchronized(image) { - [image drawInRect:imageDrawRect]; + @synchronized(key.image) { + [key.image drawInRect:key.imageDrawRect]; } - if (context && postContextBlock) { - postContextBlock(context); + if (context && key.postContextBlock) { + key.postContextBlock(context); } - + + // The following `UIGraphicsGetImageFromCurrentImageContext` call will commonly take more than 20ms on an + // A5 processor. Check for cancellation before we call it. if (isCancelled()) { UIGraphicsEndImageContext(); return nil; } - + UIImage *result = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); - if (imageModificationBlock != NULL) { - result = imageModificationBlock(result); + if (key.imageModificationBlock != NULL) { + result = key.imageModificationBlock(result); } return result; @@ -384,6 +521,15 @@ struct ASImageNodeDrawParameters { [self setNeedsDisplay]; } +#pragma mark Interface State + +- (void)clearContents +{ + [super clearContents]; + + _weakCacheEntry = nil; // release contents from the cache. +} + #pragma mark - Cropping - (BOOL)isCropEnabled diff --git a/AsyncDisplayKit/Private/ASWeakMap.h b/AsyncDisplayKit/Private/ASWeakMap.h new file mode 100644 index 0000000000..ead428040b --- /dev/null +++ b/AsyncDisplayKit/Private/ASWeakMap.h @@ -0,0 +1,59 @@ +// +// ASWeakMap.h +// AsyncDisplayKit +// +// Created by Chris Danford on 7/11/16. +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + + +/** + * This class is used in conjunction with ASWeakMap. Instances of this type are returned by an ASWeakMap, + * must retain this value for as long as they want the entry to exist in the map. + */ +@interface ASWeakMapEntry : NSObject + +@property (nonatomic, retain, readonly) Value value; + +@end + + +/** + * This is not a full-featured map. It does not support features like `count` and FastEnumeration because there + * is not currently a need. + * + * This is a map that does not retain keys or values added to it. When both getting and setting, the caller is + * returned a ASWeakMapEntry and must retain it for as long as it wishes the key/value to remain in the map. + * We return a single Entry value to the caller to avoid two potential problems: + * + * 1) It's easier for callers to retain one value (the Entry) and not two (a key and a value). + * 2) Key values are tested for `isEqual` equality. If if a caller asks for a key "A" that is equal to a key "B" + * already in the map, then we need the caller to retain key "B" and not key "A". Returning an Entry simplifies + * the semantics. + * + * The underlying storage is a hash table and the Key type should implement `hash` and `isEqual:`. + */ +@interface ASWeakMap<__covariant Key : NSObject *, Value> : NSObject + +/** + * Read from the cache. The Value object is accessible from the returned ASWeakMapEntry. + */ +- (nullable ASWeakMapEntry *)entryForKey:(Key)key; + +/** + * Put a value into the cache. If an entry with an equal key already exists, then the value is updated on the existing entry. + */ +- (ASWeakMapEntry *)setObject:(Value)value forKey:(Key)key; + +@end + + +NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Private/ASWeakMap.m b/AsyncDisplayKit/Private/ASWeakMap.m new file mode 100644 index 0000000000..1c9f6896c9 --- /dev/null +++ b/AsyncDisplayKit/Private/ASWeakMap.m @@ -0,0 +1,85 @@ +// +// ASWeakMap.m +// AsyncDisplayKit +// +// Created by Chris Danford on 7/11/16. +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// + +#import "ASWeakMap.h" + +@interface ASWeakMapEntry () +@property (nonatomic, strong) NSObject *key; +@end + +@implementation ASWeakMapEntry + +- (instancetype)initWithKey:(NSObject *)key value:(NSObject *)value +{ + self = [super init]; + if (self) { + _key = key; + _value = value; + } + return self; +} + +- (void)setValue:(NSObject *)value +{ + _value = value; +} + +@end + + +@interface ASWeakMap () +@property (nonatomic, strong) NSMapTable *hashTable; +@end + +/** + * Implementation details: + * + * The retained size of our keys is potentially very large (for example, a UIImage is commonly part of a key). + * Unfortunately, NSMapTable does not make guarantees about how quickly it will dispose of entries where + * either the key or the value is weak and has been disposed. So, a NSMapTable with "strong key to weak value" is + * unsuitable for our purpose because the strong keys are retained longer than the value and for an indefininte period of time. + * More details here: http://cocoamine.net/blog/2013/12/13/nsmaptable-and-zeroing-weak-references/ + * + * Our NSMapTable is "weak key to weak value" where each key maps to an Entry. The Entry object is responsible + * for retaining both the key and value. Our convention is that the caller must retain the Entry object + * in order to keep the key and the value in the cache. + */ +@implementation ASWeakMap + +- (instancetype)init +{ + self = [super init]; + if (self) { + _hashTable = [NSMapTable weakToWeakObjectsMapTable]; + } + return self; +} + +- (ASWeakMapEntry *)entryForKey:(NSObject *)key +{ + return [self.hashTable objectForKey:key]; +} + +- (ASWeakMapEntry *)setObject:(NSObject *)value forKey:(NSObject *)key +{ + ASWeakMapEntry *entry = [self.hashTable objectForKey:key]; + if (entry != nil) { + // Update the value in the existing entry. + entry.value = value; + } else { + entry = [[ASWeakMapEntry alloc] initWithKey:key value:value]; + [self.hashTable setObject:entry forKey:key]; + } + return entry; +} + +@end diff --git a/AsyncDisplayKitTests/ASWeakMapTests.m b/AsyncDisplayKitTests/ASWeakMapTests.m new file mode 100644 index 0000000000..9f49457797 --- /dev/null +++ b/AsyncDisplayKitTests/ASWeakMapTests.m @@ -0,0 +1,57 @@ +// +// ASWeakMapTests.m +// AsyncDisplayKit +// +// Created by Chris Danford on 7/23/16. +// +// Copyright (c) 2014-present, Facebook, Inc. All rights reserved. +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. An additional grant +// of patent rights can be found in the PATENTS file in the same directory. +// + +#import +#import "ASWeakMap.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface ASWeakMapTests : XCTestCase + +@end + +@implementation ASWeakMapTests + +- (void)testKeyAndValueAreReleasedWhenEntryIsReleased +{ + ASWeakMap *weakMap = [[ASWeakMap alloc] init]; + + __weak NSObject *weakKey; + __weak NSObject *weakValue; + @autoreleasepool { + NSObject *key = [[NSObject alloc] init]; + NSObject *value = [[NSObject alloc] init]; + ASWeakMapEntry *entry = [weakMap setObject:value forKey:key]; + XCTAssertEqual([weakMap entryForKey:key], entry); + + weakKey = key; + weakValue = value; +} + XCTAssertEqual(weakKey, nil); + XCTAssertEqual(weakValue, nil); +} + +- (void)testKeyEquality +{ + ASWeakMap *weakMap = [[ASWeakMap alloc] init]; + NSString *keyA = @"key"; + NSString *keyB = [keyA copy]; // `isEqual` but not pointer equal + NSObject *value = [[NSObject alloc] init]; + + ASWeakMapEntry *entryA = [weakMap setObject:value forKey:keyA]; + ASWeakMapEntry *entryB = [weakMap entryForKey:keyB]; + XCTAssertEqual(entryA, entryB); +} + +@end + +NS_ASSUME_NONNULL_END From f3c8fd8d62acffe630ab98f952ec143c26589286 Mon Sep 17 00:00:00 2001 From: Garrett Moon Date: Wed, 3 Aug 2016 13:27:45 -0700 Subject: [PATCH 240/247] =?UTF-8?q?Because=20Pods=20and=20the=20Podfile.lo?= =?UTF-8?q?ck=20are=20not=20checked=20in,=20they=20should=20be=20=E2=80=A6?= =?UTF-8?q?=20(#2029)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Because Pods and the Podfile.lock are not checked in, they should be removed before installing. Otherwise the state is not consistant. * Pod install no longer updates the repo * Copy changes to split up examples. --- build.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/build.sh b/build.sh index e6f1f0566f..b9b5dfc2b4 100755 --- a/build.sh +++ b/build.sh @@ -38,12 +38,18 @@ fi if [ "$MODE" = "examples" ]; then echo "Verifying that all AsyncDisplayKit examples compile." + #Update cocoapods repo + pod repo update master for example in examples/*/; do echo "Building (examples) $example." if [ -f "${example}/Podfile" ]; then echo "Using CocoaPods" + if [ -f "${example}/Podfile.lock" ]; then + rm "$example/Podfile.lock" + fi + rm -rf "$example/Pods" pod install --project-directory=$example set -o pipefail && xcodebuild \ @@ -78,12 +84,18 @@ fi if [ "$MODE" = "examples-pt1" ]; then echo "Verifying that all AsyncDisplayKit examples compile." + #Update cocoapods repo + pod repo update master for example in $((find ./examples -type d -maxdepth 1 \( ! -iname ".*" \)) | head -6 | head); do echo "Building (examples-pt1) $example." if [ -f "${example}/Podfile" ]; then echo "Using CocoaPods" + if [ -f "${example}/Podfile.lock" ]; then + rm "$example/Podfile.lock" + fi + rm -rf "$example/Pods" pod install --project-directory=$example set -o pipefail && xcodebuild \ @@ -118,12 +130,18 @@ fi if [ "$MODE" = "examples-pt2" ]; then echo "Verifying that all AsyncDisplayKit examples compile." + #Update cocoapods repo + pod repo update master for example in $((find ./examples -type d -maxdepth 1 \( ! -iname ".*" \)) | head -12 | tail -6 | head); do echo "Building $example (examples-pt2)." if [ -f "${example}/Podfile" ]; then echo "Using CocoaPods" + if [ -f "${example}/Podfile.lock" ]; then + rm "$example/Podfile.lock" + fi + rm -rf "$example/Pods" pod install --project-directory=$example set -o pipefail && xcodebuild \ @@ -158,12 +176,18 @@ fi if [ "$MODE" = "examples-pt3" ]; then echo "Verifying that all AsyncDisplayKit examples compile." + #Update cocoapods repo + pod repo update master for example in $((find ./examples -type d -maxdepth 1 \( ! -iname ".*" \)) | head -7 | head); do echo "Building $example (examples-pt3)." if [ -f "${example}/Podfile" ]; then echo "Using CocoaPods" + if [ -f "${example}/Podfile.lock" ]; then + rm "$example/Podfile.lock" + fi + rm -rf "$example/Pods" pod install --project-directory=$example set -o pipefail && xcodebuild \ From 4725035f21fcabfa632d0c676d33ecd0cd293474 Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 4 Aug 2016 13:19:14 -0700 Subject: [PATCH 241/247] [ASTableView/ASCollectionView] Flush pending updates before selecting/scrolling to item (#2034) --- AsyncDisplayKit/ASCollectionView.mm | 16 ++++++++++++++++ AsyncDisplayKit/ASTableView.mm | 24 ++++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 1fba98796b..161e4a20aa 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -506,6 +506,22 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; return visibleNodes; } +- (void)scrollToItemAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UICollectionViewScrollPosition)scrollPosition animated:(BOOL)animated +{ + ASDisplayNodeAssertMainThread(); + + [self waitUntilAllUpdatesAreCommitted]; + [super scrollToItemAtIndexPath:indexPath atScrollPosition:scrollPosition animated:animated]; +} + +- (void)selectItemAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UICollectionViewScrollPosition)scrollPosition +{ + ASDisplayNodeAssertMainThread(); + + [self waitUntilAllUpdatesAreCommitted]; + [super selectItemAtIndexPath:indexPath animated:animated scrollPosition:scrollPosition]; +} + #pragma mark Internal /** diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 16e5d3cec9..4b0be991ac 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -452,6 +452,30 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; [_dataController waitUntilAllUpdatesAreCommitted]; } +- (void)scrollToRowAtIndexPath:(NSIndexPath *)indexPath atScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated +{ + ASDisplayNodeAssertMainThread(); + + [self waitUntilAllUpdatesAreCommitted]; + [super scrollToRowAtIndexPath:indexPath atScrollPosition:scrollPosition animated:animated]; +} + +- (void)scrollToNearestSelectedRowAtScrollPosition:(UITableViewScrollPosition)scrollPosition animated:(BOOL)animated +{ + ASDisplayNodeAssertMainThread(); + + [self waitUntilAllUpdatesAreCommitted]; + [super scrollToNearestSelectedRowAtScrollPosition:scrollPosition animated:animated]; +} + +- (void)selectRowAtIndexPath:(NSIndexPath *)indexPath animated:(BOOL)animated scrollPosition:(UITableViewScrollPosition)scrollPosition +{ + ASDisplayNodeAssertMainThread(); + + [self waitUntilAllUpdatesAreCommitted]; + [super selectRowAtIndexPath:indexPath animated:animated scrollPosition:scrollPosition]; +} + - (void)layoutSubviews { if (_nodesConstrainedWidth != self.bounds.size.width) { From 01c8dc3dc20282a5a69125f0c51aac5076ff31ee Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Thu, 4 Aug 2016 16:54:48 -0700 Subject: [PATCH 242/247] [ASDisplayNode] Assert that user doesn't reuse layout specs (#2036) --- AsyncDisplayKit/ASDisplayNode.mm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 0b56764e6e..edbf245461 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2083,6 +2083,9 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) ASDN::MutexLocker l(__instanceLock__); if ((_methodOverrides & ASDisplayNodeMethodOverrideLayoutSpecThatFits) || _layoutSpecBlock != NULL) { ASLayoutSpec *layoutSpec = [self layoutSpecThatFits:constrainedSize]; + + ASDisplayNodeAssert(layoutSpec.isMutable, @"Node %@ returned layout spec %@ that has already been used. Layout specs should always be regenerated.", self, layoutSpec); + layoutSpec.parent = self; // This causes upward propogation of any non-default layoutable values. // manually propagate the trait collection here so that any layoutSpec children of layoutSpec will get a traitCollection From 70574243f71ba082bed95e2fe560e43953855d83 Mon Sep 17 00:00:00 2001 From: David Rodrigues Date: Fri, 5 Aug 2016 03:00:46 +0100 Subject: [PATCH 243/247] Prevent API misuse at compile time (#2035) Using Objective-C attributes, in this case `unavailable`, we can hide unsupported APIs at compile time instead of detecting and warn about it at runtime with a set of asserts. --- AsyncDisplayKit/ASCellNode.h | 10 ++++++++++ AsyncDisplayKit/ASCellNode.mm | 18 ------------------ AsyncDisplayKit/ASEditableTextNode.h | 8 ++++++++ AsyncDisplayKit/ASEditableTextNode.mm | 12 ------------ AsyncDisplayKit/ASImageNode.h | 7 +++++++ AsyncDisplayKit/ASImageNode.mm | 12 ------------ AsyncDisplayKit/ASTextNode.h | 8 ++++++++ AsyncDisplayKit/ASTextNode.mm | 12 ------------ AsyncDisplayKit/ASVideoNode.h | 7 +++++++ AsyncDisplayKit/ASVideoNode.mm | 6 ------ AsyncDisplayKit/ASViewController.h | 10 +++++++++- .../Details/ASAbstractLayoutController.h | 6 ++++++ AsyncDisplayKit/Layout/ASLayout.h | 6 ++++++ Base/ASBaseDefines.h | 8 ++++++++ 14 files changed, 69 insertions(+), 61 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index e6b5a6ae9f..1e79ee2684 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -124,6 +124,16 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { @end +@interface ASCellNode (Unavailable) + +- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +- (void)setLayerBacked:(BOOL)layerBacked AS_UNAVAILABLE("ASCellNode does not support layer-backing"); + +@end + /** * Simple label-style cell node. Read its source for an example of custom s. diff --git a/AsyncDisplayKit/ASCellNode.mm b/AsyncDisplayKit/ASCellNode.mm index e29a469d2c..151578d735 100644 --- a/AsyncDisplayKit/ASCellNode.mm +++ b/AsyncDisplayKit/ASCellNode.mm @@ -104,24 +104,6 @@ _viewControllerNode.frame = self.bounds; } -- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - -- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - -- (void)setLayerBacked:(BOOL)layerBacked -{ - // ASRangeController expects ASCellNodes to be view-backed. (Layer-backing is supported on ASCellNode subnodes.) - ASDisplayNodeAssert(!layerBacked, @"ASCellNode does not support layer-backing."); -} - - (void)__setNeedsLayout { CGSize oldSize = self.calculatedSize; diff --git a/AsyncDisplayKit/ASEditableTextNode.h b/AsyncDisplayKit/ASEditableTextNode.h index 1ca7040b93..3274bb94ce 100644 --- a/AsyncDisplayKit/ASEditableTextNode.h +++ b/AsyncDisplayKit/ASEditableTextNode.h @@ -127,6 +127,14 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface ASEditableTextNode (Unavailable) + +- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +@end + #pragma mark - /** * The methods declared by the ASEditableTextNodeDelegate protocol allow the adopting delegate to diff --git a/AsyncDisplayKit/ASEditableTextNode.mm b/AsyncDisplayKit/ASEditableTextNode.mm index 687cebc430..573323fda6 100644 --- a/AsyncDisplayKit/ASEditableTextNode.mm +++ b/AsyncDisplayKit/ASEditableTextNode.mm @@ -167,18 +167,6 @@ return self; } -- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - -- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - - (void)dealloc { _textKitComponents.textView.delegate = nil; diff --git a/AsyncDisplayKit/ASImageNode.h b/AsyncDisplayKit/ASImageNode.h index 70fd576fbf..c733a66459 100644 --- a/AsyncDisplayKit/ASImageNode.h +++ b/AsyncDisplayKit/ASImageNode.h @@ -154,6 +154,13 @@ typedef UIImage * _Nullable (^asimagenode_modification_block_t)(UIImage *image); @end +@interface ASImageNode (Unavailable) + +- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +@end ASDISPLAYNODE_EXTERN_C_BEGIN diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index d85a347ec5..8a6304f024 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -171,18 +171,6 @@ struct ASImageNodeDrawParameters { return self; } -- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - -- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - - (void)dealloc { // Invalidate all components around animated images diff --git a/AsyncDisplayKit/ASTextNode.h b/AsyncDisplayKit/ASTextNode.h index b103957e8c..e59e11bd4f 100644 --- a/AsyncDisplayKit/ASTextNode.h +++ b/AsyncDisplayKit/ASTextNode.h @@ -272,6 +272,14 @@ typedef NS_ENUM(NSUInteger, ASTextNodeHighlightStyle) { @end +@interface ASTextNode (Unavailable) + +- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +@end + /** * @abstract Text node deprecated properties */ diff --git a/AsyncDisplayKit/ASTextNode.mm b/AsyncDisplayKit/ASTextNode.mm index 17079418a5..b564caa488 100644 --- a/AsyncDisplayKit/ASTextNode.mm +++ b/AsyncDisplayKit/ASTextNode.mm @@ -122,18 +122,6 @@ static NSArray *DefaultLinkAttributeNames = @[ NSLinkAttributeName ]; return self; } -- (instancetype)initWithLayerBlock:(ASDisplayNodeLayerBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - -- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - - (void)dealloc { if (_shadowColor != NULL) { diff --git a/AsyncDisplayKit/ASVideoNode.h b/AsyncDisplayKit/ASVideoNode.h index e525d1a2dc..039c21269a 100644 --- a/AsyncDisplayKit/ASVideoNode.h +++ b/AsyncDisplayKit/ASVideoNode.h @@ -147,6 +147,13 @@ NS_ASSUME_NONNULL_BEGIN - (void)videoNode:(ASVideoNode *)videoNode didPlayToSecond:(NSTimeInterval)second __deprecated; @end + +@interface ASVideoNode (Unavailable) + +- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(nullable ASDisplayNodeDidLoadBlock)didLoadBlock __unavailable; + +@end + NS_ASSUME_NONNULL_END #endif diff --git a/AsyncDisplayKit/ASVideoNode.mm b/AsyncDisplayKit/ASVideoNode.mm index 5165068961..e6f44993ea 100644 --- a/AsyncDisplayKit/ASVideoNode.mm +++ b/AsyncDisplayKit/ASVideoNode.mm @@ -105,12 +105,6 @@ static NSString * const kStatus = @"status"; return self; } -- (instancetype)initWithViewBlock:(ASDisplayNodeViewBlock)viewBlock didLoadBlock:(ASDisplayNodeDidLoadBlock)didLoadBlock -{ - ASDisplayNodeAssertNotSupported(); - return nil; -} - - (ASDisplayNode *)constructPlayerNode { ASVideoNode * __weak weakSelf = self; diff --git a/AsyncDisplayKit/ASViewController.h b/AsyncDisplayKit/ASViewController.h index a16932ccf1..31ff3ed9d4 100644 --- a/AsyncDisplayKit/ASViewController.h +++ b/AsyncDisplayKit/ASViewController.h @@ -74,4 +74,12 @@ typedef ASTraitCollection * _Nonnull (^ASDisplayTraitsForTraitWindowSizeBlock)(C @end -NS_ASSUME_NONNULL_END \ No newline at end of file +@interface ASViewController (Unavailable) + +- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil AS_UNAVAILABLE("ASViewController requires using -initWithNode:"); + +- (instancetype)initWithCoder:(NSCoder *)aDecoder AS_UNAVAILABLE("ASViewController requires using -initWithNode:"); + +@end + +NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Details/ASAbstractLayoutController.h b/AsyncDisplayKit/Details/ASAbstractLayoutController.h index 09f590399e..bcbbd89d01 100644 --- a/AsyncDisplayKit/Details/ASAbstractLayoutController.h +++ b/AsyncDisplayKit/Details/ASAbstractLayoutController.h @@ -17,4 +17,10 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface ASAbstractLayoutController (Unavailable) + +- (NSSet *)indexPathsForScrolling:(ASScrollDirection)scrollDirection rangeMode:(ASLayoutRangeMode)rangeMode rangeType:(ASLayoutRangeType)rangeType __unavailable; + +@end + NS_ASSUME_NONNULL_END diff --git a/AsyncDisplayKit/Layout/ASLayout.h b/AsyncDisplayKit/Layout/ASLayout.h index 17b93dd3c9..31465987fb 100644 --- a/AsyncDisplayKit/Layout/ASLayout.h +++ b/AsyncDisplayKit/Layout/ASLayout.h @@ -154,4 +154,10 @@ extern BOOL CGPointIsNull(CGPoint point); @end +@interface ASLayout (Unavailable) + +- (instancetype)init __unavailable; + +@end + NS_ASSUME_NONNULL_END diff --git a/Base/ASBaseDefines.h b/Base/ASBaseDefines.h index dfc02c1230..1800011d90 100755 --- a/Base/ASBaseDefines.h +++ b/Base/ASBaseDefines.h @@ -143,3 +143,11 @@ #define ASDISPLAYNODE_REQUIRES_SUPER #endif #endif + +#ifndef AS_UNAVAILABLE +#if __has_attribute(unavailable) +#define AS_UNAVAILABLE(message) __attribute__((unavailable(message))) +#else +#define AS_UNAVAILABLE(message) +#endif +#endif From 2804d50220dabebc62b088b17d5ffe2347da1e36 Mon Sep 17 00:00:00 2001 From: Michael Schneider Date: Fri, 5 Aug 2016 10:25:50 -0700 Subject: [PATCH 244/247] Fix if pending layout will be deallocated (#2038) The pending layout transition needs to stay alive at least until applySubnodeInsertions did finish execute as it can happen that with Implicit Hierarchy Management new nodes gonna be added that internally call setNeedsLayout what will invalidate and deallocate the transition in the middle of inserting nodes --- AsyncDisplayKit/ASDisplayNode.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index edbf245461..c57589025d 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -789,9 +789,12 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } // Setup pending layout transition for animation - _pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self - pendingLayout:newLayout - previousLayout:previousLayout]; + // The pending layout transition needs to stay alive at least until applySubnodeInsertions did finish execute as + // it can happen that with Implicit Hierarchy Management new nodes gonna be added that internally call setNeedsLayout + // what will invalidate and deallocate the transition in the middle of inserting nodes + NS_VALID_UNTIL_END_OF_SCOPE ASLayoutTransition *pendingLayoutTransition = [[ASLayoutTransition alloc] initWithNode:self pendingLayout:newLayout previousLayout:previousLayout]; + _pendingLayoutTransition = pendingLayoutTransition; + // Setup context for pending layout transition. we need to hold a strong reference to the context _pendingLayoutTransitionContext = [[_ASTransitionContext alloc] initWithAnimation:animated layoutDelegate:_pendingLayoutTransition From 39da5d2cb07f233af043b91b933c76058af6d0ef Mon Sep 17 00:00:00 2001 From: ricky Date: Fri, 5 Aug 2016 10:34:13 -0700 Subject: [PATCH 245/247] [ASTraitCollection] propagate window container size via ASTraitCollection in iOS7 (#2019) --- AsyncDisplayKit/ASViewController.mm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/AsyncDisplayKit/ASViewController.mm b/AsyncDisplayKit/ASViewController.mm index e754633ca0..a0e3681381 100644 --- a/AsyncDisplayKit/ASViewController.mm +++ b/AsyncDisplayKit/ASViewController.mm @@ -83,6 +83,10 @@ if (AS_AT_LEAST_IOS8) { ASEnvironmentTraitCollection traitCollection = [self environmentTraitCollectionForUITraitCollection:self.traitCollection]; [self progagateNewEnvironmentTraitCollection:traitCollection]; + } else { + ASEnvironmentTraitCollection traitCollection = ASEnvironmentTraitCollectionMakeDefault(); + traitCollection.containerSize = self.view.bounds.size; + [self progagateNewEnvironmentTraitCollection:traitCollection]; } } @@ -325,4 +329,13 @@ ASVisibilityDepthImplementation; [self progagateNewEnvironmentTraitCollection:environmentTraitCollection]; } +- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation +{ + [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; + + ASEnvironmentTraitCollection traitCollection = self.node.environmentTraitCollection; + traitCollection.containerSize = self.view.bounds.size; + [self progagateNewEnvironmentTraitCollection:traitCollection]; +} + @end From 1fbf8ad0731ebf8fd2c394626bb58358fac8ca0f Mon Sep 17 00:00:00 2001 From: Adlai Holler Date: Fri, 5 Aug 2016 15:39:33 -0700 Subject: [PATCH 246/247] [ASDataController] Cancel if we lose our data source, fix bugs (#1987) [ASRangeController] We're already on main thread, remove blocks Make data source read-only, clarify what's asynchronous [ASDataController] Clean up some interfaces [ASDataController] A little more cleanup [ASDataController] Cleanup [ASDataController] Restore some changes, exit more often [ASDataController] Use item counts that we already have rather than requerying them [ASDataController] Revert weakifications [ASDataController] Add a mechanism to measure how much work we avoided --- AsyncDisplayKit/ASCollectionView.mm | 5 +- AsyncDisplayKit/ASTableView.mm | 3 +- .../Details/ASCollectionDataController.h | 2 + .../Details/ASCollectionDataController.mm | 51 +++--- AsyncDisplayKit/Details/ASDataController.h | 4 +- AsyncDisplayKit/Details/ASDataController.mm | 157 +++++++++++------- .../Details/ASIndexedNodeContext.h | 2 + .../Details/ASIndexedNodeContext.mm | 9 + AsyncDisplayKit/Details/ASRangeController.mm | 38 ++--- .../Private/ASDataController+Subclasses.h | 11 +- 10 files changed, 159 insertions(+), 123 deletions(-) diff --git a/AsyncDisplayKit/ASCollectionView.mm b/AsyncDisplayKit/ASCollectionView.mm index 161e4a20aa..5e71ffd40c 100644 --- a/AsyncDisplayKit/ASCollectionView.mm +++ b/AsyncDisplayKit/ASCollectionView.mm @@ -87,7 +87,7 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; #pragma mark - #pragma mark ASCollectionView. -@interface ASCollectionView () { +@interface ASCollectionView () { ASCollectionViewProxy *_proxyDataSource; ASCollectionViewProxy *_proxyDelegate; @@ -232,9 +232,8 @@ static NSString * const kCellReuseIdentifier = @"_ASCollectionViewCell"; _rangeController.delegate = self; _rangeController.layoutController = _layoutController; - _dataController = [[ASCollectionDataController alloc] init]; + _dataController = [[ASCollectionDataController alloc] initWithDataSource:self]; _dataController.delegate = _rangeController; - _dataController.dataSource = self; _dataController.environmentDelegate = self; _batchContext = [[ASBatchContext alloc] init]; diff --git a/AsyncDisplayKit/ASTableView.mm b/AsyncDisplayKit/ASTableView.mm index 4b0be991ac..958530cca9 100644 --- a/AsyncDisplayKit/ASTableView.mm +++ b/AsyncDisplayKit/ASTableView.mm @@ -189,8 +189,7 @@ static NSString * const kCellReuseIdentifier = @"_ASTableViewCell"; _rangeController.dataSource = self; _rangeController.delegate = self; - _dataController = [[dataControllerClass alloc] init]; - _dataController.dataSource = self; + _dataController = [[dataControllerClass alloc] initWithDataSource:self]; _dataController.delegate = _rangeController; _dataController.environmentDelegate = self; diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.h b/AsyncDisplayKit/Details/ASCollectionDataController.h index c1534ea827..2f19e09757 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.h +++ b/AsyncDisplayKit/Details/ASCollectionDataController.h @@ -40,6 +40,8 @@ @interface ASCollectionDataController : ASChangeSetDataController +- (instancetype)initWithDataSource:(id)dataSource NS_DESIGNATED_INITIALIZER; + - (ASCellNode *)supplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath; @end \ No newline at end of file diff --git a/AsyncDisplayKit/Details/ASCollectionDataController.mm b/AsyncDisplayKit/Details/ASCollectionDataController.mm index f3bcede28c..8f5d505815 100644 --- a/AsyncDisplayKit/Details/ASCollectionDataController.mm +++ b/AsyncDisplayKit/Details/ASCollectionDataController.mm @@ -31,11 +31,14 @@ NSMutableDictionary *> *_pendingContexts; } -- (instancetype)init +- (instancetype)initWithDataSource:(id)dataSource { - self = [super init]; + self = [super initWithDataSource:dataSource]; if (self != nil) { _pendingContexts = [NSMutableDictionary dictionary]; + _dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath = [dataSource respondsToSelector:@selector(dataController:supplementaryNodeBlockOfKind:atIndexPath:)]; + + ASDisplayNodeAssertTrue(_dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath || [dataSource respondsToSelector:@selector(dataController:supplementaryNodeOfKind:atIndexPath:)]); } return self; } @@ -69,7 +72,7 @@ } [self insertSections:sections ofKind:kind atIndexSet:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)] completion:nil]; - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; }]; @@ -95,7 +98,7 @@ } [self insertSections:sectionArray ofKind:kind atIndexSet:sections completion:nil]; - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; }]; @@ -145,7 +148,7 @@ - (void)willInsertRowsAtIndexPaths:(NSArray *)indexPaths { [_pendingContexts enumerateKeysAndObjectsUsingBlock:^(NSString * _Nonnull kind, NSMutableArray * _Nonnull contexts, BOOL * _Nonnull stop) { - [self batchLayoutNodesFromContexts:contexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; }]; @@ -178,7 +181,7 @@ } } - [self batchLayoutNodesFromContexts:reinsertedContexts ofKind:kind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self batchLayoutNodesFromContexts:reinsertedContexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) { [self insertNodes:nodes ofKind:kind atIndexPaths:indexPaths completion:nil]; }]; } @@ -240,20 +243,20 @@ - (void)_populateSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath mutableContexts:(NSMutableArray *)contexts environmentTraitCollection:(ASEnvironmentTraitCollection)environmentTraitCollection { - ASCellNodeBlock supplementaryCellBlock; - if (_dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath) { - supplementaryCellBlock = [self.collectionDataSource dataController:self supplementaryNodeBlockOfKind:kind atIndexPath:indexPath]; - } else { - ASCellNode *supplementaryNode = [self.collectionDataSource dataController:self supplementaryNodeOfKind:kind atIndexPath:indexPath]; - supplementaryCellBlock = ^{ return supplementaryNode; }; - } - - ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; - ASIndexedNodeContext *context = [[ASIndexedNodeContext alloc] initWithNodeBlock:supplementaryCellBlock - indexPath:indexPath - constrainedSize:constrainedSize - environmentTraitCollection:environmentTraitCollection]; - [contexts addObject:context]; + ASCellNodeBlock supplementaryCellBlock; + if (_dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath) { + supplementaryCellBlock = [self.collectionDataSource dataController:self supplementaryNodeBlockOfKind:kind atIndexPath:indexPath]; + } else { + ASCellNode *supplementaryNode = [self.collectionDataSource dataController:self supplementaryNodeOfKind:kind atIndexPath:indexPath]; + supplementaryCellBlock = ^{ return supplementaryNode; }; + } + + ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; + ASIndexedNodeContext *context = [[ASIndexedNodeContext alloc] initWithNodeBlock:supplementaryCellBlock + indexPath:indexPath + constrainedSize:constrainedSize + environmentTraitCollection:environmentTraitCollection]; + [contexts addObject:context]; } #pragma mark - Sizing query @@ -296,12 +299,4 @@ return (id)self.dataSource; } -- (void)setDataSource:(id)dataSource -{ - [super setDataSource:dataSource]; - _dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath = [self.collectionDataSource respondsToSelector:@selector(dataController:supplementaryNodeBlockOfKind:atIndexPath:)]; - - ASDisplayNodeAssertTrue(_dataSourceImplementsSupplementaryNodeBlockOfKindAtIndexPath || [self.collectionDataSource respondsToSelector:@selector(dataController:supplementaryNodeOfKind:atIndexPath:)]); -} - @end diff --git a/AsyncDisplayKit/Details/ASDataController.h b/AsyncDisplayKit/Details/ASDataController.h index 2c9c324425..7d748663dd 100644 --- a/AsyncDisplayKit/Details/ASDataController.h +++ b/AsyncDisplayKit/Details/ASDataController.h @@ -109,10 +109,12 @@ FOUNDATION_EXPORT NSString * const ASDataControllerRowNodeKind; @protocol ASFlowLayoutControllerDataSource; @interface ASDataController : ASDealloc2MainObject +- (instancetype)initWithDataSource:(id)dataSource NS_DESIGNATED_INITIALIZER; + /** Data source for fetching data info. */ -@property (nonatomic, weak) id dataSource; +@property (nonatomic, weak, readonly) id dataSource; /** Delegate to notify when data is updated. diff --git a/AsyncDisplayKit/Details/ASDataController.mm b/AsyncDisplayKit/Details/ASDataController.mm index 21e56e3dc4..f738b55e01 100644 --- a/AsyncDisplayKit/Details/ASDataController.mm +++ b/AsyncDisplayKit/Details/ASDataController.mm @@ -23,6 +23,9 @@ //#define LOG(...) NSLog(__VA_ARGS__) #define LOG(...) +#define AS_MEASURE_AVOIDED_DATACONTROLLER_WORK 0 + +#define RETURN_IF_NO_DATASOURCE(val) if (_dataSource == nil) { return val; } #define ASSERT_ON_EDITING_QUEUE ASDisplayNodeAssertNotNil(dispatch_get_specific(&kASDataControllerEditingQueueKey), @"%@ must be called on the editing transaction queue.", NSStringFromSelector(_cmd)) const static NSUInteger kASDataControllerSizingCountPerProcessor = 5; @@ -31,6 +34,13 @@ const static char * kASDataControllerEditingQueueContext = "kASDataControllerEdi NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; +#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK +@interface ASDataController (AvoidedWorkMeasuring) ++ (void)_didLayoutNode; ++ (void)_expectToInsertNodes:(NSUInteger)count; +@end +#endif + @interface ASDataController () { NSMutableArray *_externalCompletedNodes; // Main thread only. External data access can immediately query this if available. NSMutableDictionary *_completedNodes; // Main thread only. External data access can immediately query this if _externalCompletedNodes is unavailable. @@ -60,13 +70,15 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; #pragma mark - Lifecycle -- (instancetype)init +- (instancetype)initWithDataSource:(id)dataSource { if (!(self = [super init])) { return nil; } ASDisplayNodeAssert(![self isMemberOfClass:[ASDataController class]], @"ASDataController is an abstract class and should not be instantiated. Instantiate a subclass instead."); + _dataSource = dataSource; + _completedNodes = [NSMutableDictionary dictionary]; _editingNodes = [NSMutableDictionary dictionary]; @@ -87,6 +99,13 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; return self; } +- (instancetype)init +{ + ASDisplayNodeFailAssert(@"Failed to call designated initializer."); + id fakeDataSource = nil; + return [self initWithDataSource:fakeDataSource]; +} + - (void)setDelegate:(id)delegate { if (_delegate == delegate) { @@ -116,10 +135,13 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; #pragma mark - Cell Layout -- (void)batchLayoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock +- (void)batchLayoutNodesFromContexts:(NSArray *)contexts batchCompletion:(ASDataControllerCompletionBlock)batchCompletionHandler { ASSERT_ON_EDITING_QUEUE; - +#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK + [ASDataController _expectToInsertNodes:contexts.count]; +#endif + NSUInteger blockSize = [[ASDataController class] parallelProcessorCount] * kASDataControllerSizingCountPerProcessor; NSUInteger count = contexts.count; @@ -127,7 +149,9 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; for (NSUInteger i = 0; i < count; i += blockSize) { NSRange batchedRange = NSMakeRange(i, MIN(count - i, blockSize)); NSArray *batchedContexts = [contexts subarrayWithRange:batchedRange]; - [self _layoutNodesFromContexts:batchedContexts ofKind:kind completion:completionBlock]; + NSArray *nodes = [self _layoutNodesFromContexts:batchedContexts]; + NSArray *indexPaths = [ASIndexedNodeContext indexPathsFromContexts:batchedContexts]; + batchCompletionHandler(nodes, indexPaths); } } @@ -144,63 +168,58 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; /** * Measures and defines the layout for each node in optimized batches on an editing queue, inserting the results into the backing store. */ -- (void)_batchLayoutNodesFromContexts:(NSArray *)contexts withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions +- (void)_batchLayoutAndInsertNodesFromContexts:(NSArray *)contexts withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASSERT_ON_EDITING_QUEUE; - [self batchLayoutNodesFromContexts:contexts ofKind:ASDataControllerRowNodeKind completion:^(NSArray *nodes, NSArray *indexPaths) { + [self batchLayoutNodesFromContexts:contexts batchCompletion:^(NSArray *nodes, NSArray *indexPaths) { // Insert finished nodes into data storage [self _insertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; }]; } -- (void)_layoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock +- (NSArray *)_layoutNodesFromContexts:(NSArray *)contexts { ASSERT_ON_EDITING_QUEUE; - if (!contexts.count || _dataSource == nil) { - return; + NSUInteger nodeCount = contexts.count; + if (!nodeCount || _dataSource == nil) { + return nil; } - NSUInteger nodeCount = contexts.count; - __strong NSIndexPath **allocatedContextIndexPaths = (__strong NSIndexPath **)calloc(nodeCount, sizeof(NSIndexPath *)); __strong ASCellNode **allocatedNodeBuffer = (__strong ASCellNode **)calloc(nodeCount, sizeof(ASCellNode *)); - for (NSUInteger j = 0; j < nodeCount; j += kASDataControllerSizingCountPerProcessor) { - NSInteger batchCount = MIN(kASDataControllerSizingCountPerProcessor, nodeCount - j); + dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); + dispatch_apply(nodeCount, queue, ^(size_t i) { + RETURN_IF_NO_DATASOURCE(); - dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); - dispatch_apply(batchCount, queue, ^(size_t i) { - unsigned long k = j + i; - ASIndexedNodeContext *context = contexts[k]; - ASCellNode *node = [context allocateNode]; - if (node == nil) { - ASDisplayNodeAssertNotNil(node, @"Node block created nil node; %@, %@", self, self.dataSource); - node = [[ASCellNode alloc] init]; // Fallback to avoid crash for production apps. - } - - allocatedContextIndexPaths[k] = context.indexPath; - allocatedNodeBuffer[k] = node; - - [self _layoutNode:node withConstrainedSize:context.constrainedSize]; - }); - } - - // Create nodes and indexPaths array's - NSArray *allocatedNodes = [NSArray arrayWithObjects:allocatedNodeBuffer count:nodeCount]; - NSArray *indexPaths = [NSArray arrayWithObjects:allocatedContextIndexPaths count:nodeCount]; + // Allocate the node. + ASIndexedNodeContext *context = contexts[i]; + ASCellNode *node = [context allocateNode]; + if (node == nil) { + ASDisplayNodeAssertNotNil(node, @"Node block created nil node; %@, %@", self, self.dataSource); + node = [[ASCellNode alloc] init]; // Fallback to avoid crash for production apps. + } + + [self _layoutNode:node withConstrainedSize:context.constrainedSize]; +#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK + [ASDataController _didLayoutNode]; +#endif + allocatedNodeBuffer[i] = node; + }); + + BOOL canceled = _dataSource == nil; + + // Create nodes array + NSArray *nodes = canceled ? nil : [NSArray arrayWithObjects:allocatedNodeBuffer count:nodeCount]; // Nil out buffer indexes to allow arc to free the stored cells. for (int i = 0; i < nodeCount; i++) { - allocatedContextIndexPaths[i] = nil; allocatedNodeBuffer[i] = nil; } - free(allocatedContextIndexPaths); free(allocatedNodeBuffer); - if (completionBlock) { - completionBlock(allocatedNodes, indexPaths); - } + return nodes; } - (ASSizeRange)constrainedSizeForNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath @@ -238,9 +257,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; } LOG(@"_deleteNodesAtIndexPaths:%@ ofKind:%@, full index paths in _editingNodes = %@", indexPaths, kind, ASIndexPathsForTwoDimensionalArray(_editingNodes[kind])); - NSMutableArray *editingNodes = _editingNodes[kind]; - ASDeleteElementsInMultidimensionalArrayAtIndexPaths(editingNodes, indexPaths); - _editingNodes[kind] = editingNodes; + ASDeleteElementsInMultidimensionalArrayAtIndexPaths(_editingNodes[kind], indexPaths); [_mainSerialQueue performBlockOnMainThread:^{ NSMutableArray *allNodes = _completedNodes[kind]; @@ -383,13 +400,10 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; ASDisplayNodeAssertMainThread(); dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); - NSUInteger sectionCount = [_dataSource numberOfSectionsInDataController:self]; + [self invalidateDataSourceItemCounts]; + NSUInteger sectionCount = [self itemCountsFromDataSource].size(); NSIndexSet *sectionIndexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, sectionCount)]; NSArray *contexts = [self _populateFromDataSourceWithSectionIndexSet:sectionIndexSet]; - - [self invalidateDataSourceItemCounts]; - // Fetch the new item counts upfront. - [self itemCountsFromDataSource]; // Allow subclasses to perform setup before going into the edit transaction [self prepareForReloadData]; @@ -416,10 +430,10 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; } [self _insertSections:sections atIndexSet:sectionIndexSet withAnimationOptions:animationOptions]; - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; + [self _batchLayoutAndInsertNodesFromContexts:contexts withAnimationOptions:animationOptions]; if (completion) { - dispatch_async(dispatch_get_main_queue(), completion); + [_mainSerialQueue performBlockOnMainThread:completion]; } }); if (synchronously) { @@ -455,10 +469,11 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; id environment = [self.environmentDelegate dataControllerEnvironment]; ASEnvironmentTraitCollection environmentTraitCollection = environment.environmentTraitCollection; + std::vector counts = [self itemCountsFromDataSource]; NSMutableArray *contexts = [NSMutableArray array]; [indexSet enumerateRangesUsingBlock:^(NSRange range, BOOL * _Nonnull stop) { for (NSUInteger sectionIndex = range.location; sectionIndex < NSMaxRange(range); sectionIndex++) { - NSUInteger itemCount = [_dataSource dataController:self rowsInSection:sectionIndex]; + NSUInteger itemCount = counts[sectionIndex]; for (NSUInteger i = 0; i < itemCount; i++) { NSIndexPath *indexPath = [NSIndexPath indexPathForItem:i inSection:sectionIndex]; ASCellNodeBlock nodeBlock = [_dataSource dataController:self nodeBlockAtIndexPath:indexPath]; @@ -585,6 +600,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; { [self performEditCommandWithBlock:^{ ASDisplayNodeAssertMainThread(); + LOG(@"Edit Command - insertSections: %@", sections); dispatch_group_wait(_editingTransactionGroup, DISPATCH_TIME_FOREVER); @@ -603,7 +619,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self _insertSections:sectionArray atIndexSet:sections withAnimationOptions:animationOptions]; - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; + [self _batchLayoutAndInsertNodesFromContexts:contexts withAnimationOptions:animationOptions]; }); }]; } @@ -645,16 +661,16 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; // remove elements LOG(@"Edit Transaction - moveSection"); - - NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(_editingNodes[ASDataControllerRowNodeKind], [NSIndexSet indexSetWithIndex:section]); - NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(_editingNodes[ASDataControllerRowNodeKind], indexPaths); + NSMutableArray *editingRows = _editingNodes[ASDataControllerRowNodeKind]; + NSArray *indexPaths = ASIndexPathsForMultidimensionalArrayAtIndexSet(editingRows, [NSIndexSet indexSetWithIndex:section]); + NSArray *nodes = ASFindElementsInMultidimensionalArrayAtIndexPaths(editingRows, indexPaths); [self _deleteNodesAtIndexPaths:indexPaths withAnimationOptions:animationOptions]; // update the section of indexpaths - NSIndexPath *sectionIndexPath = [[NSIndexPath alloc] initWithIndex:newSection]; NSMutableArray *updatedIndexPaths = [[NSMutableArray alloc] initWithCapacity:indexPaths.count]; for (NSIndexPath *indexPath in indexPaths) { - [updatedIndexPaths addObject:[sectionIndexPath indexPathByAddingIndex:[indexPath indexAtPosition:indexPath.length - 1]]]; + NSIndexPath *updatedIndexPath = [NSIndexPath indexPathForItem:indexPath.item inSection:newSection]; + [updatedIndexPaths addObject:updatedIndexPath]; } // Don't re-calculate size for moving @@ -747,7 +763,7 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; [self willInsertRowsAtIndexPaths:indexPaths]; LOG(@"Edit Transaction - insertRows: %@", indexPaths); - [self _batchLayoutNodesFromContexts:contexts withAnimationOptions:animationOptions]; + [self _batchLayoutAndInsertNodesFromContexts:contexts withAnimationOptions:animationOptions]; }); }]; } @@ -812,11 +828,10 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; for (NSMutableArray *section in nodes) { NSUInteger rowIndex = 0; for (ASCellNode *node in section) { + RETURN_IF_NO_DATASOURCE(); NSIndexPath *indexPath = [NSIndexPath indexPathForRow:rowIndex inSection:sectionIndex]; ASSizeRange constrainedSize = [self constrainedSizeForNodeOfKind:kind atIndexPath:indexPath]; - CGRect frame = CGRectZero; - frame.size = [node measureWithSizeRange:constrainedSize].size; - node.frame = frame; + [self _layoutNode:node withConstrainedSize:constrainedSize]; rowIndex += 1; } sectionIndex += 1; @@ -940,3 +955,27 @@ NSString * const ASDataControllerRowNodeKind = @"_ASDataControllerRowNodeKind"; } @end + +#if AS_MEASURE_AVOIDED_DATACONTROLLER_WORK + +static volatile int64_t _totalExpectedItems = 0; +static volatile int64_t _totalMeasuredNodes = 0; + +@implementation ASDataController (WorkMeasuring) + ++ (void)_didLayoutNode +{ + int64_t measured = OSAtomicIncrement64(&_totalMeasuredNodes); + int64_t expected = _totalExpectedItems; + if (measured % 20 == 0 || measured == expected) { + NSLog(@"Data controller avoided work (underestimated): %lld / %lld", measured, expected); + } +} + ++ (void)_expectToInsertNodes:(NSUInteger)count +{ + OSAtomicAdd64((int64_t)count, &_totalExpectedItems); +} + +@end +#endif diff --git a/AsyncDisplayKit/Details/ASIndexedNodeContext.h b/AsyncDisplayKit/Details/ASIndexedNodeContext.h index b970d3e997..cdb907bcaf 100644 --- a/AsyncDisplayKit/Details/ASIndexedNodeContext.h +++ b/AsyncDisplayKit/Details/ASIndexedNodeContext.h @@ -29,4 +29,6 @@ */ - (ASCellNode *)allocateNode; ++ (NSArray *)indexPathsFromContexts:(NSArray *)contexts; + @end diff --git a/AsyncDisplayKit/Details/ASIndexedNodeContext.mm b/AsyncDisplayKit/Details/ASIndexedNodeContext.mm index a009d2cbcc..daf9c850a5 100644 --- a/AsyncDisplayKit/Details/ASIndexedNodeContext.mm +++ b/AsyncDisplayKit/Details/ASIndexedNodeContext.mm @@ -48,4 +48,13 @@ return node; } ++ (NSArray *)indexPathsFromContexts:(NSArray *)contexts +{ + NSMutableArray *result = [NSMutableArray arrayWithCapacity:contexts.count]; + for (ASIndexedNodeContext *ctx in contexts) { + [result addObject:ctx.indexPath]; + } + return result; +} + @end diff --git a/AsyncDisplayKit/Details/ASRangeController.mm b/AsyncDisplayKit/Details/ASRangeController.mm index 092383ad9a..d82073779d 100644 --- a/AsyncDisplayKit/Details/ASRangeController.mm +++ b/AsyncDisplayKit/Details/ASRangeController.mm @@ -415,50 +415,44 @@ static UIApplicationState __ApplicationState = UIApplicationStateActive; - (void)dataControllerBeginUpdates:(ASDataController *)dataController { - ASPerformBlockOnMainThread(^{ - [_delegate didBeginUpdatesInRangeController:self]; - }); + ASDisplayNodeAssertMainThread(); + [_delegate didBeginUpdatesInRangeController:self]; } - (void)dataController:(ASDataController *)dataController endUpdatesAnimated:(BOOL)animated completion:(void (^)(BOOL))completion { - ASPerformBlockOnMainThread(^{ - [_delegate rangeController:self didEndUpdatesAnimated:animated completion:completion]; - }); + ASDisplayNodeAssertMainThread(); + [_delegate rangeController:self didEndUpdatesAnimated:animated completion:completion]; } - (void)dataController:(ASDataController *)dataController didInsertNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssert(nodes.count == indexPaths.count, @"Invalid index path"); - ASPerformBlockOnMainThread(^{ - _rangeIsValid = NO; - [_delegate rangeController:self didInsertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; - }); + ASDisplayNodeAssertMainThread(); + _rangeIsValid = NO; + [_delegate rangeController:self didInsertNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; } - (void)dataController:(ASDataController *)dataController didDeleteNodes:(NSArray *)nodes atIndexPaths:(NSArray *)indexPaths withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASPerformBlockOnMainThread(^{ - _rangeIsValid = NO; - [_delegate rangeController:self didDeleteNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; - }); + ASDisplayNodeAssertMainThread(); + _rangeIsValid = NO; + [_delegate rangeController:self didDeleteNodes:nodes atIndexPaths:indexPaths withAnimationOptions:animationOptions]; } - (void)dataController:(ASDataController *)dataController didInsertSections:(NSArray *)sections atIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { ASDisplayNodeAssert(sections.count == indexSet.count, @"Invalid sections"); - ASPerformBlockOnMainThread(^{ - _rangeIsValid = NO; - [_delegate rangeController:self didInsertSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions]; - }); + ASDisplayNodeAssertMainThread(); + _rangeIsValid = NO; + [_delegate rangeController:self didInsertSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions]; } - (void)dataController:(ASDataController *)dataController didDeleteSectionsAtIndexSet:(NSIndexSet *)indexSet withAnimationOptions:(ASDataControllerAnimationOptions)animationOptions { - ASPerformBlockOnMainThread(^{ - _rangeIsValid = NO; - [_delegate rangeController:self didDeleteSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions]; - }); + ASDisplayNodeAssertMainThread(); + _rangeIsValid = NO; + [_delegate rangeController:self didDeleteSectionsAtIndexSet:indexSet withAnimationOptions:animationOptions]; } #pragma mark - Memory Management diff --git a/AsyncDisplayKit/Private/ASDataController+Subclasses.h b/AsyncDisplayKit/Private/ASDataController+Subclasses.h index 7df6e8b2d9..dd3905d96c 100644 --- a/AsyncDisplayKit/Private/ASDataController+Subclasses.h +++ b/AsyncDisplayKit/Private/ASDataController+Subclasses.h @@ -53,16 +53,11 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS /** * Measure and layout the given nodes in optimized batches, constraining each to a given size in `constrainedSizeForNodeOfKind:atIndexPath:`. - */ -- (void)batchLayoutNodesFromContexts:(NSArray *)contexts ofKind:(NSString *)kind completion:(ASDataControllerCompletionBlock)completionBlock; - -/** - * Perform measurement and layout of loaded nodes on the main thread, skipping unloaded nodes. * - * @discussion Once nodes have loaded their views, we can't layout in the background so this is a chance - * to do so immediately on the main thread. + * This method runs synchronously. + * @param batchCompletion A handler to be run after each batch is completed. It is executed synchronously on the calling thread. */ -- (void)layoutLoadedNodes:(NSArray *)nodes fromContexts:(NSArray *)contexts ofKind:(NSString *)kind; +- (void)batchLayoutNodesFromContexts:(NSArray *)contexts batchCompletion:(ASDataControllerCompletionBlock)batchCompletionHandler; /** * Provides the size range for a specific node during the layout process. From f40f08753d432cdaa7a799a7875bfc2a1f21c973 Mon Sep 17 00:00:00 2001 From: Hannah Trosi Date: Mon, 8 Aug 2016 11:10:10 -0700 Subject: [PATCH 247/247] fix ASImageNode scaling --- AsyncDisplayKit/Private/ASImageNode+CGExtras.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/Private/ASImageNode+CGExtras.m b/AsyncDisplayKit/Private/ASImageNode+CGExtras.m index b1912e6b2b..b988617198 100644 --- a/AsyncDisplayKit/Private/ASImageNode+CGExtras.m +++ b/AsyncDisplayKit/Private/ASImageNode+CGExtras.m @@ -20,7 +20,7 @@ static CGSize _ASSizeFillWithAspectRatio(CGFloat sizeToScaleAspectRatio, CGSize if (sizeToScaleAspectRatio > destinationAspectRatio) { return CGSizeMake(destinationSize.height * sizeToScaleAspectRatio, destinationSize.height); } else { - return CGSizeMake(destinationSize.width, floorf(destinationSize.width / sizeToScaleAspectRatio)); + return CGSizeMake(destinationSize.width, roundf(destinationSize.width / sizeToScaleAspectRatio)); } }