From c2e5db85ae91d7144c3e21be41d8f78b051720b2 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Wed, 23 Mar 2016 21:32:05 -0700 Subject: [PATCH 01/18] [SocialAppLayout example] update to use ASTextNode's passthroughNonlinkTouches property --- .../Sample.xcodeproj/project.pbxproj | 1777 ++++++++++++----- examples/SocialAppLayout/Sample/PostNode.m | 1 + 2 files changed, 1312 insertions(+), 466 deletions(-) diff --git a/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj b/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj index 6b5d2a4bbf..555e8a7a49 100644 --- a/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj +++ b/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj @@ -1,466 +1,1311 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1DAE4C3A5DA2C2B081CD640F /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7577801AA7321797C5FBB9A1 /* libPods.a */; }; - 3EEA4EE91BECC4A1008A7F35 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4EE81BECC4A1008A7F35 /* main.m */; }; - 3EEA4EEC1BECC4A1008A7F35 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4EEB1BECC4A1008A7F35 /* AppDelegate.m */; }; - 3EEA4EEF1BECC4A1008A7F35 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4EEE1BECC4A1008A7F35 /* ViewController.m */; }; - 3EEA4EF41BECC4A1008A7F35 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4EF31BECC4A1008A7F35 /* Assets.xcassets */; }; - 3EEA4F011BECC4E8008A7F35 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4EFE1BECC4E8008A7F35 /* Default-568h@2x.png */; }; - 3EEA4F021BECC4E8008A7F35 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4EFF1BECC4E8008A7F35 /* Default-667h@2x.png */; }; - 3EEA4F031BECC4E8008A7F35 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F001BECC4E8008A7F35 /* Default-736h@3x.png */; }; - 3EEA4F061BECC6C9008A7F35 /* Post.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4F051BECC6C9008A7F35 /* Post.m */; }; - 3EEA4F091BECC855008A7F35 /* PostNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4F081BECC855008A7F35 /* PostNode.m */; }; - 3EEA4F0C1BECCA0A008A7F35 /* TextStyles.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4F0B1BECCA0A008A7F35 /* TextStyles.m */; }; - 3EEA4F141BECDCD6008A7F35 /* icon_android.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F0E1BECDCD6008A7F35 /* icon_android.png */; }; - 3EEA4F151BECDCD6008A7F35 /* icon_android@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F0F1BECDCD6008A7F35 /* icon_android@2x.png */; }; - 3EEA4F161BECDCD6008A7F35 /* icon_android@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F101BECDCD6008A7F35 /* icon_android@3x.png */; }; - 3EEA4F171BECDCD6008A7F35 /* icon_ios.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F111BECDCD6008A7F35 /* icon_ios.png */; }; - 3EEA4F181BECDCD6008A7F35 /* icon_ios@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F121BECDCD6008A7F35 /* icon_ios@2x.png */; }; - 3EEA4F191BECDCD6008A7F35 /* icon_ios@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F131BECDCD6008A7F35 /* icon_ios@3x.png */; }; - 3EEA4F1D1BECE358008A7F35 /* LikesNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4F1C1BECE358008A7F35 /* LikesNode.m */; }; - 3EEA4F2A1BECE440008A7F35 /* icon_liked.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F1E1BECE440008A7F35 /* icon_liked.png */; }; - 3EEA4F2B1BECE440008A7F35 /* icon_liked@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F1F1BECE440008A7F35 /* icon_liked@2x.png */; }; - 3EEA4F2C1BECE440008A7F35 /* icon_liked@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F201BECE440008A7F35 /* icon_liked@3x.png */; }; - 3EEA4F301BECE440008A7F35 /* icon_like@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F241BECE440008A7F35 /* icon_like@3x.png */; }; - 3EEA4F311BECE440008A7F35 /* icon_like@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F251BECE440008A7F35 /* icon_like@2x.png */; }; - 3EEA4F321BECE440008A7F35 /* icon_like.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F261BECE440008A7F35 /* icon_like.png */; }; - 3EEA4F331BECE440008A7F35 /* icon_comment@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F271BECE440008A7F35 /* icon_comment@3x.png */; }; - 3EEA4F341BECE440008A7F35 /* icon_comment@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F281BECE440008A7F35 /* icon_comment@2x.png */; }; - 3EEA4F351BECE440008A7F35 /* icon_comment.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F291BECE440008A7F35 /* icon_comment.png */; }; - 3EEA4F381BECE775008A7F35 /* CommentsNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA4F371BECE775008A7F35 /* CommentsNode.m */; }; - 3EEA4F3C1BECE99F008A7F35 /* icon_more.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F391BECE99F008A7F35 /* icon_more.png */; }; - 3EEA4F3D1BECE99F008A7F35 /* icon_more@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F3A1BECE99F008A7F35 /* icon_more@2x.png */; }; - 3EEA4F3E1BECE99F008A7F35 /* icon_more@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 3EEA4F3B1BECE99F008A7F35 /* icon_more@3x.png */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 3EEA4EE41BECC4A1008A7F35 /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 3EEA4EE81BECC4A1008A7F35 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 3EEA4EEA1BECC4A1008A7F35 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 3EEA4EEB1BECC4A1008A7F35 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; - 3EEA4EED1BECC4A1008A7F35 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; - 3EEA4EEE1BECC4A1008A7F35 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; - 3EEA4EF31BECC4A1008A7F35 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 3EEA4EF81BECC4A1008A7F35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 3EEA4EFE1BECC4E8008A7F35 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 3EEA4EFF1BECC4E8008A7F35 /* Default-667h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-667h@2x.png"; sourceTree = ""; }; - 3EEA4F001BECC4E8008A7F35 /* Default-736h@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-736h@3x.png"; sourceTree = ""; }; - 3EEA4F041BECC6C9008A7F35 /* Post.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Post.h; sourceTree = ""; }; - 3EEA4F051BECC6C9008A7F35 /* Post.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Post.m; sourceTree = ""; }; - 3EEA4F071BECC855008A7F35 /* PostNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PostNode.h; sourceTree = ""; }; - 3EEA4F081BECC855008A7F35 /* PostNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PostNode.m; sourceTree = ""; }; - 3EEA4F0A1BECCA0A008A7F35 /* TextStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextStyles.h; sourceTree = ""; }; - 3EEA4F0B1BECCA0A008A7F35 /* TextStyles.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextStyles.m; sourceTree = ""; }; - 3EEA4F0E1BECDCD6008A7F35 /* icon_android.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_android.png; sourceTree = ""; }; - 3EEA4F0F1BECDCD6008A7F35 /* icon_android@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_android@2x.png"; sourceTree = ""; }; - 3EEA4F101BECDCD6008A7F35 /* icon_android@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_android@3x.png"; sourceTree = ""; }; - 3EEA4F111BECDCD6008A7F35 /* icon_ios.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_ios.png; sourceTree = ""; }; - 3EEA4F121BECDCD6008A7F35 /* icon_ios@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_ios@2x.png"; sourceTree = ""; }; - 3EEA4F131BECDCD6008A7F35 /* icon_ios@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_ios@3x.png"; sourceTree = ""; }; - 3EEA4F1B1BECE358008A7F35 /* LikesNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LikesNode.h; sourceTree = ""; }; - 3EEA4F1C1BECE358008A7F35 /* LikesNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LikesNode.m; sourceTree = ""; }; - 3EEA4F1E1BECE440008A7F35 /* icon_liked.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_liked.png; sourceTree = ""; }; - 3EEA4F1F1BECE440008A7F35 /* icon_liked@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_liked@2x.png"; sourceTree = ""; }; - 3EEA4F201BECE440008A7F35 /* icon_liked@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_liked@3x.png"; sourceTree = ""; }; - 3EEA4F241BECE440008A7F35 /* icon_like@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_like@3x.png"; sourceTree = ""; }; - 3EEA4F251BECE440008A7F35 /* icon_like@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_like@2x.png"; sourceTree = ""; }; - 3EEA4F261BECE440008A7F35 /* icon_like.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_like.png; sourceTree = ""; }; - 3EEA4F271BECE440008A7F35 /* icon_comment@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_comment@3x.png"; sourceTree = ""; }; - 3EEA4F281BECE440008A7F35 /* icon_comment@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_comment@2x.png"; sourceTree = ""; }; - 3EEA4F291BECE440008A7F35 /* icon_comment.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_comment.png; sourceTree = ""; }; - 3EEA4F361BECE775008A7F35 /* CommentsNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommentsNode.h; sourceTree = ""; }; - 3EEA4F371BECE775008A7F35 /* CommentsNode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommentsNode.m; sourceTree = ""; }; - 3EEA4F391BECE99F008A7F35 /* icon_more.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_more.png; sourceTree = ""; }; - 3EEA4F3A1BECE99F008A7F35 /* icon_more@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_more@2x.png"; sourceTree = ""; }; - 3EEA4F3B1BECE99F008A7F35 /* icon_more@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_more@3x.png"; sourceTree = ""; }; - 7577801AA7321797C5FBB9A1 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 839964CA580D0ED921A6FCB1 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; - E38AD915EE10CFC641F39E5C /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 3EEA4EE11BECC4A1008A7F35 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1DAE4C3A5DA2C2B081CD640F /* libPods.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 3EEA4EDB1BECC4A1008A7F35 = { - isa = PBXGroup; - children = ( - 3EEA4EE61BECC4A1008A7F35 /* Sample */, - 3EEA4EE51BECC4A1008A7F35 /* Products */, - 842ADAFE88475D19B24183AC /* Pods */, - EED34FA6D8171DF44757C852 /* Frameworks */, - ); - sourceTree = ""; - }; - 3EEA4EE51BECC4A1008A7F35 /* Products */ = { - isa = PBXGroup; - children = ( - 3EEA4EE41BECC4A1008A7F35 /* Sample.app */, - ); - name = Products; - sourceTree = ""; - }; - 3EEA4EE61BECC4A1008A7F35 /* Sample */ = { - isa = PBXGroup; - children = ( - 3EEA4F0D1BECDCA6008A7F35 /* Images */, - 3EEA4EEA1BECC4A1008A7F35 /* AppDelegate.h */, - 3EEA4EEB1BECC4A1008A7F35 /* AppDelegate.m */, - 3EEA4EED1BECC4A1008A7F35 /* ViewController.h */, - 3EEA4EEE1BECC4A1008A7F35 /* ViewController.m */, - 3EEA4EF31BECC4A1008A7F35 /* Assets.xcassets */, - 3EEA4EF81BECC4A1008A7F35 /* Info.plist */, - 3EEA4EE71BECC4A1008A7F35 /* Supporting Files */, - 3EEA4F041BECC6C9008A7F35 /* Post.h */, - 3EEA4F051BECC6C9008A7F35 /* Post.m */, - 3EEA4F071BECC855008A7F35 /* PostNode.h */, - 3EEA4F081BECC855008A7F35 /* PostNode.m */, - 3EEA4F0A1BECCA0A008A7F35 /* TextStyles.h */, - 3EEA4F0B1BECCA0A008A7F35 /* TextStyles.m */, - 3EEA4F1B1BECE358008A7F35 /* LikesNode.h */, - 3EEA4F1C1BECE358008A7F35 /* LikesNode.m */, - 3EEA4F361BECE775008A7F35 /* CommentsNode.h */, - 3EEA4F371BECE775008A7F35 /* CommentsNode.m */, - ); - path = Sample; - sourceTree = ""; - }; - 3EEA4EE71BECC4A1008A7F35 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 3EEA4EFE1BECC4E8008A7F35 /* Default-568h@2x.png */, - 3EEA4EFF1BECC4E8008A7F35 /* Default-667h@2x.png */, - 3EEA4F001BECC4E8008A7F35 /* Default-736h@3x.png */, - 3EEA4EE81BECC4A1008A7F35 /* main.m */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 3EEA4F0D1BECDCA6008A7F35 /* Images */ = { - isa = PBXGroup; - children = ( - 3EEA4F391BECE99F008A7F35 /* icon_more.png */, - 3EEA4F3A1BECE99F008A7F35 /* icon_more@2x.png */, - 3EEA4F3B1BECE99F008A7F35 /* icon_more@3x.png */, - 3EEA4F1E1BECE440008A7F35 /* icon_liked.png */, - 3EEA4F1F1BECE440008A7F35 /* icon_liked@2x.png */, - 3EEA4F201BECE440008A7F35 /* icon_liked@3x.png */, - 3EEA4F241BECE440008A7F35 /* icon_like@3x.png */, - 3EEA4F251BECE440008A7F35 /* icon_like@2x.png */, - 3EEA4F261BECE440008A7F35 /* icon_like.png */, - 3EEA4F271BECE440008A7F35 /* icon_comment@3x.png */, - 3EEA4F281BECE440008A7F35 /* icon_comment@2x.png */, - 3EEA4F291BECE440008A7F35 /* icon_comment.png */, - 3EEA4F0E1BECDCD6008A7F35 /* icon_android.png */, - 3EEA4F0F1BECDCD6008A7F35 /* icon_android@2x.png */, - 3EEA4F101BECDCD6008A7F35 /* icon_android@3x.png */, - 3EEA4F111BECDCD6008A7F35 /* icon_ios.png */, - 3EEA4F121BECDCD6008A7F35 /* icon_ios@2x.png */, - 3EEA4F131BECDCD6008A7F35 /* icon_ios@3x.png */, - ); - name = Images; - sourceTree = ""; - }; - 842ADAFE88475D19B24183AC /* Pods */ = { - isa = PBXGroup; - children = ( - E38AD915EE10CFC641F39E5C /* Pods.debug.xcconfig */, - 839964CA580D0ED921A6FCB1 /* Pods.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - EED34FA6D8171DF44757C852 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7577801AA7321797C5FBB9A1 /* libPods.a */, - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 3EEA4EE31BECC4A1008A7F35 /* Sample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 3EEA4EFB1BECC4A1008A7F35 /* Build configuration list for PBXNativeTarget "Sample" */; - buildPhases = ( - B5BD9E5609B2CB179EEE0CF4 /* Check Pods Manifest.lock */, - 3EEA4EE01BECC4A1008A7F35 /* Sources */, - 3EEA4EE11BECC4A1008A7F35 /* Frameworks */, - 3EEA4EE21BECC4A1008A7F35 /* Resources */, - 21F2C1D9B53F9468EAF1653F /* Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Sample; - productName = Sample; - productReference = 3EEA4EE41BECC4A1008A7F35 /* Sample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 3EEA4EDC1BECC4A1008A7F35 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0710; - ORGANIZATIONNAME = Facebook; - TargetAttributes = { - 3EEA4EE31BECC4A1008A7F35 = { - CreatedOnToolsVersion = 7.1; - }; - }; - }; - buildConfigurationList = 3EEA4EDF1BECC4A1008A7F35 /* Build configuration list for PBXProject "Sample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 3EEA4EDB1BECC4A1008A7F35; - productRefGroup = 3EEA4EE51BECC4A1008A7F35 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 3EEA4EE31BECC4A1008A7F35 /* Sample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 3EEA4EE21BECC4A1008A7F35 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EEA4F2A1BECE440008A7F35 /* icon_liked.png in Resources */, - 3EEA4F181BECDCD6008A7F35 /* icon_ios@2x.png in Resources */, - 3EEA4F311BECE440008A7F35 /* icon_like@2x.png in Resources */, - 3EEA4F3D1BECE99F008A7F35 /* icon_more@2x.png in Resources */, - 3EEA4F141BECDCD6008A7F35 /* icon_android.png in Resources */, - 3EEA4F3E1BECE99F008A7F35 /* icon_more@3x.png in Resources */, - 3EEA4F2B1BECE440008A7F35 /* icon_liked@2x.png in Resources */, - 3EEA4F351BECE440008A7F35 /* icon_comment.png in Resources */, - 3EEA4EF41BECC4A1008A7F35 /* Assets.xcassets in Resources */, - 3EEA4F171BECDCD6008A7F35 /* icon_ios.png in Resources */, - 3EEA4F021BECC4E8008A7F35 /* Default-667h@2x.png in Resources */, - 3EEA4F161BECDCD6008A7F35 /* icon_android@3x.png in Resources */, - 3EEA4F191BECDCD6008A7F35 /* icon_ios@3x.png in Resources */, - 3EEA4F331BECE440008A7F35 /* icon_comment@3x.png in Resources */, - 3EEA4F341BECE440008A7F35 /* icon_comment@2x.png in Resources */, - 3EEA4F321BECE440008A7F35 /* icon_like.png in Resources */, - 3EEA4F151BECDCD6008A7F35 /* icon_android@2x.png in Resources */, - 3EEA4F301BECE440008A7F35 /* icon_like@3x.png in Resources */, - 3EEA4F2C1BECE440008A7F35 /* icon_liked@3x.png in Resources */, - 3EEA4F011BECC4E8008A7F35 /* Default-568h@2x.png in Resources */, - 3EEA4F031BECC4E8008A7F35 /* Default-736h@3x.png in Resources */, - 3EEA4F3C1BECE99F008A7F35 /* icon_more.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 21F2C1D9B53F9468EAF1653F /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - B5BD9E5609B2CB179EEE0CF4 /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "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 */ - 3EEA4EE01BECC4A1008A7F35 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EEA4EEF1BECC4A1008A7F35 /* ViewController.m in Sources */, - 3EEA4EEC1BECC4A1008A7F35 /* AppDelegate.m in Sources */, - 3EEA4EE91BECC4A1008A7F35 /* main.m in Sources */, - 3EEA4F061BECC6C9008A7F35 /* Post.m in Sources */, - 3EEA4F0C1BECCA0A008A7F35 /* TextStyles.m in Sources */, - 3EEA4F381BECE775008A7F35 /* CommentsNode.m in Sources */, - 3EEA4F091BECC855008A7F35 /* PostNode.m in Sources */, - 3EEA4F1D1BECE358008A7F35 /* LikesNode.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 3EEA4EF91BECC4A1008A7F35 /* 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 = 9.1; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 3EEA4EFA1BECC4A1008A7F35 /* 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 = 9.1; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 3EEA4EFC1BECC4A1008A7F35 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E38AD915EE10CFC641F39E5C /* Pods.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = Sample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.facebook.AsyncDisplayKit.Sample; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 3EEA4EFD1BECC4A1008A7F35 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 839964CA580D0ED921A6FCB1 /* Pods.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = Sample/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 7.1; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.facebook.AsyncDisplayKit.Sample; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 3EEA4EDF1BECC4A1008A7F35 /* Build configuration list for PBXProject "Sample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3EEA4EF91BECC4A1008A7F35 /* Debug */, - 3EEA4EFA1BECC4A1008A7F35 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 3EEA4EFB1BECC4A1008A7F35 /* Build configuration list for PBXNativeTarget "Sample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 3EEA4EFC1BECC4A1008A7F35 /* Debug */, - 3EEA4EFD1BECC4A1008A7F35 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 3EEA4EDC1BECC4A1008A7F35 /* Project object */; -} + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 1C35DC632213BA3CFE7E9F9E + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" + + showEnvVarsInLog + 0 + + 1DAE4C3A5DA2C2B081CD640F + + fileRef + 7577801AA7321797C5FBB9A1 + isa + PBXBuildFile + + 21F2C1D9B53F9468EAF1653F + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" + + showEnvVarsInLog + 0 + + 3EEA4EDB1BECC4A1008A7F35 + + children + + 3EEA4EE61BECC4A1008A7F35 + 3EEA4EE51BECC4A1008A7F35 + 842ADAFE88475D19B24183AC + EED34FA6D8171DF44757C852 + + isa + PBXGroup + sourceTree + <group> + + 3EEA4EDC1BECC4A1008A7F35 + + attributes + + LastUpgradeCheck + 0710 + ORGANIZATIONNAME + Facebook + TargetAttributes + + 3EEA4EE31BECC4A1008A7F35 + + CreatedOnToolsVersion + 7.1 + + + + buildConfigurationList + 3EEA4EDF1BECC4A1008A7F35 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + Base + + mainGroup + 3EEA4EDB1BECC4A1008A7F35 + productRefGroup + 3EEA4EE51BECC4A1008A7F35 + projectDirPath + + projectReferences + + projectRoot + + targets + + 3EEA4EE31BECC4A1008A7F35 + + + 3EEA4EDF1BECC4A1008A7F35 + + buildConfigurations + + 3EEA4EF91BECC4A1008A7F35 + 3EEA4EFA1BECC4A1008A7F35 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 3EEA4EE01BECC4A1008A7F35 + + buildActionMask + 2147483647 + files + + 3EEA4EEF1BECC4A1008A7F35 + 3EEA4EEC1BECC4A1008A7F35 + 3EEA4EE91BECC4A1008A7F35 + 3EEA4F061BECC6C9008A7F35 + 3EEA4F0C1BECCA0A008A7F35 + 3EEA4F381BECE775008A7F35 + 3EEA4F091BECC855008A7F35 + 3EEA4F1D1BECE358008A7F35 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 3EEA4EE11BECC4A1008A7F35 + + buildActionMask + 2147483647 + files + + 1DAE4C3A5DA2C2B081CD640F + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 3EEA4EE21BECC4A1008A7F35 + + buildActionMask + 2147483647 + files + + 3EEA4F2A1BECE440008A7F35 + 3EEA4F181BECDCD6008A7F35 + 3EEA4F311BECE440008A7F35 + 3EEA4F3D1BECE99F008A7F35 + 3EEA4F141BECDCD6008A7F35 + 3EEA4F3E1BECE99F008A7F35 + 3EEA4F2B1BECE440008A7F35 + 3EEA4F351BECE440008A7F35 + 3EEA4EF41BECC4A1008A7F35 + 3EEA4F171BECDCD6008A7F35 + 3EEA4F021BECC4E8008A7F35 + 3EEA4F161BECDCD6008A7F35 + 3EEA4F191BECDCD6008A7F35 + 3EEA4F331BECE440008A7F35 + 3EEA4F341BECE440008A7F35 + 3EEA4F321BECE440008A7F35 + 3EEA4F151BECDCD6008A7F35 + 3EEA4F301BECE440008A7F35 + 3EEA4F2C1BECE440008A7F35 + 3EEA4F011BECC4E8008A7F35 + 3EEA4F031BECC4E8008A7F35 + 3EEA4F3C1BECE99F008A7F35 + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 3EEA4EE31BECC4A1008A7F35 + + buildConfigurationList + 3EEA4EFB1BECC4A1008A7F35 + buildPhases + + B5BD9E5609B2CB179EEE0CF4 + 3EEA4EE01BECC4A1008A7F35 + 3EEA4EE11BECC4A1008A7F35 + 3EEA4EE21BECC4A1008A7F35 + 21F2C1D9B53F9468EAF1653F + 1C35DC632213BA3CFE7E9F9E + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Sample + productName + Sample + productReference + 3EEA4EE41BECC4A1008A7F35 + productType + com.apple.product-type.application + + 3EEA4EE41BECC4A1008A7F35 + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + Sample.app + sourceTree + BUILT_PRODUCTS_DIR + + 3EEA4EE51BECC4A1008A7F35 + + children + + 3EEA4EE41BECC4A1008A7F35 + + isa + PBXGroup + name + Products + sourceTree + <group> + + 3EEA4EE61BECC4A1008A7F35 + + children + + 3EEA4F0D1BECDCA6008A7F35 + 3EEA4EEA1BECC4A1008A7F35 + 3EEA4EEB1BECC4A1008A7F35 + 3EEA4EED1BECC4A1008A7F35 + 3EEA4EEE1BECC4A1008A7F35 + 3EEA4EF31BECC4A1008A7F35 + 3EEA4EF81BECC4A1008A7F35 + 3EEA4EE71BECC4A1008A7F35 + 3EEA4F041BECC6C9008A7F35 + 3EEA4F051BECC6C9008A7F35 + 3EEA4F071BECC855008A7F35 + 3EEA4F081BECC855008A7F35 + 3EEA4F0A1BECCA0A008A7F35 + 3EEA4F0B1BECCA0A008A7F35 + 3EEA4F1B1BECE358008A7F35 + 3EEA4F1C1BECE358008A7F35 + 3EEA4F361BECE775008A7F35 + 3EEA4F371BECE775008A7F35 + + isa + PBXGroup + path + Sample + sourceTree + <group> + + 3EEA4EE71BECC4A1008A7F35 + + children + + 3EEA4EFE1BECC4E8008A7F35 + 3EEA4EFF1BECC4E8008A7F35 + 3EEA4F001BECC4E8008A7F35 + 3EEA4EE81BECC4A1008A7F35 + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 3EEA4EE81BECC4A1008A7F35 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + main.m + sourceTree + <group> + + 3EEA4EE91BECC4A1008A7F35 + + fileRef + 3EEA4EE81BECC4A1008A7F35 + isa + PBXBuildFile + + 3EEA4EEA1BECC4A1008A7F35 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + AppDelegate.h + sourceTree + <group> + + 3EEA4EEB1BECC4A1008A7F35 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + AppDelegate.m + sourceTree + <group> + + 3EEA4EEC1BECC4A1008A7F35 + + fileRef + 3EEA4EEB1BECC4A1008A7F35 + isa + PBXBuildFile + + 3EEA4EED1BECC4A1008A7F35 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + ViewController.h + sourceTree + <group> + + 3EEA4EEE1BECC4A1008A7F35 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + ViewController.m + sourceTree + <group> + + 3EEA4EEF1BECC4A1008A7F35 + + fileRef + 3EEA4EEE1BECC4A1008A7F35 + isa + PBXBuildFile + + 3EEA4EF31BECC4A1008A7F35 + + isa + PBXFileReference + lastKnownFileType + folder.assetcatalog + path + Assets.xcassets + sourceTree + <group> + + 3EEA4EF41BECC4A1008A7F35 + + fileRef + 3EEA4EF31BECC4A1008A7F35 + isa + PBXBuildFile + + 3EEA4EF81BECC4A1008A7F35 + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Info.plist + sourceTree + <group> + + 3EEA4EF91BECC4A1008A7F35 + + 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 + 9.1 + MTL_ENABLE_DEBUG_INFO + YES + ONLY_ACTIVE_ARCH + YES + SDKROOT + iphoneos + + isa + XCBuildConfiguration + name + Debug + + 3EEA4EFA1BECC4A1008A7F35 + + 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 + 9.1 + MTL_ENABLE_DEBUG_INFO + NO + SDKROOT + iphoneos + VALIDATE_PRODUCT + YES + + isa + XCBuildConfiguration + name + Release + + 3EEA4EFB1BECC4A1008A7F35 + + buildConfigurations + + 3EEA4EFC1BECC4A1008A7F35 + 3EEA4EFD1BECC4A1008A7F35 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 3EEA4EFC1BECC4A1008A7F35 + + baseConfigurationReference + E38AD915EE10CFC641F39E5C + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + INFOPLIST_FILE + Sample/Info.plist + IPHONEOS_DEPLOYMENT_TARGET + 7.1 + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks + PRODUCT_BUNDLE_IDENTIFIER + com.facebook.AsyncDisplayKit.Sample + PRODUCT_NAME + $(TARGET_NAME) + TARGETED_DEVICE_FAMILY + 1,2 + + isa + XCBuildConfiguration + name + Debug + + 3EEA4EFD1BECC4A1008A7F35 + + baseConfigurationReference + 839964CA580D0ED921A6FCB1 + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + INFOPLIST_FILE + Sample/Info.plist + IPHONEOS_DEPLOYMENT_TARGET + 7.1 + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks + PRODUCT_BUNDLE_IDENTIFIER + com.facebook.AsyncDisplayKit.Sample + PRODUCT_NAME + $(TARGET_NAME) + TARGETED_DEVICE_FAMILY + 1,2 + + isa + XCBuildConfiguration + name + Release + + 3EEA4EFE1BECC4E8008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + Default-568h@2x.png + sourceTree + <group> + + 3EEA4EFF1BECC4E8008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + Default-667h@2x.png + sourceTree + <group> + + 3EEA4F001BECC4E8008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + Default-736h@3x.png + sourceTree + <group> + + 3EEA4F011BECC4E8008A7F35 + + fileRef + 3EEA4EFE1BECC4E8008A7F35 + isa + PBXBuildFile + + 3EEA4F021BECC4E8008A7F35 + + fileRef + 3EEA4EFF1BECC4E8008A7F35 + isa + PBXBuildFile + + 3EEA4F031BECC4E8008A7F35 + + fileRef + 3EEA4F001BECC4E8008A7F35 + isa + PBXBuildFile + + 3EEA4F041BECC6C9008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + Post.h + sourceTree + <group> + + 3EEA4F051BECC6C9008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + Post.m + sourceTree + <group> + + 3EEA4F061BECC6C9008A7F35 + + fileRef + 3EEA4F051BECC6C9008A7F35 + isa + PBXBuildFile + + 3EEA4F071BECC855008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + PostNode.h + sourceTree + <group> + + 3EEA4F081BECC855008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + PostNode.m + sourceTree + <group> + + 3EEA4F091BECC855008A7F35 + + fileRef + 3EEA4F081BECC855008A7F35 + isa + PBXBuildFile + + 3EEA4F0A1BECCA0A008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + TextStyles.h + sourceTree + <group> + + 3EEA4F0B1BECCA0A008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + TextStyles.m + sourceTree + <group> + + 3EEA4F0C1BECCA0A008A7F35 + + fileRef + 3EEA4F0B1BECCA0A008A7F35 + isa + PBXBuildFile + + 3EEA4F0D1BECDCA6008A7F35 + + children + + 3EEA4F391BECE99F008A7F35 + 3EEA4F3A1BECE99F008A7F35 + 3EEA4F3B1BECE99F008A7F35 + 3EEA4F1E1BECE440008A7F35 + 3EEA4F1F1BECE440008A7F35 + 3EEA4F201BECE440008A7F35 + 3EEA4F241BECE440008A7F35 + 3EEA4F251BECE440008A7F35 + 3EEA4F261BECE440008A7F35 + 3EEA4F271BECE440008A7F35 + 3EEA4F281BECE440008A7F35 + 3EEA4F291BECE440008A7F35 + 3EEA4F0E1BECDCD6008A7F35 + 3EEA4F0F1BECDCD6008A7F35 + 3EEA4F101BECDCD6008A7F35 + 3EEA4F111BECDCD6008A7F35 + 3EEA4F121BECDCD6008A7F35 + 3EEA4F131BECDCD6008A7F35 + + isa + PBXGroup + name + Images + sourceTree + <group> + + 3EEA4F0E1BECDCD6008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_android.png + sourceTree + <group> + + 3EEA4F0F1BECDCD6008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_android@2x.png + sourceTree + <group> + + 3EEA4F101BECDCD6008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_android@3x.png + sourceTree + <group> + + 3EEA4F111BECDCD6008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_ios.png + sourceTree + <group> + + 3EEA4F121BECDCD6008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_ios@2x.png + sourceTree + <group> + + 3EEA4F131BECDCD6008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_ios@3x.png + sourceTree + <group> + + 3EEA4F141BECDCD6008A7F35 + + fileRef + 3EEA4F0E1BECDCD6008A7F35 + isa + PBXBuildFile + + 3EEA4F151BECDCD6008A7F35 + + fileRef + 3EEA4F0F1BECDCD6008A7F35 + isa + PBXBuildFile + + 3EEA4F161BECDCD6008A7F35 + + fileRef + 3EEA4F101BECDCD6008A7F35 + isa + PBXBuildFile + + 3EEA4F171BECDCD6008A7F35 + + fileRef + 3EEA4F111BECDCD6008A7F35 + isa + PBXBuildFile + + 3EEA4F181BECDCD6008A7F35 + + fileRef + 3EEA4F121BECDCD6008A7F35 + isa + PBXBuildFile + + 3EEA4F191BECDCD6008A7F35 + + fileRef + 3EEA4F131BECDCD6008A7F35 + isa + PBXBuildFile + + 3EEA4F1B1BECE358008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + LikesNode.h + sourceTree + <group> + + 3EEA4F1C1BECE358008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + LikesNode.m + sourceTree + <group> + + 3EEA4F1D1BECE358008A7F35 + + fileRef + 3EEA4F1C1BECE358008A7F35 + isa + PBXBuildFile + + 3EEA4F1E1BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_liked.png + sourceTree + <group> + + 3EEA4F1F1BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_liked@2x.png + sourceTree + <group> + + 3EEA4F201BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_liked@3x.png + sourceTree + <group> + + 3EEA4F241BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_like@3x.png + sourceTree + <group> + + 3EEA4F251BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_like@2x.png + sourceTree + <group> + + 3EEA4F261BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_like.png + sourceTree + <group> + + 3EEA4F271BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_comment@3x.png + sourceTree + <group> + + 3EEA4F281BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_comment@2x.png + sourceTree + <group> + + 3EEA4F291BECE440008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_comment.png + sourceTree + <group> + + 3EEA4F2A1BECE440008A7F35 + + fileRef + 3EEA4F1E1BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F2B1BECE440008A7F35 + + fileRef + 3EEA4F1F1BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F2C1BECE440008A7F35 + + fileRef + 3EEA4F201BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F301BECE440008A7F35 + + fileRef + 3EEA4F241BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F311BECE440008A7F35 + + fileRef + 3EEA4F251BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F321BECE440008A7F35 + + fileRef + 3EEA4F261BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F331BECE440008A7F35 + + fileRef + 3EEA4F271BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F341BECE440008A7F35 + + fileRef + 3EEA4F281BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F351BECE440008A7F35 + + fileRef + 3EEA4F291BECE440008A7F35 + isa + PBXBuildFile + + 3EEA4F361BECE775008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + CommentsNode.h + sourceTree + <group> + + 3EEA4F371BECE775008A7F35 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + CommentsNode.m + sourceTree + <group> + + 3EEA4F381BECE775008A7F35 + + fileRef + 3EEA4F371BECE775008A7F35 + isa + PBXBuildFile + + 3EEA4F391BECE99F008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_more.png + sourceTree + <group> + + 3EEA4F3A1BECE99F008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_more@2x.png + sourceTree + <group> + + 3EEA4F3B1BECE99F008A7F35 + + isa + PBXFileReference + lastKnownFileType + image.png + path + icon_more@3x.png + sourceTree + <group> + + 3EEA4F3C1BECE99F008A7F35 + + fileRef + 3EEA4F391BECE99F008A7F35 + isa + PBXBuildFile + + 3EEA4F3D1BECE99F008A7F35 + + fileRef + 3EEA4F3A1BECE99F008A7F35 + isa + PBXBuildFile + + 3EEA4F3E1BECE99F008A7F35 + + fileRef + 3EEA4F3B1BECE99F008A7F35 + isa + PBXBuildFile + + 7577801AA7321797C5FBB9A1 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + 839964CA580D0ED921A6FCB1 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.release.xcconfig + path + Pods/Target Support Files/Pods/Pods.release.xcconfig + sourceTree + <group> + + 842ADAFE88475D19B24183AC + + children + + E38AD915EE10CFC641F39E5C + 839964CA580D0ED921A6FCB1 + + isa + PBXGroup + name + Pods + sourceTree + <group> + + B5BD9E5609B2CB179EEE0CF4 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + E38AD915EE10CFC641F39E5C + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.debug.xcconfig + path + Pods/Target Support Files/Pods/Pods.debug.xcconfig + sourceTree + <group> + + EED34FA6D8171DF44757C852 + + children + + 7577801AA7321797C5FBB9A1 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + + rootObject + 3EEA4EDC1BECC4A1008A7F35 + + diff --git a/examples/SocialAppLayout/Sample/PostNode.m b/examples/SocialAppLayout/Sample/PostNode.m index 9d29fcd4f3..b35028d494 100644 --- a/examples/SocialAppLayout/Sample/PostNode.m +++ b/examples/SocialAppLayout/Sample/PostNode.m @@ -89,6 +89,7 @@ _postNode.userInteractionEnabled = YES; _postNode.linkAttributeNames = @[ kLinkAttributeName ]; _postNode.attributedString = attrString; + _postNode.passthroughNonlinkTouches = YES; // passes touches through when they aren't on a link } From 6c4af53434ef668f01a1018e635cbc13f1c82989 Mon Sep 17 00:00:00 2001 From: Hannah Troisi Date: Wed, 23 Mar 2016 23:25:26 -0700 Subject: [PATCH 02/18] Revert project changes for Social App Example --- .../Sample.xcodeproj/project.pbxproj | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj b/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj index 555e8a7a49..b14014b7a0 100644 --- a/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj +++ b/examples/SocialAppLayout/Sample.xcodeproj/project.pbxproj @@ -10,30 +10,6 @@ 46 objects - 1C35DC632213BA3CFE7E9F9E - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" - - showEnvVarsInLog - 0 - 1DAE4C3A5DA2C2B081CD640F fileRef @@ -218,7 +194,7 @@ 3EEA4EE11BECC4A1008A7F35 3EEA4EE21BECC4A1008A7F35 21F2C1D9B53F9468EAF1653F - 1C35DC632213BA3CFE7E9F9E + 852437589F1D53B9483A75DF buildRules @@ -1246,6 +1222,30 @@ sourceTree <group> + 852437589F1D53B9483A75DF + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" + + showEnvVarsInLog + 0 + B5BD9E5609B2CB179EEE0CF4 buildActionMask From f988f86f7f62cfd90779ffeaafd839ecab9d9837 Mon Sep 17 00:00:00 2001 From: Eric Jensen Date: Thu, 24 Mar 2016 19:51:16 -0700 Subject: [PATCH 03/18] Assign the textView's scrollEnabled property in ASEditableTextNode's didLoad method. This prevents a mismatch if the scrollEnabled property on ASEditableTextNode is set before the textView is loaded. --- AsyncDisplayKit/ASEditableTextNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASEditableTextNode.mm b/AsyncDisplayKit/ASEditableTextNode.mm index 3cb9dc3170..ab6ac28a71 100644 --- a/AsyncDisplayKit/ASEditableTextNode.mm +++ b/AsyncDisplayKit/ASEditableTextNode.mm @@ -161,7 +161,7 @@ // Create and configure our text view. _textKitComponents.textView = self.textView; - //_textKitComponents.textView = NO; // Unfortunately there's a bug here with iOS 7 DP5 that causes the text-view to only be one line high when scrollEnabled is NO. rdar://14729288 + _textKitComponents.textView.scrollEnabled = _scrollEnabled; _textKitComponents.textView.delegate = self; #if TARGET_OS_IOS _textKitComponents.textView.editable = YES; From 7de48da44fafe712daeae4712c2910562301504e Mon Sep 17 00:00:00 2001 From: Eric Jensen Date: Thu, 24 Mar 2016 20:00:53 -0700 Subject: [PATCH 04/18] Correct ASEditableTextNode's default value according to the documentation --- AsyncDisplayKit/ASEditableTextNode.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/AsyncDisplayKit/ASEditableTextNode.mm b/AsyncDisplayKit/ASEditableTextNode.mm index ab6ac28a71..cfa338b4db 100644 --- a/AsyncDisplayKit/ASEditableTextNode.mm +++ b/AsyncDisplayKit/ASEditableTextNode.mm @@ -98,6 +98,7 @@ return nil; _displayingPlaceholder = YES; + _scrollEnabled = YES; // Create the scaffolding for the text view. _textKitComponents = [ASTextKitComponents componentsWithAttributedSeedString:nil textContainerSize:CGSizeZero]; From 057ec55941f38efa9fb094c346e2be17963d56b9 Mon Sep 17 00:00:00 2001 From: Eric Jensen Date: Thu, 24 Mar 2016 20:01:27 -0700 Subject: [PATCH 05/18] Correct documentation comments --- AsyncDisplayKit/ASCellNode.h | 4 ++-- AsyncDisplayKit/ASEditableTextNode.h | 6 +++--- AsyncDisplayKit/Details/ASDataController+Subclasses.h | 2 +- AsyncDisplayKit/TextKit/ASTextKitRenderer.h | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AsyncDisplayKit/ASCellNode.h b/AsyncDisplayKit/ASCellNode.h index 6e11c8593b..e38376bee4 100644 --- a/AsyncDisplayKit/ASCellNode.h +++ b/AsyncDisplayKit/ASCellNode.h @@ -66,12 +66,12 @@ typedef NS_ENUM(NSUInteger, ASCellNodeVisibilityEvent) { //@property (atomic, retain) UIColor *backgroundColor; @property (nonatomic) UITableViewCellSelectionStyle selectionStyle; -/* +/** * A Boolean value that indicates whether the node is selected. */ @property (nonatomic, assign) BOOL selected; -/* +/** * A Boolean value that indicates whether the node is highlighted. */ @property (nonatomic, assign) BOOL highlighted; diff --git a/AsyncDisplayKit/ASEditableTextNode.h b/AsyncDisplayKit/ASEditableTextNode.h index 5a7ea07940..31e39aa60e 100644 --- a/AsyncDisplayKit/ASEditableTextNode.h +++ b/AsyncDisplayKit/ASEditableTextNode.h @@ -18,7 +18,7 @@ NS_ASSUME_NONNULL_BEGIN */ @interface ASEditableTextNode : ASDisplayNode -// @abstract The text node's delegate, which must conform to the protocol. +//! @abstract The text node's delegate, which must conform to the protocol. @property (nonatomic, readwrite, weak) id delegate; #pragma mark - Configuration @@ -66,12 +66,12 @@ NS_ASSUME_NONNULL_BEGIN //! @abstract The text input mode used by the receiver's keyboard, if it is visible. This value is undefined if the receiver is not the first responder. @property (nonatomic, readonly) UITextInputMode *textInputMode; -/* +/** @abstract The textContainerInset of both the placeholder and typed textView. This value defaults to UIEdgeInsetsZero. */ @property (nonatomic, readwrite) UIEdgeInsets textContainerInset; -/* +/** @abstract The returnKeyType of the keyboard. This value defaults to UIReturnKeyDefault. */ @property (nonatomic, readwrite) UIReturnKeyType returnKeyType; diff --git a/AsyncDisplayKit/Details/ASDataController+Subclasses.h b/AsyncDisplayKit/Details/ASDataController+Subclasses.h index cb67a203ef..51b7548f50 100644 --- a/AsyncDisplayKit/Details/ASDataController+Subclasses.h +++ b/AsyncDisplayKit/Details/ASDataController+Subclasses.h @@ -38,7 +38,7 @@ typedef void (^ASDataControllerCompletionBlock)(NSArray *nodes, NS */ - (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 diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer.h b/AsyncDisplayKit/TextKit/ASTextKitRenderer.h index 1889131f52..e57c5dc174 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer.h +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer.h @@ -58,7 +58,7 @@ @property (nonatomic, assign, readonly) CGFloat currentScaleFactor; #pragma mark - Drawing -/* +/** Draw the renderer's text content into the bounds provided. @param bounds The rect in which to draw the contents of the renderer. @@ -67,20 +67,20 @@ #pragma mark - Layout -/* +/** Returns the computed size of the renderer given the constrained size and other parameters in the initializer. */ - (CGSize)size; #pragma mark - Text Ranges -/* +/** The character range from the original attributedString that is displayed by the renderer given the parameters in the initializer. */ - (std::vector)visibleRanges; -/* +/** The number of lines shown in the string. */ - (NSUInteger)lineCount; From d845a18dfb6f3f223d578c4cc83f9546fc7834c7 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Thu, 24 Mar 2016 21:33:01 -0700 Subject: [PATCH 06/18] Prevent calculation of current index path when the collection view is empty --- AsyncDisplayKit/ASPagerFlowLayout.m | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit/ASPagerFlowLayout.m b/AsyncDisplayKit/ASPagerFlowLayout.m index 1c05bcd2fb..a7656af391 100644 --- a/AsyncDisplayKit/ASPagerFlowLayout.m +++ b/AsyncDisplayKit/ASPagerFlowLayout.m @@ -25,10 +25,8 @@ - (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset { if (self.currentIndexPath) { - CGPoint contentOffset = [self _targetContentOffsetForItemAtIndexPath:self.currentIndexPath + return [self _targetContentOffsetForItemAtIndexPath:self.currentIndexPath proposedContentOffset:proposedContentOffset]; - self.currentIndexPath = nil; - return contentOffset; } return [super targetContentOffsetForProposedContentOffset:proposedContentOffset]; @@ -43,6 +41,10 @@ - (NSIndexPath *)_indexPathForVisiblyCenteredItem { + if ([self _dataSourceIsEmpty]) { + return nil; + } + CGRect visibleRect = [self _visibleRect]; CGFloat visibleXCenter = CGRectGetMidX(visibleRect); NSArray *layoutAttributes = [self layoutAttributesForElementsInRect:visibleRect]; @@ -54,6 +56,18 @@ return nil; } +- (BOOL)_dataSourceIsEmpty +{ + if ([self.collectionView numberOfSections]) { + if ([self.collectionView numberOfItemsInSection:0] == 0) { + return YES; + } + } else { + return YES; + } + return NO; +} + - (CGRect)_visibleRect { CGRect visibleRect; From f51ca785701580cdb771a3040d9611f1f0c1c7e9 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Thu, 24 Mar 2016 21:40:49 -0700 Subject: [PATCH 07/18] Simplify boolean logic --- AsyncDisplayKit/ASPagerFlowLayout.m | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/AsyncDisplayKit/ASPagerFlowLayout.m b/AsyncDisplayKit/ASPagerFlowLayout.m index a7656af391..92afbcfe0d 100644 --- a/AsyncDisplayKit/ASPagerFlowLayout.m +++ b/AsyncDisplayKit/ASPagerFlowLayout.m @@ -26,7 +26,7 @@ { if (self.currentIndexPath) { return [self _targetContentOffsetForItemAtIndexPath:self.currentIndexPath - proposedContentOffset:proposedContentOffset]; + proposedContentOffset:proposedContentOffset]; } return [super targetContentOffsetForProposedContentOffset:proposedContentOffset]; @@ -58,14 +58,7 @@ - (BOOL)_dataSourceIsEmpty { - if ([self.collectionView numberOfSections]) { - if ([self.collectionView numberOfItemsInSection:0] == 0) { - return YES; - } - } else { - return YES; - } - return NO; + return ([self.collectionView numberOfSections] > 0 && [self.collectionView numberOfItemsInSection:0] > 0); } - (CGRect)_visibleRect From 687be586215fa5e0e25e78e9b7d6216b6f95b60e Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Fri, 25 Mar 2016 10:02:47 -0700 Subject: [PATCH 08/18] Fix PagerNode from not loading --- AsyncDisplayKit/ASPagerFlowLayout.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/AsyncDisplayKit/ASPagerFlowLayout.m b/AsyncDisplayKit/ASPagerFlowLayout.m index 92afbcfe0d..76e69208e8 100644 --- a/AsyncDisplayKit/ASPagerFlowLayout.m +++ b/AsyncDisplayKit/ASPagerFlowLayout.m @@ -34,6 +34,9 @@ - (CGPoint)_targetContentOffsetForItemAtIndexPath:(NSIndexPath *)indexPath proposedContentOffset:(CGPoint)proposedContentOffset { + if ([self _dataSourceIsEmpty]) { + return proposedContentOffset; + } UICollectionViewLayoutAttributes *attributes = [self layoutAttributesForItemAtIndexPath:indexPath]; CGFloat xOffset = (self.collectionView.bounds.size.width - attributes.frame.size.width) / 2; return CGPointMake(attributes.frame.origin.x - xOffset, proposedContentOffset.y); @@ -41,10 +44,6 @@ - (NSIndexPath *)_indexPathForVisiblyCenteredItem { - if ([self _dataSourceIsEmpty]) { - return nil; - } - CGRect visibleRect = [self _visibleRect]; CGFloat visibleXCenter = CGRectGetMidX(visibleRect); NSArray *layoutAttributes = [self layoutAttributesForElementsInRect:visibleRect]; From c07175bfcb64c33ddece05f0168851ba184165a7 Mon Sep 17 00:00:00 2001 From: Levi McCallum Date: Fri, 25 Mar 2016 11:54:56 -0700 Subject: [PATCH 09/18] Fix conditional --- AsyncDisplayKit/ASPagerFlowLayout.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASPagerFlowLayout.m b/AsyncDisplayKit/ASPagerFlowLayout.m index 76e69208e8..dcb89a4008 100644 --- a/AsyncDisplayKit/ASPagerFlowLayout.m +++ b/AsyncDisplayKit/ASPagerFlowLayout.m @@ -57,7 +57,7 @@ - (BOOL)_dataSourceIsEmpty { - return ([self.collectionView numberOfSections] > 0 && [self.collectionView numberOfItemsInSection:0] > 0); + return ([self.collectionView numberOfSections] == 0 || [self.collectionView numberOfItemsInSection:0] == 0); } - (CGRect)_visibleRect From a36cf7930022f83df637f2e7cbaea4b0f9880f89 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Fri, 25 Mar 2016 20:50:12 -0700 Subject: [PATCH 10/18] [AsyncDisplayKit] Main .podspec update to 1.9.7.1 (final GM of 1.9.7, as the tag changed). Uses PINRemoteImage 2.1.2. --- AsyncDisplayKit.podspec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AsyncDisplayKit.podspec b/AsyncDisplayKit.podspec index 1516962121..afec7e166d 100644 --- a/AsyncDisplayKit.podspec +++ b/AsyncDisplayKit.podspec @@ -1,11 +1,11 @@ Pod::Spec.new do |spec| spec.name = 'AsyncDisplayKit' - spec.version = '1.9.7' + spec.version = '1.9.7.1' 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.7' } + spec.source = { :git => 'https://github.com/facebook/AsyncDisplayKit.git', :tag => '1.9.7.1' } spec.documentation_url = 'http://asyncdisplaykit.org/appledoc/' @@ -51,7 +51,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', '>= 2.1' + pin.dependency 'PINRemoteImage/iOS', '>= 2.1.2' pin.dependency 'AsyncDisplayKit/ASDealloc2MainObject' end From daf41ebb43ce93515fec8320d75ef2dd9a5bf3f8 Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 26 Mar 2016 18:19:02 -0700 Subject: [PATCH 11/18] [ASTextNode] Fix edge case where text truncator may not run (manually hosted nodes that are lacking the expected call to -measure). This fixes the scenario described in https://github.com/facebook/AsyncDisplayKit/issues/1295 --- AsyncDisplayKit/TextKit/ASTextKitRenderer.mm | 7 +- .../Sample.xcodeproj/project.pbxproj | 1071 +++++++++++------ .../contents.xcworkspacedata | 10 + examples/EditableText/Sample/ViewController.m | 24 + 4 files changed, 764 insertions(+), 348 deletions(-) create mode 100644 examples/EditableText/Sample.xcworkspace/contents.xcworkspacedata diff --git a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm index 84f777e3cd..bc7d2c1069 100755 --- a/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm +++ b/AsyncDisplayKit/TextKit/ASTextKitRenderer.mm @@ -189,9 +189,10 @@ static NSCharacterSet *_defaultAvoidTruncationCharacterSet() // We add an assertion so we can track the rare conditions where a graphics context is not present ASDisplayNodeAssertNotNil(context, @"This is no good without a context."); - // This renderer may not be the one that did the sizing. If that is the case its _currentScaleFactor will not be set, so we should compute it now - if (_sizeIsCalculated == NO && isinf(_constrainedSize.width) == NO && [_attributes.pointSizeScaleFactors count] > 0) { - _currentScaleFactor = [[self fontSizeAdjuster] scaleFactor]; + // This renderer may not be the one that did the sizing. If that is the case its truncation and currentScaleFactor may not have been evaluated. + // If there's any possibility we need to truncate or scale (e.g. width is not infinite, perform the size calculation. + if (_sizeIsCalculated == NO && isinf(_constrainedSize.width) == NO) { + [self _calculateSize]; } CGRect shadowInsetBounds = [[self shadower] insetRectWithConstrainedRect:bounds]; diff --git a/examples/EditableText/Sample.xcodeproj/project.pbxproj b/examples/EditableText/Sample.xcodeproj/project.pbxproj index a1a1bd3d35..3440a43995 100644 --- a/examples/EditableText/Sample.xcodeproj/project.pbxproj +++ b/examples/EditableText/Sample.xcodeproj/project.pbxproj @@ -1,345 +1,726 @@ -// !$*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 */; }; - 3EC0CDCBA10D483D9F386E5E /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3D24B17D1E4A4E7A9566C5E9 /* libPods.a */; }; - 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 */; }; -/* 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 = ""; }; - 088AA6578212BE9BFBB07B70 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; - 3D24B17D1E4A4E7A9566C5E9 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 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; }; - C068F1D3F0CC317E895FCDAB /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 05E2127E19D4DB510098F589 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 3EC0CDCBA10D483D9F386E5E /* libPods.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 05E2127819D4DB510098F589 = { - isa = PBXGroup; - children = ( - 05E2128319D4DB510098F589 /* Sample */, - 05E2128219D4DB510098F589 /* Products */, - 1A943BF0259746F18D6E423F /* Frameworks */, - 1AE410B73DA5C3BD087ACDD7 /* Pods */, - ); - 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 = ""; - }; - 1A943BF0259746F18D6E423F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 3D24B17D1E4A4E7A9566C5E9 /* libPods.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 1AE410B73DA5C3BD087ACDD7 /* Pods */ = { - isa = PBXGroup; - children = ( - C068F1D3F0CC317E895FCDAB /* Pods.debug.xcconfig */, - 088AA6578212BE9BFBB07B70 /* Pods.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 05E2128019D4DB510098F589 /* Sample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 05E212A419D4DB510098F589 /* Build configuration list for PBXNativeTarget "Sample" */; - buildPhases = ( - E080B80F89C34A25B3488E26 /* Check Pods Manifest.lock */, - 05E2127D19D4DB510098F589 /* Sources */, - 05E2127E19D4DB510098F589 /* Frameworks */, - 05E2127F19D4DB510098F589 /* Resources */, - F012A6F39E0149F18F564F50 /* 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 = 0600; - 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 */ - E080B80F89C34A25B3488E26 /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "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; - }; - F012A6F39E0149F18F564F50 /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-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; - 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 = C068F1D3F0CC317E895FCDAB /* Pods.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = Sample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 05E212A619D4DB510098F589 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 088AA6578212BE9BFBB07B70 /* Pods.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = Sample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - 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 */; -} + + + + + archiveVersion + 1 + classes + + objectVersion + 46 + objects + + 0585427F19D4DBE100606EA6 + + isa + PBXFileReference + lastKnownFileType + image.png + name + Default-568h@2x.png + path + ../Default-568h@2x.png + sourceTree + <group> + + 0585428019D4DBE100606EA6 + + fileRef + 0585427F19D4DBE100606EA6 + isa + PBXBuildFile + + 05E2127819D4DB510098F589 + + children + + 05E2128319D4DB510098F589 + 05E2128219D4DB510098F589 + 1A943BF0259746F18D6E423F + 1AE410B73DA5C3BD087ACDD7 + + indentWidth + 2 + isa + PBXGroup + sourceTree + <group> + tabWidth + 2 + usesTabs + 0 + + 05E2127919D4DB510098F589 + + attributes + + LastUpgradeCheck + 0600 + ORGANIZATIONNAME + Facebook + TargetAttributes + + 05E2128019D4DB510098F589 + + CreatedOnToolsVersion + 6.0.1 + + + + buildConfigurationList + 05E2127C19D4DB510098F589 + compatibilityVersion + Xcode 3.2 + developmentRegion + English + hasScannedForEncodings + 0 + isa + PBXProject + knownRegions + + en + Base + + mainGroup + 05E2127819D4DB510098F589 + productRefGroup + 05E2128219D4DB510098F589 + projectDirPath + + projectReferences + + projectRoot + + targets + + 05E2128019D4DB510098F589 + + + 05E2127C19D4DB510098F589 + + buildConfigurations + + 05E212A219D4DB510098F589 + 05E212A319D4DB510098F589 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 05E2127D19D4DB510098F589 + + buildActionMask + 2147483647 + files + + 05E2128D19D4DB510098F589 + 05E2128A19D4DB510098F589 + 05E2128719D4DB510098F589 + + isa + PBXSourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 05E2127E19D4DB510098F589 + + buildActionMask + 2147483647 + files + + 3EC0CDCBA10D483D9F386E5E + + isa + PBXFrameworksBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 05E2127F19D4DB510098F589 + + buildActionMask + 2147483647 + files + + 0585428019D4DBE100606EA6 + 6C2C82AC19EE274300767484 + 6C2C82AD19EE274300767484 + + isa + PBXResourcesBuildPhase + runOnlyForDeploymentPostprocessing + 0 + + 05E2128019D4DB510098F589 + + buildConfigurationList + 05E212A419D4DB510098F589 + buildPhases + + E080B80F89C34A25B3488E26 + 05E2127D19D4DB510098F589 + 05E2127E19D4DB510098F589 + 05E2127F19D4DB510098F589 + F012A6F39E0149F18F564F50 + 6FBCCC34F8CCA9B610492536 + + buildRules + + dependencies + + isa + PBXNativeTarget + name + Sample + productName + Sample + productReference + 05E2128119D4DB510098F589 + productType + com.apple.product-type.application + + 05E2128119D4DB510098F589 + + explicitFileType + wrapper.application + includeInIndex + 0 + isa + PBXFileReference + path + Sample.app + sourceTree + BUILT_PRODUCTS_DIR + + 05E2128219D4DB510098F589 + + children + + 05E2128119D4DB510098F589 + + isa + PBXGroup + name + Products + sourceTree + <group> + + 05E2128319D4DB510098F589 + + children + + 05E2128819D4DB510098F589 + 05E2128919D4DB510098F589 + 05E2128B19D4DB510098F589 + 05E2128C19D4DB510098F589 + 05E2128419D4DB510098F589 + + isa + PBXGroup + path + Sample + sourceTree + <group> + + 05E2128419D4DB510098F589 + + children + + 0585427F19D4DBE100606EA6 + 6C2C82AA19EE274300767484 + 6C2C82AB19EE274300767484 + 05E2128519D4DB510098F589 + 05E2128619D4DB510098F589 + + isa + PBXGroup + name + Supporting Files + sourceTree + <group> + + 05E2128519D4DB510098F589 + + isa + PBXFileReference + lastKnownFileType + text.plist.xml + path + Info.plist + sourceTree + <group> + + 05E2128619D4DB510098F589 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + main.m + sourceTree + <group> + + 05E2128719D4DB510098F589 + + fileRef + 05E2128619D4DB510098F589 + isa + PBXBuildFile + + 05E2128819D4DB510098F589 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + AppDelegate.h + sourceTree + <group> + + 05E2128919D4DB510098F589 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + AppDelegate.m + sourceTree + <group> + + 05E2128A19D4DB510098F589 + + fileRef + 05E2128919D4DB510098F589 + isa + PBXBuildFile + + 05E2128B19D4DB510098F589 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.h + path + ViewController.h + sourceTree + <group> + + 05E2128C19D4DB510098F589 + + isa + PBXFileReference + lastKnownFileType + sourcecode.c.objc + path + ViewController.m + sourceTree + <group> + + 05E2128D19D4DB510098F589 + + fileRef + 05E2128C19D4DB510098F589 + isa + PBXBuildFile + + 05E212A219D4DB510098F589 + + 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 + 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 + + isa + XCBuildConfiguration + name + Debug + + 05E212A319D4DB510098F589 + + 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 + + isa + XCBuildConfiguration + name + Release + + 05E212A419D4DB510098F589 + + buildConfigurations + + 05E212A519D4DB510098F589 + 05E212A619D4DB510098F589 + + defaultConfigurationIsVisible + 0 + defaultConfigurationName + Release + isa + XCConfigurationList + + 05E212A519D4DB510098F589 + + baseConfigurationReference + C068F1D3F0CC317E895FCDAB + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + INFOPLIST_FILE + Sample/Info.plist + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks + PRODUCT_NAME + $(TARGET_NAME) + + isa + XCBuildConfiguration + name + Debug + + 05E212A619D4DB510098F589 + + baseConfigurationReference + 088AA6578212BE9BFBB07B70 + buildSettings + + ASSETCATALOG_COMPILER_APPICON_NAME + AppIcon + INFOPLIST_FILE + Sample/Info.plist + LD_RUNPATH_SEARCH_PATHS + $(inherited) @executable_path/Frameworks + PRODUCT_NAME + $(TARGET_NAME) + + isa + XCBuildConfiguration + name + Release + + 088AA6578212BE9BFBB07B70 + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.release.xcconfig + path + Pods/Target Support Files/Pods/Pods.release.xcconfig + sourceTree + <group> + + 1A943BF0259746F18D6E423F + + children + + 3D24B17D1E4A4E7A9566C5E9 + + isa + PBXGroup + name + Frameworks + sourceTree + <group> + + 1AE410B73DA5C3BD087ACDD7 + + children + + C068F1D3F0CC317E895FCDAB + 088AA6578212BE9BFBB07B70 + + isa + PBXGroup + name + Pods + sourceTree + <group> + + 3D24B17D1E4A4E7A9566C5E9 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods.a + sourceTree + BUILT_PRODUCTS_DIR + + 3EC0CDCBA10D483D9F386E5E + + fileRef + 3D24B17D1E4A4E7A9566C5E9 + isa + PBXBuildFile + + 6C2C82AA19EE274300767484 + + isa + PBXFileReference + lastKnownFileType + image.png + path + Default-667h@2x.png + sourceTree + SOURCE_ROOT + + 6C2C82AB19EE274300767484 + + isa + PBXFileReference + lastKnownFileType + image.png + path + Default-736h@3x.png + sourceTree + SOURCE_ROOT + + 6C2C82AC19EE274300767484 + + fileRef + 6C2C82AA19EE274300767484 + isa + PBXBuildFile + + 6C2C82AD19EE274300767484 + + fileRef + 6C2C82AB19EE274300767484 + isa + PBXBuildFile + + 6FBCCC34F8CCA9B610492536 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Embed Pods Frameworks + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" + + showEnvVarsInLog + 0 + + C068F1D3F0CC317E895FCDAB + + includeInIndex + 1 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods.debug.xcconfig + path + Pods/Target Support Files/Pods/Pods.debug.xcconfig + sourceTree + <group> + + E080B80F89C34A25B3488E26 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Check Pods Manifest.lock + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null +if [[ $? != 0 ]] ; then + cat << EOM +error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. +EOM + exit 1 +fi + + showEnvVarsInLog + 0 + + F012A6F39E0149F18F564F50 + + buildActionMask + 2147483647 + files + + inputPaths + + isa + PBXShellScriptBuildPhase + name + Copy Pods Resources + outputPaths + + runOnlyForDeploymentPostprocessing + 0 + shellPath + /bin/sh + shellScript + "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" + + showEnvVarsInLog + 0 + + + rootObject + 05E2127919D4DB510098F589 + + diff --git a/examples/EditableText/Sample.xcworkspace/contents.xcworkspacedata b/examples/EditableText/Sample.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..7b5a2f3050 --- /dev/null +++ b/examples/EditableText/Sample.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/examples/EditableText/Sample/ViewController.m b/examples/EditableText/Sample/ViewController.m index 6fb7070861..539f045480 100644 --- a/examples/EditableText/Sample/ViewController.m +++ b/examples/EditableText/Sample/ViewController.m @@ -17,6 +17,10 @@ @interface ViewController () { ASEditableTextNode *_textNode; + + // These elements are a test case for ASTextNode truncation. + UILabel *_label; + ASTextNode *_node; } @end @@ -44,6 +48,24 @@ // the usual delegate methods are available; see ASEditableTextNodeDelegate _textNode.delegate = self; + + + // Do any additional setup after loading the view, typically from a nib. + NSDictionary *attrs = @{ NSFontAttributeName: [UIFont fontWithName:@"HelveticaNeue" size:12.0f] }; + NSAttributedString *string = [[NSAttributedString alloc] initWithString:@"1\n2\n3\n4\n5" attributes:attrs]; + + _label = [[UILabel alloc] init]; + _label.attributedText = string; + _label.backgroundColor = [UIColor lightGrayColor]; + _label.numberOfLines = 3; + _label.frame = CGRectMake(20, 400, 40, 100); + + _node = [[ASTextNode alloc] init]; + _node.maximumNumberOfLines = 3; + _node.backgroundColor = [UIColor lightGrayColor]; + _node.attributedString = string; + _node.frame = CGRectMake(70, 400, 40, 100); +// [_node measure:CGSizeMake(40, 50)]; No longer needed now that https://github.com/facebook/AsyncDisplayKit/issues/1295 is fixed. return self; } @@ -53,6 +75,8 @@ [super viewDidLoad]; [self.view addSubnode:_textNode]; + [self.view addSubnode:_node]; + [self.view addSubview:_label]; [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)]]; } From 6a887a8acf5573b6b52d626e5512394cd6e5bfcb Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 26 Mar 2016 23:24:30 -0700 Subject: [PATCH 12/18] [ASDisplayNode] Alternative implementation of interfaceState -> invisible that avoids a subclass call from -dealloc. --- AsyncDisplayKit/ASDisplayNode.mm | 45 ++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index e92f325283..a531fd3227 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -337,9 +337,9 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (void)dealloc { ASDisplayNodeAssertMainThread(); + // Synchronous nodes may not be able to call the hierarchy notifications, so only enforce for regular nodes. + ASDisplayNodeAssert(_flags.synchronous || !ASInterfaceStateIncludesVisible(_interfaceState), @"Node should always be marked invisible before deallocating; interfaceState: %d, %@", _interfaceState, self); - self.interfaceState &= ~ASInterfaceStateVisible; - self.asyncLayer.asyncDelegate = nil; _view.asyncdisplaykit_node = nil; _layer.asyncdisplaykit_node = nil; @@ -829,7 +829,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) - (BOOL)_displaysAsynchronously { ASDisplayNodeAssertThreadAffinity(self); - return self.isSynchronous == NO && _flags.displaysAsynchronously; + return _flags.synchronous == NO && _flags.displaysAsynchronously; } - (void)setDisplaysAsynchronously:(BOOL)displaysAsynchronously @@ -1545,10 +1545,11 @@ static NSInteger incrementIfFound(NSInteger i) { // 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); - if (!self.inHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { - self.inHierarchy = YES; + if (!_flags.isInHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { _flags.isEnteringHierarchy = YES; - if (self.shouldRasterizeDescendants) { + _flags.isInHierarchy = YES; + + if (_flags.shouldRasterizeDescendants) { // Nodes that are descendants of a rasterized container do not have views or layers, and so cannot receive visibility notifications directly via orderIn/orderOut CALayer actions. Manually send visibility notifications to rasterized descendants. [self _recursiveWillEnterHierarchy]; } else { @@ -1568,7 +1569,7 @@ static NSInteger incrementIfFound(NSInteger i) { [self _setupPlaceholderLayerIfNeeded]; _placeholderLayer.opacity = 1.0; [CATransaction commit]; - [self.layer addSublayer:_placeholderLayer]; + [layer addSublayer:_placeholderLayer]; } } } @@ -1582,18 +1583,34 @@ static NSInteger incrementIfFound(NSInteger i) { // 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); - if (self.inHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { - self.inHierarchy = NO; + if (_flags.isInHierarchy && !_flags.visibilityNotificationsDisabled && ![self __selfOrParentHasVisibilityNotificationsDisabled]) { + _flags.isExitingHierarchy = YES; + _flags.isInHierarchy = NO; [self.asyncLayer cancelAsyncDisplay]; - _flags.isExitingHierarchy = YES; - if (self.shouldRasterizeDescendants) { + if (_flags.shouldRasterizeDescendants) { // Nodes that are descendants of a rasterized container do not have views or layers, and so cannot receive visibility notifications directly via orderIn/orderOut CALayer actions. Manually send visibility notifications to rasterized descendants. [self _recursiveDidExitHierarchy]; - } else { - [self didExitHierarchy]; } + + // This case is important when tearing down hierarchies. We must deliver a visibilityDidChange:NO callback, as part our API guarantee that this method can be used for + // things like data analytics about user content viewing. We cannot call the method in the dealloc as any incidental retain operations in client code would fail. + // Additionally, it may be that a Standard UIView which is containing us is moving between hierarchies, and we should not send the call if we will be re-added in the + // same runloop. Strategy: strong reference (might be the last!), wait one runloop, and confirm we are still outside the hierarchy (both layer-backed and view-backed). + // TODO: This approach could be optimized by only performing the dispatch for root elements + recursively apply the interface state change. This would require a closer + // integration with _ASDisplayLayer to ensure that the superlayer pointer has been cleared by this stage (to check if we are root or not), or a different delegate call. + + if (ASInterfaceStateIncludesVisible(_interfaceState)) { + dispatch_async(dispatch_get_main_queue(), ^{ + ASDN::MutexLocker l(_propertyLock); + if (!_flags.isInHierarchy && ASInterfaceStateIncludesVisible(_interfaceState)) { + self.interfaceState = (_interfaceState & ~ASInterfaceStateVisible); + } + }); + } + + [self didExitHierarchy]; _flags.isExitingHierarchy = NO; } } @@ -1719,7 +1736,7 @@ static NSInteger incrementIfFound(NSInteger i) { // Helper method to summarize whether or not the node run through the display process - (BOOL)__implementsDisplay { - return _flags.implementsDrawRect || _flags.implementsImageDisplay || self.shouldRasterizeDescendants || _flags.implementsInstanceDrawRect || _flags.implementsInstanceImageDisplay; + return _flags.implementsDrawRect || _flags.implementsImageDisplay || _flags.shouldRasterizeDescendants || _flags.implementsInstanceDrawRect || _flags.implementsInstanceImageDisplay; } - (BOOL)placeholderShouldPersist From c6093cffdf76482d1af5a56cbf448adc785eec0e Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sat, 26 Mar 2016 23:57:16 -0700 Subject: [PATCH 13/18] Fix assertion format specifier from previous commit. --- AsyncDisplayKit/ASDisplayNode.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index a531fd3227..d63a95a87a 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -338,7 +338,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) { ASDisplayNodeAssertMainThread(); // Synchronous nodes may not be able to call the hierarchy notifications, so only enforce for regular nodes. - ASDisplayNodeAssert(_flags.synchronous || !ASInterfaceStateIncludesVisible(_interfaceState), @"Node should always be marked invisible before deallocating; interfaceState: %d, %@", _interfaceState, self); + ASDisplayNodeAssert(_flags.synchronous || !ASInterfaceStateIncludesVisible(_interfaceState), @"Node should always be marked invisible before deallocating; interfaceState: %lu, %@", (unsigned long)_interfaceState, self); self.asyncLayer.asyncDelegate = nil; _view.asyncdisplaykit_node = nil; From 81d26994c53d9fef6853797dd6ab6dbb86b62efe Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Sun, 27 Mar 2016 17:09:59 -0700 Subject: [PATCH 14/18] Introduce ASLayoutableContext - The struct is mapped to ID of the current thread and used by subnodes to decide whether they should proceed measurement. --- AsyncDisplayKit.xcodeproj/project.pbxproj | 17 ++++++--- AsyncDisplayKit/ASDisplayNode.mm | 10 +++-- AsyncDisplayKit/Layout/ASDimension.h | 1 - AsyncDisplayKit/Layout/ASLayoutable.mm | 40 ++++++++++++++++++++ AsyncDisplayKit/Layout/ASLayoutablePrivate.h | 13 +++++++ 5 files changed, 71 insertions(+), 10 deletions(-) create mode 100644 AsyncDisplayKit/Layout/ASLayoutable.mm diff --git a/AsyncDisplayKit.xcodeproj/project.pbxproj b/AsyncDisplayKit.xcodeproj/project.pbxproj index 5ca1e6d857..b971702a74 100644 --- a/AsyncDisplayKit.xcodeproj/project.pbxproj +++ b/AsyncDisplayKit.xcodeproj/project.pbxproj @@ -266,13 +266,13 @@ 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 */; }; - 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 */; }; 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 */; }; + 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 */; }; 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 */; }; @@ -524,6 +524,8 @@ DECBD6EA1BE56E1900CF4905 /* ASButtonNode.mm in Sources */ = {isa = PBXBuildFile; fileRef = DECBD6E61BE56E1900CF4905 /* ASButtonNode.mm */; }; E52405B31C8FEF03004DC8E7 /* ASDisplayNodeLayoutContext.mm in Sources */ = {isa = PBXBuildFile; fileRef = E52405B21C8FEF03004DC8E7 /* ASDisplayNodeLayoutContext.mm */; }; E52405B51C8FEF16004DC8E7 /* ASDisplayNodeLayoutContext.h in Headers */ = {isa = PBXBuildFile; fileRef = E52405B41C8FEF16004DC8E7 /* ASDisplayNodeLayoutContext.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.m in Sources */ = {isa = PBXBuildFile; fileRef = E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.m */; }; @@ -742,11 +744,11 @@ 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 = ""; }; - 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 = ""; }; 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 = ""; }; + 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 = ""; }; 92DD2FE11BF4B97E0074C9DD /* ASMapNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASMapNode.h; sourceTree = ""; }; 92DD2FE21BF4B97E0074C9DD /* ASMapNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASMapNode.mm; sourceTree = ""; }; 92DD2FE51BF4D05E0074C9DD /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; @@ -808,7 +810,7 @@ ACF6ED471B17847A00DA7C62 /* ASStackPositionedLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASStackPositionedLayout.h; sourceTree = ""; }; ACF6ED481B17847A00DA7C62 /* ASStackPositionedLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASStackPositionedLayout.mm; sourceTree = ""; }; ACF6ED491B17847A00DA7C62 /* ASStackUnpositionedLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASStackUnpositionedLayout.h; sourceTree = ""; }; - ACF6ED4A1B17847A00DA7C62 /* ASStackUnpositionedLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASStackUnpositionedLayout.mm; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; + ACF6ED4A1B17847A00DA7C62 /* ASStackUnpositionedLayout.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; lineEnding = 0; path = ASStackUnpositionedLayout.mm; sourceTree = ""; }; ACF6ED531B178DC700DA7C62 /* ASCenterLayoutSpecSnapshotTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASCenterLayoutSpecSnapshotTests.mm; sourceTree = ""; }; ACF6ED541B178DC700DA7C62 /* ASDimensionTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASDimensionTests.mm; sourceTree = ""; }; ACF6ED551B178DC700DA7C62 /* ASInsetLayoutSpecSnapshotTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASInsetLayoutSpecSnapshotTests.mm; sourceTree = ""; }; @@ -860,6 +862,7 @@ DECBD6E61BE56E1900CF4905 /* ASButtonNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASButtonNode.mm; sourceTree = ""; }; E52405B21C8FEF03004DC8E7 /* ASDisplayNodeLayoutContext.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ASDisplayNodeLayoutContext.mm; sourceTree = ""; }; E52405B41C8FEF16004DC8E7 /* ASDisplayNodeLayoutContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASDisplayNodeLayoutContext.h; sourceTree = ""; }; + E55D86311CA8A14000A0C26F /* ASLayoutable.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ASLayoutable.mm; path = AsyncDisplayKit/Layout/ASLayoutable.mm; sourceTree = ""; }; E5711A2A1C840C81009619D4 /* ASIndexedNodeContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIndexedNodeContext.h; sourceTree = ""; }; E5711A2D1C840C96009619D4 /* ASIndexedNodeContext.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIndexedNodeContext.m; sourceTree = ""; }; EFA731F0396842FF8AB635EE /* libPods-AsyncDisplayKitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AsyncDisplayKitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1318,6 +1321,7 @@ ACF6ED0B1B17843500DA7C62 /* ASLayout.h */, ACF6ED0C1B17843500DA7C62 /* ASLayout.mm */, ACF6ED111B17843500DA7C62 /* ASLayoutable.h */, + E55D86311CA8A14000A0C26F /* ASLayoutable.mm */, 9CDC18CB1B910E12004965E2 /* ASLayoutablePrivate.h */, ACF6ED0D1B17843500DA7C62 /* ASLayoutSpec.h */, ACF6ED0E1B17843500DA7C62 /* ASLayoutSpec.mm */, @@ -1862,6 +1866,7 @@ buildActionMask = 2147483647; files = ( 058D0A22195D050800B7D73C /* _ASAsyncTransaction.mm in Sources */, + E55D86321CA8A14000A0C26F /* ASLayoutable.mm in Sources */, 058D0A23195D050800B7D73C /* _ASAsyncTransactionContainer.m in Sources */, 058D0A24195D050800B7D73C /* _ASAsyncTransactionGroup.m in Sources */, DBDB83961C6E879900D0098C /* ASPagerFlowLayout.m in Sources */, @@ -2037,6 +2042,7 @@ AC47D9421B3B891B00AAEE9D /* ASCellNode.m in Sources */, 34EFC7641B701CC600AD841F /* ASCenterLayoutSpec.mm in Sources */, 18C2ED831B9B7DE800F627B3 /* ASCollectionNode.mm in Sources */, + E55D86331CA8A14000A0C26F /* ASLayoutable.mm in Sources */, B35061F61B010EFD0018CF92 /* ASCollectionView.mm in Sources */, 509E68641B3AEDB7009B9150 /* ASCollectionViewLayoutController.mm in Sources */, B35061F91B010EFD0018CF92 /* ASControlNode.mm in Sources */, @@ -2090,7 +2096,6 @@ 9C8221981BA237B80037F19A /* ASStackBaselinePositionedLayout.mm in Sources */, 34EFC7721B701D0300AD841F /* ASStackLayoutSpec.mm in Sources */, 34EFC7761B701D2A00AD841F /* ASStackPositionedLayout.mm in Sources */, - DECC2ED01C35C1C600388446 /* ASRangeControllerBeta.mm in Sources */, 7AB338661C55B3420055FDE8 /* ASRelativeLayoutSpec.mm in Sources */, 34EFC7781B701D3100AD841F /* ASStackUnpositionedLayout.mm in Sources */, DE84918E1C8FFF9F003D89E9 /* ASRunLoopQueue.mm in Sources */, diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index e92f325283..d8aa578a8a 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -630,7 +630,8 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) return NO; } - if (ASHierarchyStateIncludesLayoutPending(_hierarchyState) && constrainedSize.transitionID != _pendingTransitionID) { + if (ASHierarchyStateIncludesLayoutPending(_hierarchyState) + && _pendingTransitionID != ASLayoutableGetLayoutableContext().transitionID) { return NO; } @@ -668,8 +669,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } int32_t transitionID = [self _newTransitionID]; - constrainedSize.transitionID = transitionID; - + ASDisplayNodePerformBlockOnEverySubnode(self, ^(ASDisplayNode * _Nonnull node) { ASDisplayNodeAssert([node _hasTransitionsInProgress] == NO, @"Can't start a transition when one of the subnodes is performing one."); node.hierarchyState |= ASHierarchyStateLayoutPending; @@ -679,6 +679,8 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) void (^transitionBlock)() = ^{ ASLayout *newLayout; { + ASLayoutableSetLayoutableContext(ASLayoutableContextMake(transitionID, NO)); + ASDN::MutexLocker l(_propertyLock); BOOL disableImplicitHierarchyManagement = self.usesImplicitHierarchyManagement == NO; self.usesImplicitHierarchyManagement = YES; // Temporary flag for 1.9.x @@ -686,6 +688,8 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) if (disableImplicitHierarchyManagement) { self.usesImplicitHierarchyManagement = NO; // Temporary flag for 1.9.x } + + ASLayoutableResetLayoutableContext(); } if ([self _shouldAbortTransitionWithID:transitionID]) { diff --git a/AsyncDisplayKit/Layout/ASDimension.h b/AsyncDisplayKit/Layout/ASDimension.h index c8b0093830..3dba264468 100644 --- a/AsyncDisplayKit/Layout/ASDimension.h +++ b/AsyncDisplayKit/Layout/ASDimension.h @@ -30,7 +30,6 @@ typedef struct { typedef struct { CGSize min; CGSize max; - int32_t transitionID; } ASSizeRange; extern ASRelativeDimension const ASRelativeDimensionUnconstrained; diff --git a/AsyncDisplayKit/Layout/ASLayoutable.mm b/AsyncDisplayKit/Layout/ASLayoutable.mm new file mode 100644 index 0000000000..6f793de41b --- /dev/null +++ b/AsyncDisplayKit/Layout/ASLayoutable.mm @@ -0,0 +1,40 @@ +// +// ASLayoutablePrivate.mm +// AsyncDisplayKit +// +// Created by Huy Nguyen on 3/27/16. +// Copyright © 2016 Facebook. All rights reserved. +// + +#import "ASLayoutablePrivate.h" +#import "pthread.h" +#import + +ASLayoutableContext ASLayoutableContextMake(int32_t transitionID, BOOL needsVisualizeNode) +{ + struct ASLayoutableContext context; + context.transitionID = transitionID; + context.needsVisualizeNode = needsVisualizeNode; + return context; +} + +static std::map layoutableContextMap; + +static inline mach_port_t ASLayoutableGetLayoutableContextKey() +{ + return pthread_mach_thread_np(pthread_self()); +} + +void ASLayoutableSetLayoutableContext(struct ASLayoutableContext context) +{ + layoutableContextMap[ASLayoutableGetLayoutableContextKey()] = context; +} + +struct ASLayoutableContext ASLayoutableGetLayoutableContext() +{ + return layoutableContextMap[ASLayoutableGetLayoutableContextKey()]; +} + +void ASLayoutableResetLayoutableContext() { + layoutableContextMap.erase(ASLayoutableGetLayoutableContextKey()); +} diff --git a/AsyncDisplayKit/Layout/ASLayoutablePrivate.h b/AsyncDisplayKit/Layout/ASLayoutablePrivate.h index f52dd54ad6..272c9b5df3 100644 --- a/AsyncDisplayKit/Layout/ASLayoutablePrivate.h +++ b/AsyncDisplayKit/Layout/ASLayoutablePrivate.h @@ -14,6 +14,19 @@ @class ASLayoutOptions; @protocol ASLayoutable; +struct ASLayoutableContext { + int32_t transitionID; + BOOL needsVisualizeNode; +}; + +extern struct ASLayoutableContext ASLayoutableContextMake(int32_t transitionID, BOOL needsVisualizeNode); + +extern void ASLayoutableSetLayoutableContext(struct ASLayoutableContext context); + +extern struct ASLayoutableContext ASLayoutableGetLayoutableContext(); + +extern void ASLayoutableResetLayoutableContext(); + /** * The base protocol for ASLayoutable. Generally the methods/properties in this class do not need to be * called by the end user and are only called internally. However, there may be a case where the methods are useful. From 7bb3015950bab32ac1cb5b66fade3e6ff21e41db Mon Sep 17 00:00:00 2001 From: Huy Nguyen Date: Sun, 27 Mar 2016 17:36:31 -0700 Subject: [PATCH 15/18] Rename ASLayoutableContext methods --- AsyncDisplayKit/ASDisplayNode.mm | 6 +++--- AsyncDisplayKit/Layout/ASLayoutable.mm | 14 +++++++------- AsyncDisplayKit/Layout/ASLayoutablePrivate.h | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index d8aa578a8a..c0d1ffa0ff 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -631,7 +631,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) } if (ASHierarchyStateIncludesLayoutPending(_hierarchyState) - && _pendingTransitionID != ASLayoutableGetLayoutableContext().transitionID) { + && _pendingTransitionID != ASLayoutableGetCurrentContext().transitionID) { return NO; } @@ -679,7 +679,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) void (^transitionBlock)() = ^{ ASLayout *newLayout; { - ASLayoutableSetLayoutableContext(ASLayoutableContextMake(transitionID, NO)); + ASLayoutableSetCurrentContext(ASLayoutableContextMake(transitionID, NO)); ASDN::MutexLocker l(_propertyLock); BOOL disableImplicitHierarchyManagement = self.usesImplicitHierarchyManagement == NO; @@ -689,7 +689,7 @@ static ASDisplayNodeMethodOverrides GetASDisplayNodeMethodOverrides(Class c) self.usesImplicitHierarchyManagement = NO; // Temporary flag for 1.9.x } - ASLayoutableResetLayoutableContext(); + ASLayoutableClearCurrentContext(); } if ([self _shouldAbortTransitionWithID:transitionID]) { diff --git a/AsyncDisplayKit/Layout/ASLayoutable.mm b/AsyncDisplayKit/Layout/ASLayoutable.mm index 6f793de41b..2af312c56e 100644 --- a/AsyncDisplayKit/Layout/ASLayoutable.mm +++ b/AsyncDisplayKit/Layout/ASLayoutable.mm @@ -20,21 +20,21 @@ ASLayoutableContext ASLayoutableContextMake(int32_t transitionID, BOOL needsVisu static std::map layoutableContextMap; -static inline mach_port_t ASLayoutableGetLayoutableContextKey() +static inline mach_port_t ASLayoutableGetCurrentContextKey() { return pthread_mach_thread_np(pthread_self()); } -void ASLayoutableSetLayoutableContext(struct ASLayoutableContext context) +void ASLayoutableSetCurrentContext(struct ASLayoutableContext context) { - layoutableContextMap[ASLayoutableGetLayoutableContextKey()] = context; + layoutableContextMap[ASLayoutableGetCurrentContextKey()] = context; } -struct ASLayoutableContext ASLayoutableGetLayoutableContext() +struct ASLayoutableContext ASLayoutableGetCurrentContext() { - return layoutableContextMap[ASLayoutableGetLayoutableContextKey()]; + return layoutableContextMap[ASLayoutableGetCurrentContextKey()]; } -void ASLayoutableResetLayoutableContext() { - layoutableContextMap.erase(ASLayoutableGetLayoutableContextKey()); +void ASLayoutableClearCurrentContext() { + layoutableContextMap.erase(ASLayoutableGetCurrentContextKey()); } diff --git a/AsyncDisplayKit/Layout/ASLayoutablePrivate.h b/AsyncDisplayKit/Layout/ASLayoutablePrivate.h index 272c9b5df3..832bcf96c1 100644 --- a/AsyncDisplayKit/Layout/ASLayoutablePrivate.h +++ b/AsyncDisplayKit/Layout/ASLayoutablePrivate.h @@ -21,11 +21,11 @@ struct ASLayoutableContext { extern struct ASLayoutableContext ASLayoutableContextMake(int32_t transitionID, BOOL needsVisualizeNode); -extern void ASLayoutableSetLayoutableContext(struct ASLayoutableContext context); +extern void ASLayoutableSetCurrentContext(struct ASLayoutableContext context); -extern struct ASLayoutableContext ASLayoutableGetLayoutableContext(); +extern struct ASLayoutableContext ASLayoutableGetCurrentContext(); -extern void ASLayoutableResetLayoutableContext(); +extern void ASLayoutableClearCurrentContext(); /** * The base protocol for ASLayoutable. Generally the methods/properties in this class do not need to be From 3e2414da6fbfd972f7ea9d911720f0c2bf1ab13f Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sun, 27 Mar 2016 18:15:40 -0700 Subject: [PATCH 16/18] [ASInterfaceState] Fix for an edge case of exiting Visible state before node deallocation. --- AsyncDisplayKit/Details/_ASDisplayView.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/AsyncDisplayKit/Details/_ASDisplayView.mm b/AsyncDisplayKit/Details/_ASDisplayView.mm index 22477a0490..f4d95b99b8 100644 --- a/AsyncDisplayKit/Details/_ASDisplayView.mm +++ b/AsyncDisplayKit/Details/_ASDisplayView.mm @@ -90,6 +90,11 @@ self.keepalive_node = _node; } 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) { + [_node __exitHierarchy]; + } self.keepalive_node = nil; } From cd493358cc802d878101a618676bea23de07e7fc Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Sun, 27 Mar 2016 22:02:13 -0700 Subject: [PATCH 17/18] [ASControlNode] Upgrades to +setEnableHitTestDebug: to intersect hitTestSlop with parents' bounds+slop, to accurately predict and visualize UIKit event delivery edge cases. --- AsyncDisplayKit/ASControlNode.mm | 45 +++++++++++++++++++++++++------- AsyncDisplayKit/ASDisplayNode.mm | 2 ++ AsyncDisplayKit/ASImageNode.mm | 14 +++++----- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/AsyncDisplayKit/ASControlNode.mm b/AsyncDisplayKit/ASControlNode.mm index 41b41b091d..247752d523 100644 --- a/AsyncDisplayKit/ASControlNode.mm +++ b/AsyncDisplayKit/ASControlNode.mm @@ -9,6 +9,8 @@ #import "ASControlNode.h" #import "ASControlNode+Subclasses.h" #import "ASThread.h" +#import "ASDisplayNodeExtras.h" +#import "ASImageNode.h" // UIControl allows dragging some distance outside of the control itself during // tracking. This value depends on the device idiom (25 or 70 points), so @@ -73,7 +75,7 @@ static BOOL _enableHitTestDebug = NO; @implementation ASControlNode { - ASDisplayNode *_debugHighlightOverlay; + ASImageNode *_debugHighlightOverlay; } #pragma mark - Lifecycle @@ -251,10 +253,10 @@ static BOOL _enableHitTestDebug = NO; // add a highlight overlay node with area of ASControlNode + UIEdgeInsets self.clipsToBounds = NO; - _debugHighlightOverlay = [[ASDisplayNode alloc] init]; + _debugHighlightOverlay = [[ASImageNode alloc] init]; + _debugHighlightOverlay.zPosition = 1000; // CALayer doesn't have -moveSublayerToFront, but this will ensure we're over the top of any siblings. _debugHighlightOverlay.layerBacked = YES; - _debugHighlightOverlay.backgroundColor = [[UIColor greenColor] colorWithAlphaComponent:0.5]; - + _debugHighlightOverlay.backgroundColor = [[UIColor greenColor] colorWithAlphaComponent:0.4]; [self addSubnode:_debugHighlightOverlay]; } } @@ -461,12 +463,35 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v [super layout]; if (_debugHighlightOverlay) { - UIEdgeInsets insets = [self hitTestSlop]; - CGRect controlNodeRect = self.bounds; - _debugHighlightOverlay.frame = CGRectMake(controlNodeRect.origin.x + insets.left, - controlNodeRect.origin.y + insets.top, - controlNodeRect.size.width - insets.left - insets.right, - controlNodeRect.size.height - insets.top - insets.bottom); + + // Even if our parents don't have clipsToBounds set and would allow us to display the debug overlay, UIKit event delivery (hitTest:) + // will not search sub-hierarchies if one of our parents does not return YES for pointInside:. In such a scenario, hitTestSlop + // may not be able to expand the tap target as much as desired without also setting some hitTestSlop on the limiting parents. + CGRect intersectRect = UIEdgeInsetsInsetRect(self.bounds, [self hitTestSlop]); + CALayer *layer = self.layer; + CALayer *intersectLayer = layer; + CALayer *intersectSuperlayer = layer.superlayer; + + // Stop climbing if we encounter a UIScrollView, as its offset bounds origin may make it seem like our events will be clipped when + // scrolling will actually reveal them (because this process will not re-run due to scrolling) + while (intersectSuperlayer && ![intersectSuperlayer.delegate respondsToSelector:@selector(contentOffset)]) { + // Get our parent's tappable bounds. If the parent has an associated node, consider hitTestSlop, as it will extend its pointInside:. + CGRect parentHitRect = intersectSuperlayer.bounds; + ASDisplayNode *parentNode = ASLayerToDisplayNode(intersectSuperlayer); + if (parentNode) { + parentHitRect = UIEdgeInsetsInsetRect(parentHitRect, [parentNode hitTestSlop]); + } + + // Convert our current rectangle to parent coordinates, and intersect with the parent's hit rect. + CGRect intersectRectInParentCoordinates = [intersectSuperlayer convertRect:intersectRect fromLayer:intersectLayer]; + intersectRect = CGRectIntersection(parentHitRect, intersectRectInParentCoordinates); + + // Advance up the tree. + intersectLayer = intersectSuperlayer; + intersectSuperlayer = intersectLayer.superlayer; + } + + _debugHighlightOverlay.frame = [intersectLayer convertRect:intersectRect toLayer:layer]; } } diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index 17797a62af..ae7fff8f64 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2383,11 +2383,13 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) return [superview gestureRecognizerShouldBegin:gestureRecognizer]; } +#if DEBUG - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { ASDisplayNodeAssertMainThread(); return [_view hitTest:point withEvent:event]; } +#endif - (void)setHitTestSlop:(UIEdgeInsets)hitTestSlop { diff --git a/AsyncDisplayKit/ASImageNode.mm b/AsyncDisplayKit/ASImageNode.mm index 7c27ed561a..3ab12e565a 100644 --- a/AsyncDisplayKit/ASImageNode.mm +++ b/AsyncDisplayKit/ASImageNode.mm @@ -100,12 +100,6 @@ _cropDisplayBounds = CGRectNull; _placeholderColor = ASDisplayNodeDefaultPlaceholderColor(); - if ([ASImageNode shouldShowImageScalingOverlay]) { - _debugLabelNode = [[ASTextNode alloc] init]; - _debugLabelNode.layerBacked = YES; - [self addSubnode:_debugLabelNode]; - } - return self; } @@ -144,6 +138,14 @@ [self invalidateCalculatedLayout]; if (image) { [self setNeedsDisplay]; + + if ([ASImageNode shouldShowImageScalingOverlay]) { + ASPerformBlockOnMainThread(^{ + _debugLabelNode = [[ASTextNode alloc] init]; + _debugLabelNode.layerBacked = YES; + [self addSubnode:_debugLabelNode]; + }); + } } else { self.contents = nil; } From 096df7b385a4255f8e96e337440ced6da3d150ee Mon Sep 17 00:00:00 2001 From: Scott Goodson Date: Mon, 28 Mar 2016 07:49:14 -0700 Subject: [PATCH 18/18] [ASDisplayNode] Remove #if gating of ASDisplayNode hitTest: (I'd misread this as _ASDisplayView's implementation, and both are needed). --- AsyncDisplayKit/ASControlNode.mm | 1 - AsyncDisplayKit/ASDisplayNode.mm | 2 -- 2 files changed, 3 deletions(-) diff --git a/AsyncDisplayKit/ASControlNode.mm b/AsyncDisplayKit/ASControlNode.mm index 247752d523..dd576f5ae5 100644 --- a/AsyncDisplayKit/ASControlNode.mm +++ b/AsyncDisplayKit/ASControlNode.mm @@ -500,5 +500,4 @@ void _ASEnumerateControlEventsIncludedInMaskWithBlock(ASControlNodeEvent mask, v _enableHitTestDebug = enable; } - @end diff --git a/AsyncDisplayKit/ASDisplayNode.mm b/AsyncDisplayKit/ASDisplayNode.mm index ae7fff8f64..17797a62af 100644 --- a/AsyncDisplayKit/ASDisplayNode.mm +++ b/AsyncDisplayKit/ASDisplayNode.mm @@ -2383,13 +2383,11 @@ void recursivelyTriggerDisplayForLayer(CALayer *layer, BOOL shouldBlock) return [superview gestureRecognizerShouldBegin:gestureRecognizer]; } -#if DEBUG - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { ASDisplayNodeAssertMainThread(); return [_view hitTest:point withEvent:event]; } -#endif - (void)setHitTestSlop:(UIEdgeInsets)hitTestSlop {