diff --git a/AsyncDisplayKit.podspec b/AsyncDisplayKit.podspec index f094a38b55..b9d55b39d2 100644 --- a/AsyncDisplayKit.podspec +++ b/AsyncDisplayKit.podspec @@ -69,6 +69,5 @@ Pod::Spec.new do |spec| } spec.ios.deployment_target = '7.0' - # tvOS not recognized by older versions of Cocoapods - add this only after tvOS support complete. - # spec.tvos.deployment_target = '9.0' + spec.tvos.deployment_target = '9.0' end diff --git a/examples/ASCollectionView/Podfile b/examples/ASCollectionView/Podfile index ff6637ee68..5c30ce798e 100644 --- a/examples/ASCollectionView/Podfile +++ b/examples/ASCollectionView/Podfile @@ -1,5 +1,6 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end + diff --git a/examples/ASCollectionView/Sample.xcworkspace/contents.xcworkspacedata b/examples/ASCollectionView/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/ASCollectionView/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/ASDKgram/Podfile b/examples/ASDKgram/Podfile index ff6637ee68..5c30ce798e 100644 --- a/examples/ASDKgram/Podfile +++ b/examples/ASDKgram/Podfile @@ -1,5 +1,6 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end + diff --git a/examples/ASDKgram/Sample.xcworkspace/contents.xcworkspacedata b/examples/ASDKgram/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/ASDKgram/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/ASTableViewStressTest/Default-568h@2x.png b/examples/ASTableViewStressTest/Default-568h@2x.png deleted file mode 100644 index 6ee80b9393..0000000000 Binary files a/examples/ASTableViewStressTest/Default-568h@2x.png and /dev/null differ diff --git a/examples/ASTableViewStressTest/Default-667h@2x.png b/examples/ASTableViewStressTest/Default-667h@2x.png deleted file mode 100644 index e7b975e21b..0000000000 Binary files a/examples/ASTableViewStressTest/Default-667h@2x.png and /dev/null differ diff --git a/examples/ASTableViewStressTest/Default-736h@3x.png b/examples/ASTableViewStressTest/Default-736h@3x.png deleted file mode 100644 index c8949cae16..0000000000 Binary files a/examples/ASTableViewStressTest/Default-736h@3x.png and /dev/null differ diff --git a/examples/ASTableViewStressTest/Podfile b/examples/ASTableViewStressTest/Podfile deleted file mode 100644 index ff6637ee68..0000000000 --- a/examples/ASTableViewStressTest/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' -target 'Sample' do - pod 'AsyncDisplayKit', :path => '../..' -end diff --git a/examples/ASTableViewStressTest/Sample.xcodeproj/project.pbxproj b/examples/ASTableViewStressTest/Sample.xcodeproj/project.pbxproj deleted file mode 100644 index 3e68545a8d..0000000000 --- a/examples/ASTableViewStressTest/Sample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,363 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 0585428019D4DBE100606EA6 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 0585427F19D4DBE100606EA6 /* Default-568h@2x.png */; }; - 05E2128719D4DB510098F589 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 05E2128619D4DB510098F589 /* main.m */; }; - 05E2128A19D4DB510098F589 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 05E2128919D4DB510098F589 /* AppDelegate.m */; }; - 05E2128D19D4DB510098F589 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 05E2128C19D4DB510098F589 /* ViewController.m */; }; - 6C2C82AC19EE274300767484 /* Default-667h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C2C82AA19EE274300767484 /* Default-667h@2x.png */; }; - 6C2C82AD19EE274300767484 /* Default-736h@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6C2C82AB19EE274300767484 /* Default-736h@3x.png */; }; - 881AF5D3D4458C15BACC8930 /* libPods-Sample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D65D3016E9D596BDDD17FA44 /* libPods-Sample.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 0431779F19E096F3CEC4D269 /* Pods-Sample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.release.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig"; sourceTree = ""; }; - 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 = ""; }; - 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; }; - D65D3016E9D596BDDD17FA44 /* libPods-Sample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Sample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - DBA49A0CCF4CA8FC1F96CB6D /* Pods-Sample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 05E2127E19D4DB510098F589 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 881AF5D3D4458C15BACC8930 /* libPods-Sample.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 = ( - D65D3016E9D596BDDD17FA44 /* libPods-Sample.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 1AE410B73DA5C3BD087ACDD7 /* Pods */ = { - isa = PBXGroup; - children = ( - DBA49A0CCF4CA8FC1F96CB6D /* Pods-Sample.debug.xcconfig */, - 0431779F19E096F3CEC4D269 /* Pods-Sample.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 */, - 75CADB9ECE58AB74892E1D67 /* Embed Pods Frameworks */, - ); - 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 */ - 75CADB9ECE58AB74892E1D67 /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 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-Sample/Pods-Sample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 05E2127D19D4DB510098F589 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 05E2128D19D4DB510098F589 /* ViewController.m in Sources */, - 05E2128A19D4DB510098F589 /* AppDelegate.m in Sources */, - 05E2128719D4DB510098F589 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 05E212A219D4DB510098F589 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - 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 = DBA49A0CCF4CA8FC1F96CB6D /* Pods-Sample.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_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 05E212A619D4DB510098F589 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 0431779F19E096F3CEC4D269 /* Pods-Sample.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_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 05E2127C19D4DB510098F589 /* Build configuration list for PBXProject "Sample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 05E212A219D4DB510098F589 /* Debug */, - 05E212A319D4DB510098F589 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 05E212A419D4DB510098F589 /* Build configuration list for PBXNativeTarget "Sample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 05E212A519D4DB510098F589 /* Debug */, - 05E212A619D4DB510098F589 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 05E2127919D4DB510098F589 /* Project object */; -} diff --git a/examples/ASTableViewStressTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/ASTableViewStressTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a80c038249..0000000000 --- a/examples/ASTableViewStressTest/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/ASTableViewStressTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/ASTableViewStressTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme deleted file mode 100644 index 5c91bfc64d..0000000000 --- a/examples/ASTableViewStressTest/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/ASTableViewStressTest/Sample/AppDelegate.h b/examples/ASTableViewStressTest/Sample/AppDelegate.h deleted file mode 100644 index 2aa29369b4..0000000000 --- a/examples/ASTableViewStressTest/Sample/AppDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/examples/ASTableViewStressTest/Sample/AppDelegate.m b/examples/ASTableViewStressTest/Sample/AppDelegate.m deleted file mode 100644 index 50382b9daa..0000000000 --- a/examples/ASTableViewStressTest/Sample/AppDelegate.m +++ /dev/null @@ -1,49 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "ViewController.h" - -#import -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.backgroundColor = [UIColor whiteColor]; - self.window.rootViewController = [[UINavigationController alloc] init]; - - [self pushNewViewControllerAnimated:NO]; - - [self.window makeKeyAndVisible]; - - return YES; -} - -- (void)pushNewViewControllerAnimated:(BOOL)animated -{ - UINavigationController *navController = (UINavigationController *)self.window.rootViewController; - - UIViewController *viewController = [[ViewController alloc] init]; - viewController.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Push Another Copy" style:UIBarButtonItemStylePlain target:self action:@selector(pushNewViewController)]; - - [navController pushViewController:viewController animated:animated]; -} - -- (void)pushNewViewController -{ - [self pushNewViewControllerAnimated:YES]; -} - -@end \ No newline at end of file diff --git a/examples/ASTableViewStressTest/Sample/Info.plist b/examples/ASTableViewStressTest/Sample/Info.plist deleted file mode 100644 index ad825d6e33..0000000000 --- a/examples/ASTableViewStressTest/Sample/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - org.AsyncDisplayKit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/examples/ASTableViewStressTest/Sample/ViewController.h b/examples/ASTableViewStressTest/Sample/ViewController.h deleted file mode 100644 index d0e9200d88..0000000000 --- a/examples/ASTableViewStressTest/Sample/ViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface ViewController : UIViewController - -@end diff --git a/examples/ASTableViewStressTest/Sample/ViewController.m b/examples/ASTableViewStressTest/Sample/ViewController.m deleted file mode 100644 index f2b02e5594..0000000000 --- a/examples/ASTableViewStressTest/Sample/ViewController.m +++ /dev/null @@ -1,194 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "ViewController.h" - -#import -#import - -#define NumberOfSections 10 -#define NumberOfRowsPerSection 20 -#define NumberOfReloadIterations 50 - -typedef enum : NSUInteger { - ReloadData, - ReloadRows, - ReloadSections, - ReloadTypeMax -} ReloadType; - -@interface ViewController () -{ - ASTableView *_tableView; - NSMutableArray *_sections; // Contains arrays of indexPaths representing rows -} - -@end - - -@implementation ViewController - -- (instancetype)init -{ - if (!(self = [super init])) - return nil; - - _tableView = [[ASTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain asyncDataFetching:YES]; - _tableView.asyncDataSource = self; - _tableView.asyncDelegate = self; - _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; - - _sections = [NSMutableArray arrayWithCapacity:NumberOfSections]; - for (int i = 0; i < NumberOfSections; i++) { - NSMutableArray *rowsArray = [NSMutableArray arrayWithCapacity:NumberOfRowsPerSection]; - for (int j = 0; j < NumberOfRowsPerSection; j++) { - [rowsArray addObject:[NSIndexPath indexPathForRow:j inSection:i]]; - } - [_sections addObject:rowsArray]; - } - - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - [self.view addSubview:_tableView]; -} - -- (void)viewWillLayoutSubviews -{ - _tableView.frame = self.view.bounds; -} - -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; - - [self thrashTableView]; -} - -- (NSIndexSet *)randomIndexSet -{ - u_int32_t upperBound = (u_int32_t)_sections.count - 1; - u_int32_t randA = arc4random_uniform(upperBound); - u_int32_t randB = arc4random_uniform(upperBound); - - return [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(MIN(randA, randB), MAX(randA, randB) - MIN(randA, randB))]; -} - -- (NSArray *)randomIndexPathsExisting:(BOOL)existing -{ - NSMutableArray *indexPaths = [NSMutableArray array]; - [[self randomIndexSet] enumerateIndexesUsingBlock:^(NSUInteger idx, BOOL *stop) { - NSUInteger rowNum = [self tableView:_tableView numberOfRowsInSection:idx]; - NSIndexPath *sectionIndex = [[NSIndexPath alloc] initWithIndex:idx]; - for (NSUInteger i = (existing ? 0 : rowNum); i < (existing ? rowNum : rowNum * 2); i++) { - // Maximize evility by sporadically skipping indicies 1/3rd of the time, but only if reloading existing rows - if (existing && arc4random_uniform(2) == 0) { - continue; - } - - NSIndexPath *indexPath = [sectionIndex indexPathByAddingIndex:i]; - [indexPaths addObject:indexPath]; - } - }]; - return indexPaths; -} - -- (void)thrashTableView -{ - [_tableView reloadData]; - - NSArray *indexPathsAddedAndRemoved = nil; - - for (int i = 0; i < NumberOfReloadIterations; ++i) { - UITableViewRowAnimation rowAnimation = (arc4random_uniform(1) == 0 ? UITableViewRowAnimationMiddle : UITableViewRowAnimationNone); - - BOOL animatedScroll = (arc4random_uniform(2) == 0 ? YES : NO); - ReloadType reloadType = (arc4random_uniform(ReloadTypeMax)); - BOOL letRunloopProceed = (arc4random_uniform(2) == 0 ? YES : NO); - BOOL useBeginEndUpdates = (arc4random_uniform(3) == 0 ? YES : NO); - - // FIXME: Need to revise the logic to support mutating the data source rather than just reload thrashing. - // UITableView itself does not support deleting a row in the same edit transaction as reloading it, for example. - BOOL addIndexPaths = NO; //(arc4random_uniform(2) == 0 ? YES : NO); - - if (useBeginEndUpdates) { - [_tableView beginUpdates]; - } - - switch (reloadType) { - case ReloadData: - [_tableView reloadData]; - break; - - case ReloadRows: - [_tableView reloadRowsAtIndexPaths:[self randomIndexPathsExisting:YES] withRowAnimation:rowAnimation]; - break; - - case ReloadSections: - [_tableView reloadSections:[self randomIndexSet] withRowAnimation:rowAnimation]; - break; - - default: - break; - } - - if (addIndexPaths && !indexPathsAddedAndRemoved) { - indexPathsAddedAndRemoved = [self randomIndexPathsExisting:NO]; - for (NSIndexPath *indexPath in indexPathsAddedAndRemoved) { - [_sections[indexPath.section] addObject:indexPath]; - } - [_tableView insertRowsAtIndexPaths:indexPathsAddedAndRemoved withRowAnimation:rowAnimation]; - } - - [_tableView setContentOffset:CGPointMake(0, arc4random_uniform(_tableView.contentSize.height - _tableView.bounds.size.height)) animated:animatedScroll]; - - if (letRunloopProceed) { - // Run other stuff on the main queue for between 2ms and 1000ms. - [[NSRunLoop currentRunLoop] runUntilDate:[NSDate dateWithTimeIntervalSinceNow:(1 / (1 + arc4random_uniform(500)))]]; - - if (indexPathsAddedAndRemoved) { - for (NSIndexPath *indexPath in indexPathsAddedAndRemoved) { - [_sections[indexPath.section] removeObjectIdenticalTo:indexPath]; - } - [_tableView deleteRowsAtIndexPaths:indexPathsAddedAndRemoved withRowAnimation:rowAnimation]; - indexPathsAddedAndRemoved = nil; - } - } - - if (useBeginEndUpdates) { - [_tableView endUpdates]; - } - } -} - -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView -{ - return _sections.count; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return [(NSArray *)[_sections objectAtIndex:section] count]; -} - -- (ASCellNode *)tableView:(ASTableView *)tableView nodeForRowAtIndexPath:(NSIndexPath *)indexPath -{ - ASTextCellNode *textCellNode = [ASTextCellNode new]; - textCellNode.text = indexPath.description; - - return textCellNode; -} - -@end diff --git a/examples/ASTableViewStressTest/Sample/main.m b/examples/ASTableViewStressTest/Sample/main.m deleted file mode 100644 index ae9488711c..0000000000 --- a/examples/ASTableViewStressTest/Sample/main.m +++ /dev/null @@ -1,20 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/examples/ASViewController/Podfile b/examples/ASViewController/Podfile index 724da8c9e4..5c30ce798e 100644 --- a/examples/ASViewController/Podfile +++ b/examples/ASViewController/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/AnimatedGIF/Sample.xcworkspace/contents.xcworkspacedata b/examples/AnimatedGIF/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/AnimatedGIF/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/BackgroundPropertySetting/Podfile b/examples/BackgroundPropertySetting/Podfile index a7d9e63060..e077db444a 100644 --- a/examples/BackgroundPropertySetting/Podfile +++ b/examples/BackgroundPropertySetting/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' use_frameworks! target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' diff --git a/examples/BackgroundPropertySetting/Sample.xcworkspace/contents.xcworkspacedata b/examples/BackgroundPropertySetting/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/BackgroundPropertySetting/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/CarthageBuildTest/Cartfile b/examples/CarthageBuildTest/Cartfile index 75ef551216..5bacd1f329 100644 --- a/examples/CarthageBuildTest/Cartfile +++ b/examples/CarthageBuildTest/Cartfile @@ -1 +1 @@ -git "file:///build.sh/will/put/local/absolute/path/here" "master" +git "file:///Users/scottg/code/AsyncDisplayKit" "master" diff --git a/examples/CatDealsCollectionView/Podfile b/examples/CatDealsCollectionView/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/CatDealsCollectionView/Podfile +++ b/examples/CatDealsCollectionView/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/CatDealsCollectionView/Sample.xcworkspace/contents.xcworkspacedata b/examples/CatDealsCollectionView/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/CatDealsCollectionView/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/CollectionViewWithViewControllerCells/Podfile b/examples/CollectionViewWithViewControllerCells/Podfile deleted file mode 100644 index ff6637ee68..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' -target 'Sample' do - pod 'AsyncDisplayKit', :path => '../..' -end diff --git a/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/project.pbxproj b/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/project.pbxproj deleted file mode 100644 index c6fe60b900..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,826 +0,0 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 25A1FA831C02F7AC00193875 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - MosaicCollectionViewLayout.h - sourceTree - <group> - - 25A1FA841C02F7AC00193875 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - MosaicCollectionViewLayout.m - sourceTree - <group> - - 25A1FA851C02F7AC00193875 - - fileRef - 25A1FA841C02F7AC00193875 - isa - PBXBuildFile - - 4E5B5F4E697ED7E9DB2D6324 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh" - - showEnvVarsInLog - 0 - - 637D7C9FD46862FB6060DE4D - - fileRef - D9DB64B734017B22EADB64FD - isa - PBXBuildFile - - 90A2B9C5397C46134C8A793B - - children - - F594729764C63FA050734ED5 - D61D292E4C992F2B47A062A3 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - 9B92C87F1BC17D3000EE46B2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - SupplementaryNode.h - sourceTree - <group> - - 9B92C8801BC17D3000EE46B2 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - SupplementaryNode.m - sourceTree - <group> - - 9B92C8811BC17D3000EE46B2 - - fileRef - 9B92C8801BC17D3000EE46B2 - isa - PBXBuildFile - - 9BA2CEA01BB2579C00D18414 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - file.storyboard - path - Launchboard.storyboard - sourceTree - <group> - - 9BA2CEA11BB2579C00D18414 - - fileRef - 9BA2CEA01BB2579C00D18414 - isa - PBXBuildFile - - A6902C454C7661D0D277AC62 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Copy Pods Resources - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh" - - showEnvVarsInLog - 0 - - AC3C4A551A11F47200143C57 - - children - - AC3C4A601A11F47200143C57 - AC3C4A5F1A11F47200143C57 - 90A2B9C5397C46134C8A793B - D6E38FF0CB18E3F55CF06437 - - isa - PBXGroup - sourceTree - <group> - - AC3C4A561A11F47200143C57 - - attributes - - LastUpgradeCheck - 0610 - ORGANIZATIONNAME - Facebook - TargetAttributes - - AC3C4A5D1A11F47200143C57 - - CreatedOnToolsVersion - 6.1 - - - - buildConfigurationList - AC3C4A591A11F47200143C57 - compatibilityVersion - Xcode 3.2 - developmentRegion - English - hasScannedForEncodings - 0 - isa - PBXProject - knownRegions - - en - Base - - mainGroup - AC3C4A551A11F47200143C57 - productRefGroup - AC3C4A5F1A11F47200143C57 - projectDirPath - - projectReferences - - projectRoot - - targets - - AC3C4A5D1A11F47200143C57 - - - AC3C4A591A11F47200143C57 - - buildConfigurations - - AC3C4A7F1A11F47200143C57 - AC3C4A801A11F47200143C57 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - AC3C4A5A1A11F47200143C57 - - buildActionMask - 2147483647 - files - - 25A1FA851C02F7AC00193875 - AC3C4A6A1A11F47200143C57 - 9B92C8811BC17D3000EE46B2 - AC3C4A671A11F47200143C57 - AC3C4A641A11F47200143C57 - AEE6B3E51C16B65600238D20 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - AC3C4A5B1A11F47200143C57 - - buildActionMask - 2147483647 - files - - 637D7C9FD46862FB6060DE4D - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - AC3C4A5C1A11F47200143C57 - - buildActionMask - 2147483647 - files - - 9BA2CEA11BB2579C00D18414 - AC3C4A8E1A11F80C00143C57 - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - AC3C4A5D1A11F47200143C57 - - buildConfigurationList - AC3C4A811A11F47200143C57 - buildPhases - - F868CFBB21824CC9521B6588 - AC3C4A5A1A11F47200143C57 - AC3C4A5B1A11F47200143C57 - AC3C4A5C1A11F47200143C57 - A6902C454C7661D0D277AC62 - 4E5B5F4E697ED7E9DB2D6324 - - buildRules - - dependencies - - isa - PBXNativeTarget - name - Sample - productName - Sample - productReference - AC3C4A5E1A11F47200143C57 - productType - com.apple.product-type.application - - AC3C4A5E1A11F47200143C57 - - explicitFileType - wrapper.application - includeInIndex - 0 - isa - PBXFileReference - path - Sample.app - sourceTree - BUILT_PRODUCTS_DIR - - AC3C4A5F1A11F47200143C57 - - children - - AC3C4A5E1A11F47200143C57 - - isa - PBXGroup - name - Products - sourceTree - <group> - - AC3C4A601A11F47200143C57 - - children - - 25A1FA831C02F7AC00193875 - 25A1FA841C02F7AC00193875 - AC3C4A651A11F47200143C57 - AC3C4A661A11F47200143C57 - AC3C4A681A11F47200143C57 - AC3C4A691A11F47200143C57 - AC3C4A8D1A11F80C00143C57 - AC3C4A611A11F47200143C57 - 9B92C87F1BC17D3000EE46B2 - 9B92C8801BC17D3000EE46B2 - AEE6B3E31C16B65600238D20 - AEE6B3E41C16B65600238D20 - - indentWidth - 2 - isa - PBXGroup - path - Sample - sourceTree - <group> - tabWidth - 2 - usesTabs - 0 - - AC3C4A611A11F47200143C57 - - children - - AC3C4A621A11F47200143C57 - AC3C4A631A11F47200143C57 - 9BA2CEA01BB2579C00D18414 - - isa - PBXGroup - name - Supporting Files - sourceTree - <group> - - AC3C4A621A11F47200143C57 - - isa - PBXFileReference - lastKnownFileType - text.plist.xml - path - Info.plist - sourceTree - <group> - - AC3C4A631A11F47200143C57 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - main.m - sourceTree - <group> - - AC3C4A641A11F47200143C57 - - fileRef - AC3C4A631A11F47200143C57 - isa - PBXBuildFile - - AC3C4A651A11F47200143C57 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AppDelegate.h - sourceTree - <group> - - AC3C4A661A11F47200143C57 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - AppDelegate.m - sourceTree - <group> - - AC3C4A671A11F47200143C57 - - fileRef - AC3C4A661A11F47200143C57 - isa - PBXBuildFile - - AC3C4A681A11F47200143C57 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ViewController.h - sourceTree - <group> - - AC3C4A691A11F47200143C57 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ViewController.m - sourceTree - <group> - - AC3C4A6A1A11F47200143C57 - - fileRef - AC3C4A691A11F47200143C57 - isa - PBXBuildFile - - AC3C4A7F1A11F47200143C57 - - 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.1 - MTL_ENABLE_DEBUG_INFO - YES - ONLY_ACTIVE_ARCH - YES - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Debug - - AC3C4A801A11F47200143C57 - - 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.1 - MTL_ENABLE_DEBUG_INFO - NO - SDKROOT - iphoneos - TARGETED_DEVICE_FAMILY - 1,2 - VALIDATE_PRODUCT - YES - - isa - XCBuildConfiguration - name - Release - - AC3C4A811A11F47200143C57 - - buildConfigurations - - AC3C4A821A11F47200143C57 - AC3C4A831A11F47200143C57 - - defaultConfigurationIsVisible - 0 - defaultConfigurationName - Release - isa - XCConfigurationList - - AC3C4A821A11F47200143C57 - - baseConfigurationReference - F594729764C63FA050734ED5 - buildSettings - - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - INFOPLIST_FILE - Sample/Info.plist - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - LD_RUNPATH_SEARCH_PATHS - $(inherited) @executable_path/Frameworks - PRODUCT_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1 - - isa - XCBuildConfiguration - name - Debug - - AC3C4A831A11F47200143C57 - - baseConfigurationReference - D61D292E4C992F2B47A062A3 - buildSettings - - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME - LaunchImage - INFOPLIST_FILE - Sample/Info.plist - IPHONEOS_DEPLOYMENT_TARGET - 8.1 - LD_RUNPATH_SEARCH_PATHS - $(inherited) @executable_path/Frameworks - PRODUCT_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1 - - isa - XCBuildConfiguration - name - Release - - AC3C4A8D1A11F80C00143C57 - - isa - PBXFileReference - lastKnownFileType - folder.assetcatalog - path - Images.xcassets - sourceTree - <group> - - AC3C4A8E1A11F80C00143C57 - - fileRef - AC3C4A8D1A11F80C00143C57 - isa - PBXBuildFile - - AEE6B3E31C16B65600238D20 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - ImageViewController.h - sourceTree - <group> - - AEE6B3E41C16B65600238D20 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - ImageViewController.m - sourceTree - <group> - - AEE6B3E51C16B65600238D20 - - fileRef - AEE6B3E41C16B65600238D20 - isa - PBXBuildFile - - D61D292E4C992F2B47A062A3 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.release.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig - sourceTree - <group> - - D6E38FF0CB18E3F55CF06437 - - children - - D9DB64B734017B22EADB64FD - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - D9DB64B734017B22EADB64FD - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-Sample.a - sourceTree - BUILT_PRODUCTS_DIR - - F594729764C63FA050734ED5 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.debug.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig - sourceTree - <group> - - F868CFBB21824CC9521B6588 - - 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 - - - rootObject - AC3C4A561A11F47200143C57 - - diff --git a/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a80c038249..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme deleted file mode 100644 index f49edc75d6..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/CollectionViewWithViewControllerCells/Sample.xcworkspace/contents.xcworkspacedata b/examples/CollectionViewWithViewControllerCells/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/CollectionViewWithViewControllerCells/Sample/AppDelegate.h b/examples/CollectionViewWithViewControllerCells/Sample/AppDelegate.h deleted file mode 100644 index 2aa29369b4..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/AppDelegate.h +++ /dev/null @@ -1,18 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/AppDelegate.m b/examples/CollectionViewWithViewControllerCells/Sample/AppDelegate.m deleted file mode 100644 index 6d9b473532..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/AppDelegate.m +++ /dev/null @@ -1,29 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "ViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.backgroundColor = [UIColor whiteColor]; - self.window.rootViewController = [[ViewController alloc] init]; - - [self.window makeKeyAndVisible]; - - return YES; -} - -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/ImageViewController.h b/examples/CollectionViewWithViewControllerCells/Sample/ImageViewController.h deleted file mode 100644 index 668840d050..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/ImageViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface ImageViewController : UIViewController -- (instancetype)initWithImage:(UIImage *)image; -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/ImageViewController.m b/examples/CollectionViewWithViewControllerCells/Sample/ImageViewController.m deleted file mode 100644 index 77b35b8a32..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/ImageViewController.m +++ /dev/null @@ -1,50 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#import "ImageViewController.h" - -@interface ImageViewController () -@property (nonatomic) UIImageView *imageView; -@end - -@implementation ImageViewController - -- (instancetype)initWithImage:(UIImage *)image { - if (!(self = [super init])) { return nil; } - - self.imageView = [[UIImageView alloc] initWithImage:image]; - - return self; -} - -- (void)viewDidLoad { - [super viewDidLoad]; - - [self.view addSubview:self.imageView]; - - UIGestureRecognizer *tap = [[UIGestureRecognizer alloc] initWithTarget:self action:@selector(tapped)]; - [self.view addGestureRecognizer:tap]; - - self.imageView.contentMode = UIViewContentModeScaleAspectFill; -} - -- (void)tapped; -{ - NSLog(@"tapped!"); -} - -- (void)viewWillLayoutSubviews -{ - self.imageView.frame = self.view.bounds; -} - -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/LaunchImage.launchimage/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index f0fce54771..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default-568h@2x.png", - "minimum-system-version" : "7.0", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "scale" : "1x", - "orientation" : "portrait" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "orientation" : "portrait" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "filename" : "Default-568h@2x.png", - "subtype" : "retina4", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png deleted file mode 100644 index 1547a98454..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/LaunchImage.launchimage/Default-568h@2x.png and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_0.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_0.imageset/Contents.json deleted file mode 100644 index 4eaff61cc1..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_0.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_0.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_0.imageset/image_0.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_0.imageset/image_0.jpg deleted file mode 100644 index 4a365897ea..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_0.imageset/image_0.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_1.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_1.imageset/Contents.json deleted file mode 100644 index 80c90eca3e..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_1.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_1.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_1.imageset/image_1.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_1.imageset/image_1.jpg deleted file mode 100644 index 5cb4828f44..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_1.imageset/image_1.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_10.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_10.imageset/Contents.json deleted file mode 100644 index d61e934e39..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_10.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_10.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_10.imageset/image_10.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_10.imageset/image_10.jpg deleted file mode 100644 index ea5cd6d268..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_10.imageset/image_10.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_11.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_11.imageset/Contents.json deleted file mode 100644 index 94921077f9..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_11.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_11.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_11.imageset/image_11.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_11.imageset/image_11.jpg deleted file mode 100644 index e93c68e512..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_11.imageset/image_11.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_12.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_12.imageset/Contents.json deleted file mode 100644 index 61488a9fdc..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_12.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_12.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_12.imageset/image_12.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_12.imageset/image_12.jpg deleted file mode 100644 index d520b6d80f..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_12.imageset/image_12.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_13.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_13.imageset/Contents.json deleted file mode 100644 index 7f83f8a390..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_13.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_13.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_13.imageset/image_13.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_13.imageset/image_13.jpg deleted file mode 100644 index c0232370cd..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_13.imageset/image_13.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_2.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_2.imageset/Contents.json deleted file mode 100644 index 774cde7833..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_2.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_2.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_2.imageset/image_2.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_2.imageset/image_2.jpg deleted file mode 100644 index 175343454d..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_2.imageset/image_2.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_3.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_3.imageset/Contents.json deleted file mode 100644 index c0abe414cd..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_3.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_3.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_3.imageset/image_3.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_3.imageset/image_3.jpg deleted file mode 100644 index f5398cac79..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_3.imageset/image_3.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_4.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_4.imageset/Contents.json deleted file mode 100644 index 55a498a8a0..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_4.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_4.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_4.imageset/image_4.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_4.imageset/image_4.jpg deleted file mode 100644 index 2a6fe4c264..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_4.imageset/image_4.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_5.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_5.imageset/Contents.json deleted file mode 100644 index 9a1181e83b..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_5.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_5.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_5.imageset/image_5.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_5.imageset/image_5.jpg deleted file mode 100644 index 4e507b8064..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_5.imageset/image_5.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_6.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_6.imageset/Contents.json deleted file mode 100644 index 6aef7d6047..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_6.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_6.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_6.imageset/image_6.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_6.imageset/image_6.jpg deleted file mode 100644 index 35fe778b3a..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_6.imageset/image_6.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_7.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_7.imageset/Contents.json deleted file mode 100644 index acdb0e87f0..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_7.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_7.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_7.imageset/image_7.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_7.imageset/image_7.jpg deleted file mode 100644 index 8f5e037722..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_7.imageset/image_7.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_8.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_8.imageset/Contents.json deleted file mode 100644 index 40d616ed40..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_8.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_8.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_8.imageset/image_8.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_8.imageset/image_8.jpg deleted file mode 100644 index 5651436bb6..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_8.imageset/image_8.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_9.imageset/Contents.json b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_9.imageset/Contents.json deleted file mode 100644 index b3b3c74e12..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_9.imageset/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x", - "filename" : "image_9.jpg" - }, - { - "idiom" : "universal", - "scale" : "2x" - }, - { - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_9.imageset/image_9.jpg b/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_9.imageset/image_9.jpg deleted file mode 100644 index 9fb6e47d3f..0000000000 Binary files a/examples/CollectionViewWithViewControllerCells/Sample/Images.xcassets/image_9.imageset/image_9.jpg and /dev/null differ diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Info.plist b/examples/CollectionViewWithViewControllerCells/Sample/Info.plist deleted file mode 100644 index eeb71a8d35..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIcons - - CFBundleIcons~ipad - - CFBundleIdentifier - com.facebook.AsyncDisplayKit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UILaunchStoryboardName - Launchboard - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/examples/CollectionViewWithViewControllerCells/Sample/Launchboard.storyboard b/examples/CollectionViewWithViewControllerCells/Sample/Launchboard.storyboard deleted file mode 100644 index 673e0f7e68..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/Launchboard.storyboard +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/examples/CollectionViewWithViewControllerCells/Sample/MosaicCollectionViewLayout.h b/examples/CollectionViewWithViewControllerCells/Sample/MosaicCollectionViewLayout.h deleted file mode 100644 index 03b8af5f7c..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/MosaicCollectionViewLayout.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// MosaicCollectionViewLayout.h -// Sample -// -// Created by McCallum, Levi on 11/22/15. -// Copyright (c) 2015 Facebook. All rights reserved. -// - -#import -#import - -@interface MosaicCollectionViewLayout : UICollectionViewLayout - -@property (assign, nonatomic) NSUInteger numberOfColumns; -@property (assign, nonatomic) CGFloat columnSpacing; -@property (assign, nonatomic) UIEdgeInsets sectionInset; -@property (assign, nonatomic) UIEdgeInsets interItemSpacing; -@property (assign, nonatomic) CGFloat headerHeight; - -@end - -@protocol MosaicCollectionViewLayoutDelegate - -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(MosaicCollectionViewLayout *)layout originalItemSizeAtIndexPath:(NSIndexPath *)indexPath; - -@end - -@interface MosaicCollectionViewLayoutInspector : NSObject - -@end \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/MosaicCollectionViewLayout.m b/examples/CollectionViewWithViewControllerCells/Sample/MosaicCollectionViewLayout.m deleted file mode 100644 index 0e2c65d027..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/MosaicCollectionViewLayout.m +++ /dev/null @@ -1,230 +0,0 @@ -// -// MosaicCollectionViewLayout.m -// Sample -// -// Created by McCallum, Levi on 11/22/15. -// Copyright (c) 2015 Facebook. All rights reserved. -// - -#import "MosaicCollectionViewLayout.h" - -@implementation MosaicCollectionViewLayout { - NSMutableArray *_columnHeights; - NSMutableArray *_itemAttributes; - NSMutableDictionary *_headerAttributes; - NSMutableArray *_allAttributes; -} - -- (instancetype)init -{ - self = [super init]; - if (self != nil) { - self.numberOfColumns = 3; - self.columnSpacing = 10.0; - self.sectionInset = UIEdgeInsetsMake(10.0, 10.0, 10.0, 10.0); - self.interItemSpacing = UIEdgeInsetsMake(10.0, 0, 10.0, 0); - } - return self; -} - -- (void)prepareLayout -{ - _itemAttributes = [NSMutableArray array]; - _columnHeights = [NSMutableArray array]; - _allAttributes = [NSMutableArray array]; - _headerAttributes = [NSMutableDictionary dictionary]; - - CGFloat top = 0; - - NSInteger numberOfSections = [self.collectionView numberOfSections]; - for (NSUInteger section = 0; section < numberOfSections; section++) { - NSInteger numberOfItems = [self.collectionView numberOfItemsInSection:section]; - - top += _sectionInset.top; - - if (_headerHeight > 0) { - CGSize headerSize = [self _headerSizeForSection:section]; - UICollectionViewLayoutAttributes *attributes = [UICollectionViewLayoutAttributes - layoutAttributesForSupplementaryViewOfKind:UICollectionElementKindSectionHeader - withIndexPath:[NSIndexPath indexPathForItem:0 inSection:section]]; - attributes.frame = CGRectMake(_sectionInset.left, top, headerSize.width, headerSize.height); - _headerAttributes[@(section)] = attributes; - [_allAttributes addObject:attributes]; - top = CGRectGetMaxY(attributes.frame); - } - - [_columnHeights addObject:[NSMutableArray array]]; - for (NSUInteger idx = 0; idx < self.numberOfColumns; idx++) { - [_columnHeights[section] addObject:@(top)]; - } - - CGFloat columnWidth = [self _columnWidthForSection:section]; - [_itemAttributes addObject:[NSMutableArray array]]; - for (NSUInteger idx = 0; idx < numberOfItems; idx++) { - NSUInteger columnIndex = [self _shortestColumnIndexInSection:section]; - NSIndexPath *indexPath = [NSIndexPath indexPathForItem:idx inSection:section]; - - CGSize itemSize = [self _itemSizeAtIndexPath:indexPath]; - CGFloat xOffset = _sectionInset.left + (columnWidth + _columnSpacing) * columnIndex; - CGFloat yOffset = [_columnHeights[section][columnIndex] floatValue]; - - UICollectionViewLayoutAttributes *attributes = [UICollectionViewLayoutAttributes - layoutAttributesForCellWithIndexPath:indexPath]; - attributes.frame = CGRectMake(xOffset, yOffset, itemSize.width, itemSize.height); - - _columnHeights[section][columnIndex] = @(CGRectGetMaxY(attributes.frame) + _interItemSpacing.bottom); - - [_itemAttributes[section] addObject:attributes]; - [_allAttributes addObject:attributes]; - } - - NSUInteger columnIndex = [self _tallestColumnIndexInSection:section]; - top = [_columnHeights[section][columnIndex] floatValue] - _interItemSpacing.bottom + _sectionInset.bottom; - - for (NSUInteger idx = 0; idx < [_columnHeights[section] count]; idx++) { - _columnHeights[section][idx] = @(top); - } - } -} - -- (NSArray *)layoutAttributesForElementsInRect:(CGRect)rect -{ - NSMutableArray *includedAttributes = [NSMutableArray array]; - // Slow search for small batches - for (UICollectionViewLayoutAttributes *attributes in _allAttributes) { - if (CGRectIntersectsRect(attributes.frame, rect)) { - [includedAttributes addObject:attributes]; - } - } - return includedAttributes; -} - -- (UICollectionViewLayoutAttributes *)layoutAttributesForItemAtIndexPath:(NSIndexPath *)indexPath -{ - if (indexPath.section >= _itemAttributes.count) { - return nil; - } else if (indexPath.item >= [_itemAttributes[indexPath.section] count]) { - return nil; - } - return _itemAttributes[indexPath.section][indexPath.item]; -} - -- (UICollectionViewLayoutAttributes *)layoutAttributesForSupplementaryViewOfKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath -{ - if ([elementKind isEqualToString:UICollectionElementKindSectionHeader]) { - return _headerAttributes[@(indexPath.section)]; - } - return nil; -} - -- (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds -{ - if (!CGRectEqualToRect(self.collectionView.bounds, newBounds)) { - return YES; - } - return NO; -} - -- (CGFloat)_widthForSection:(NSUInteger)section -{ - return self.collectionView.bounds.size.width - _sectionInset.left - _sectionInset.right; -} - -- (CGFloat)_columnWidthForSection:(NSUInteger)section -{ - return ([self _widthForSection:section] - ((_numberOfColumns - 1) * _columnSpacing)) / _numberOfColumns; -} - -- (CGSize)_itemSizeAtIndexPath:(NSIndexPath *)indexPath -{ - CGSize size = CGSizeMake([self _columnWidthForSection:indexPath.section], 0); - CGSize originalSize = [[self _delegate] collectionView:self.collectionView layout:self originalItemSizeAtIndexPath:indexPath]; - if (originalSize.height > 0 && originalSize.width > 0) { - size.height = originalSize.height / originalSize.width * size.width; - } - return size; -} - -- (CGSize)_headerSizeForSection:(NSUInteger)section -{ - return CGSizeMake([self _widthForSection:section], _headerHeight); -} - -- (CGSize)collectionViewContentSize -{ - CGFloat height = [[[_columnHeights lastObject] firstObject] floatValue]; - return CGSizeMake(self.collectionView.bounds.size.width, height); -} - -- (NSUInteger)_tallestColumnIndexInSection:(NSUInteger)section -{ - __block NSUInteger index = 0; - __block CGFloat tallestHeight = 0; - [_columnHeights[section] enumerateObjectsUsingBlock:^(NSNumber *height, NSUInteger idx, BOOL *stop) { - if (height.floatValue > tallestHeight) { - index = idx; - tallestHeight = height.floatValue; - } - }]; - return index; -} - -- (NSUInteger)_shortestColumnIndexInSection:(NSUInteger)section -{ - __block NSUInteger index = 0; - __block CGFloat shortestHeight = CGFLOAT_MAX; - [_columnHeights[section] enumerateObjectsUsingBlock:^(NSNumber *height, NSUInteger idx, BOOL *stop) { - if (height.floatValue < shortestHeight) { - index = idx; - shortestHeight = height.floatValue; - } - }]; - return index; -} - -- (id)_delegate -{ - return (id)self.collectionView.delegate; -} - -@end - -@implementation MosaicCollectionViewLayoutInspector - -- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForNodeAtIndexPath:(NSIndexPath *)indexPath -{ - MosaicCollectionViewLayout *layout = (MosaicCollectionViewLayout *)[collectionView collectionViewLayout]; - return ASSizeRangeMake(CGSizeZero, [layout _itemSizeAtIndexPath:indexPath]); -} - -- (ASSizeRange)collectionView:(ASCollectionView *)collectionView constrainedSizeForSupplementaryNodeOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath -{ - MosaicCollectionViewLayout *layout = (MosaicCollectionViewLayout *)[collectionView collectionViewLayout]; - return ASSizeRangeMake(CGSizeZero, [layout _headerSizeForSection:indexPath.section]); -} - -/** - * Asks the inspector for the number of supplementary sections in the collection view for the given kind. - */ -- (NSUInteger)collectionView:(ASCollectionView *)collectionView numberOfSectionsForSupplementaryNodeOfKind:(NSString *)kind -{ - if ([kind isEqualToString:UICollectionElementKindSectionHeader]) { - return [[collectionView asyncDataSource] numberOfSectionsInCollectionView:collectionView]; - } else { - return 0; - } -} - -/** - * Asks the inspector for the number of supplementary views for the given kind in the specified section. - */ -- (NSUInteger)collectionView:(ASCollectionView *)collectionView supplementaryNodesOfKind:(NSString *)kind inSection:(NSUInteger)section -{ - if ([kind isEqualToString:UICollectionElementKindSectionHeader]) { - return 1; - } else { - return 0; - } -} - -@end \ No newline at end of file diff --git a/examples/CollectionViewWithViewControllerCells/Sample/SupplementaryNode.h b/examples/CollectionViewWithViewControllerCells/Sample/SupplementaryNode.h deleted file mode 100644 index f75c929684..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/SupplementaryNode.h +++ /dev/null @@ -1,18 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface SupplementaryNode : ASCellNode - -- (instancetype)initWithText:(NSString *)text; - -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/SupplementaryNode.m b/examples/CollectionViewWithViewControllerCells/Sample/SupplementaryNode.m deleted file mode 100644 index 76ba17b4b6..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/SupplementaryNode.m +++ /dev/null @@ -1,52 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "SupplementaryNode.h" - -#import -#import -#import - -@implementation SupplementaryNode { - ASTextNode *_textNode; -} - -- (instancetype)initWithText:(NSString *)text -{ - self = [super init]; - if (self != nil) { - _textNode = [[ASTextNode alloc] init]; - _textNode.attributedString = [[NSAttributedString alloc] initWithString:text - attributes:[self textAttributes]]; - [self addSubnode:_textNode]; - } - return self; -} - -- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize -{ - ASCenterLayoutSpec *center = [[ASCenterLayoutSpec alloc] init]; - center.centeringOptions = ASCenterLayoutSpecCenteringY; - center.child = _textNode; - return center; -} - -#pragma mark - Text Formatting - -- (NSDictionary *)textAttributes -{ - return @{ - NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline], - NSForegroundColorAttributeName: [UIColor grayColor], - }; -} - -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/ViewController.h b/examples/CollectionViewWithViewControllerCells/Sample/ViewController.h deleted file mode 100644 index d0e9200d88..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/ViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface ViewController : UIViewController - -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/ViewController.m b/examples/CollectionViewWithViewControllerCells/Sample/ViewController.m deleted file mode 100644 index a6613ea11c..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/ViewController.m +++ /dev/null @@ -1,124 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "ViewController.h" - -#import -#import "MosaicCollectionViewLayout.h" -#import "SupplementaryNode.h" -#import "ImageViewController.h" - -static NSUInteger kNumberOfImages = 14; - -@interface ViewController () -{ - NSMutableArray *_sections; - ASCollectionView *_collectionView; - MosaicCollectionViewLayoutInspector *_layoutInspector; -} - -@end - -@implementation ViewController - -#pragma mark - -#pragma mark UIViewController. - -- (instancetype)init -{ - self = [super init]; - if (self) { - - _sections = [NSMutableArray array]; - [_sections addObject:[NSMutableArray array]]; - for (NSUInteger idx = 0, section = 0; idx < kNumberOfImages; idx++) { - NSString *name = [NSString stringWithFormat:@"image_%lu.jpg", (unsigned long)idx]; - [_sections[section] addObject:[UIImage imageNamed:name]]; - if ((idx + 1) % 5 == 0 && idx < kNumberOfImages - 1) { - section++; - [_sections addObject:[NSMutableArray array]]; - } - } - - } - return self; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - MosaicCollectionViewLayout *layout = [[MosaicCollectionViewLayout alloc] init]; - layout.numberOfColumns = 2; - layout.headerHeight = 44.0; - - _layoutInspector = [[MosaicCollectionViewLayoutInspector alloc] init]; - - _collectionView = [[ASCollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout]; - _collectionView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; - _collectionView.asyncDataSource = self; - _collectionView.asyncDelegate = self; - _collectionView.layoutInspector = _layoutInspector; - _collectionView.backgroundColor = [UIColor whiteColor]; - - [_collectionView registerSupplementaryNodeOfKind:UICollectionElementKindSectionHeader]; - [self.view addSubview:_collectionView]; -} - -- (void)dealloc -{ - _collectionView.asyncDataSource = nil; - _collectionView.asyncDelegate = nil; -} - -- (void)reloadTapped -{ - [_collectionView reloadData]; -} - -#pragma mark - -#pragma mark ASCollectionView data source. - -- (ASCellNodeBlock)collectionView:(ASCollectionView *)collectionView nodeBlockForItemAtIndexPath:(NSIndexPath *)indexPath -{ - UIImage *image = _sections[indexPath.section][indexPath.item]; - return ^{ - return [[ASCellNode alloc] initWithViewControllerBlock:^UIViewController *{ - return [[ImageViewController alloc] initWithImage:image]; - } didLoadBlock:^(ASDisplayNode * _Nonnull node) { - node.layer.borderWidth = 1.0; - node.layer.borderColor = [UIColor blackColor].CGColor; - }]; - }; -} - -- (ASCellNode *)collectionView:(ASCollectionView *)collectionView nodeForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath -{ - NSString *text = [NSString stringWithFormat:@"Section %d", (int)indexPath.section + 1]; - return [[SupplementaryNode alloc] initWithText:text]; -} - -- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView -{ - return _sections.count; -} - -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section -{ - return [_sections[section] count]; -} - -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout originalItemSizeAtIndexPath:(NSIndexPath *)indexPath -{ - return [(UIImage *)_sections[indexPath.section][indexPath.item] size]; -} - -@end diff --git a/examples/CollectionViewWithViewControllerCells/Sample/main.m b/examples/CollectionViewWithViewControllerCells/Sample/main.m deleted file mode 100644 index 592423d8f6..0000000000 --- a/examples/CollectionViewWithViewControllerCells/Sample/main.m +++ /dev/null @@ -1,19 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/examples/CustomCollectionView/Podfile b/examples/CustomCollectionView/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/CustomCollectionView/Podfile +++ b/examples/CustomCollectionView/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/CustomCollectionView/Sample.xcworkspace/contents.xcworkspacedata b/examples/CustomCollectionView/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/CustomCollectionView/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/EditableText/CustomCollectionView.gif b/examples/EditableText/CustomCollectionView.gif deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/examples/EditableText/Podfile b/examples/EditableText/Podfile index 6c012e3c04..5c30ce798e 100644 --- a/examples/EditableText/Podfile +++ b/examples/EditableText/Podfile @@ -1,3 +1,6 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' -pod 'AsyncDisplayKit', :path => '../..' +platform :ios, '7.0' +target 'Sample' do + pod 'AsyncDisplayKit', :path => '../..' +end + diff --git a/examples/EditableText/Sample.xcodeproj/project.pbxproj b/examples/EditableText/Sample.xcodeproj/project.pbxproj index 1ed38a35e8..17f07797b9 100644 --- a/examples/EditableText/Sample.xcodeproj/project.pbxproj +++ b/examples/EditableText/Sample.xcodeproj/project.pbxproj @@ -133,6 +133,7 @@ files 4BAC508FE718C8CAAB6D5923 + 536169B9EF7CEDECCE1B60F0 isa PBXFrameworksBuildPhase @@ -148,6 +149,8 @@ 0585428019D4DBE100606EA6 6C2C82AC19EE274300767484 6C2C82AD19EE274300767484 + DED40FCA1CCB2096003C123B + DED40FC91CCB2096003C123B isa PBXResourcesBuildPhase @@ -491,7 +494,7 @@ 05E212A519D4DB510098F589 baseConfigurationReference - 991C608407D138B9C2B6A3E7 + DED40FC71CCB2096003C123B buildSettings ASSETCATALOG_COMPILER_APPICON_NAME @@ -511,7 +514,7 @@ 05E212A619D4DB510098F589 baseConfigurationReference - FC7F3A6E8FC4B5E41FFCFF8A + DED40FC81CCB2096003C123B buildSettings ASSETCATALOG_COMPILER_APPICON_NAME @@ -533,6 +536,7 @@ children 5C6A0F715CB9F7DF29FC026B + B6B3820335D6E75E7E0BE9FF isa PBXGroup @@ -545,8 +549,8 @@ children - 991C608407D138B9C2B6A3E7 - FC7F3A6E8FC4B5E41FFCFF8A + DED40FC71CCB2096003C123B + DED40FC81CCB2096003C123B isa PBXGroup @@ -562,6 +566,13 @@ isa PBXBuildFile + 536169B9EF7CEDECCE1B60F0 + + fileRef + B6B3820335D6E75E7E0BE9FF + isa + PBXBuildFile + 5C6A0F715CB9F7DF29FC026B explicitFileType @@ -630,26 +641,68 @@ shellPath /bin/sh shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" + "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh" showEnvVarsInLog 0 - 991C608407D138B9C2B6A3E7 + B6B3820335D6E75E7E0BE9FF + explicitFileType + archive.ar includeInIndex - 1 + 0 + isa + PBXFileReference + path + libPods-Sample.a + sourceTree + BUILT_PRODUCTS_DIR + + DED40FC71CCB2096003C123B + + fileEncoding + 4 isa PBXFileReference lastKnownFileType text.xcconfig name - Pods.debug.xcconfig + Pods-Sample.debug.xcconfig path - Pods/Target Support Files/Pods/Pods.debug.xcconfig + Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig sourceTree <group> + DED40FC81CCB2096003C123B + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-Sample.release.xcconfig + path + Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig + sourceTree + <group> + + DED40FC91CCB2096003C123B + + fileRef + DED40FC71CCB2096003C123B + isa + PBXBuildFile + + DED40FCA1CCB2096003C123B + + fileRef + DED40FC81CCB2096003C123B + isa + PBXBuildFile + E080B80F89C34A25B3488E26 buildActionMask @@ -699,26 +752,11 @@ fi shellPath /bin/sh shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" + "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh" showEnvVarsInLog 0 - FC7F3A6E8FC4B5E41FFCFF8A - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods.release.xcconfig - path - Pods/Target Support Files/Pods/Pods.release.xcconfig - sourceTree - <group> - rootObject 05E2127919D4DB510098F589 diff --git a/examples/EditableText/Sample.xcworkspace/contents.xcworkspacedata b/examples/EditableText/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/EditableText/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/HorizontalWithinVerticalScrolling/Podfile b/examples/HorizontalWithinVerticalScrolling/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/HorizontalWithinVerticalScrolling/Podfile +++ b/examples/HorizontalWithinVerticalScrolling/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/Kittens/Podfile b/examples/Kittens/Podfile index 6c012e3c04..919de4b311 100644 --- a/examples/Kittens/Podfile +++ b/examples/Kittens/Podfile @@ -1,3 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '8.0' -pod 'AsyncDisplayKit', :path => '../..' +platform :ios, '7.0' +target 'Sample' do + pod 'AsyncDisplayKit', :path => '../..' +end diff --git a/examples/Kittens/Sample.xcodeproj/project.pbxproj b/examples/Kittens/Sample.xcodeproj/project.pbxproj index 792a6e871a..abe97df448 100644 --- a/examples/Kittens/Sample.xcodeproj/project.pbxproj +++ b/examples/Kittens/Sample.xcodeproj/project.pbxproj @@ -201,6 +201,7 @@ files 655612EC26745F53A5CFCF52 + 52C9A6CB87CA529C55C02E59 isa PBXFrameworksBuildPhase @@ -216,6 +217,8 @@ 0585428019D4DBE100606EA6 6C2C82AC19EE274300767484 6C2C82AD19EE274300767484 + DEE7812B1CCB21EB0053A711 + DEE7812A1CCB21EB0053A711 isa PBXResourcesBuildPhase @@ -563,7 +566,7 @@ 05E212A519D4DB510098F589 baseConfigurationReference - 2495CA461FA61ED45A32B489 + DEE781281CCB21EB0053A711 buildSettings ASSETCATALOG_COMPILER_APPICON_NAME @@ -587,7 +590,7 @@ 05E212A619D4DB510098F589 baseConfigurationReference - 504E5B47D539D92256FAC696 + DEE781291CCB21EB0053A711 buildSettings ASSETCATALOG_COMPILER_APPICON_NAME @@ -613,6 +616,7 @@ children 6DE7AC2C8D07948DFC1E9C93 + E0D5A93FCFED54B93217FB08 isa PBXGroup @@ -625,8 +629,8 @@ children - 2495CA461FA61ED45A32B489 - 504E5B47D539D92256FAC696 + DEE781281CCB21EB0053A711 + DEE781291CCB21EB0053A711 isa PBXGroup @@ -635,35 +639,12 @@ sourceTree <group> - 2495CA461FA61ED45A32B489 + 52C9A6CB87CA529C55C02E59 - includeInIndex - 1 + fileRef + E0D5A93FCFED54B93217FB08 isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods.debug.xcconfig - path - Pods/Target Support Files/Pods/Pods.debug.xcconfig - sourceTree - <group> - - 504E5B47D539D92256FAC696 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods.release.xcconfig - path - Pods/Target Support Files/Pods/Pods.release.xcconfig - sourceTree - <group> + PBXBuildFile 655612EC26745F53A5CFCF52 @@ -740,11 +721,55 @@ shellPath /bin/sh shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" + "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh" showEnvVarsInLog 0 + DEE781281CCB21EB0053A711 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-Sample.debug.xcconfig + path + Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig + sourceTree + <group> + + DEE781291CCB21EB0053A711 + + fileEncoding + 4 + isa + PBXFileReference + lastKnownFileType + text.xcconfig + name + Pods-Sample.release.xcconfig + path + Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig + sourceTree + <group> + + DEE7812A1CCB21EB0053A711 + + fileRef + DEE781281CCB21EB0053A711 + isa + PBXBuildFile + + DEE7812B1CCB21EB0053A711 + + fileRef + DEE781291CCB21EB0053A711 + isa + PBXBuildFile + E080B80F89C34A25B3488E26 buildActionMask @@ -775,6 +800,19 @@ fi showEnvVarsInLog 0 + E0D5A93FCFED54B93217FB08 + + explicitFileType + archive.ar + includeInIndex + 0 + isa + PBXFileReference + path + libPods-Sample.a + sourceTree + BUILT_PRODUCTS_DIR + F012A6F39E0149F18F564F50 buildActionMask @@ -794,7 +832,7 @@ fi shellPath /bin/sh shellScript - "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" + "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh" showEnvVarsInLog 0 diff --git a/examples/Kittens/Sample.xcworkspace/contents.xcworkspacedata b/examples/Kittens/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/Kittens/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/Multiplex/Podfile b/examples/Multiplex/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/Multiplex/Podfile +++ b/examples/Multiplex/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/PagerNode/Podfile b/examples/PagerNode/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/PagerNode/Podfile +++ b/examples/PagerNode/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/PagerNode/Sample.xcworkspace/contents.xcworkspacedata b/examples/PagerNode/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/PagerNode/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/Placeholders/Podfile b/examples/Placeholders/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/Placeholders/Podfile +++ b/examples/Placeholders/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/SocialAppLayout/Podfile b/examples/SocialAppLayout/Podfile index 2a98d2dcec..919de4b311 100644 --- a/examples/SocialAppLayout/Podfile +++ b/examples/SocialAppLayout/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' -end \ No newline at end of file +end diff --git a/examples/SocialAppLayout/Sample.xcworkspace/contents.xcworkspacedata b/examples/SocialAppLayout/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/SocialAppLayout/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/Swift/Podfile b/examples/Swift/Podfile index c086f5d6bc..628b25d36c 100644 --- a/examples/Swift/Podfile +++ b/examples/Swift/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' use_frameworks! diff --git a/examples/Swift/Sample.xcworkspace/contents.xcworkspacedata b/examples/Swift/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/Swift/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/SynchronousConcurrency/Default-568h@2x.png b/examples/SynchronousConcurrency/Default-568h@2x.png deleted file mode 100644 index 6ee80b9393..0000000000 Binary files a/examples/SynchronousConcurrency/Default-568h@2x.png and /dev/null differ diff --git a/examples/SynchronousConcurrency/Default-667h@2x.png b/examples/SynchronousConcurrency/Default-667h@2x.png deleted file mode 100644 index e7b975e21b..0000000000 Binary files a/examples/SynchronousConcurrency/Default-667h@2x.png and /dev/null differ diff --git a/examples/SynchronousConcurrency/Default-736h@3x.png b/examples/SynchronousConcurrency/Default-736h@3x.png deleted file mode 100644 index c8949cae16..0000000000 Binary files a/examples/SynchronousConcurrency/Default-736h@3x.png and /dev/null differ diff --git a/examples/SynchronousConcurrency/Podfile b/examples/SynchronousConcurrency/Podfile deleted file mode 100644 index ff6637ee68..0000000000 --- a/examples/SynchronousConcurrency/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' -target 'Sample' do - pod 'AsyncDisplayKit', :path => '../..' -end diff --git a/examples/SynchronousConcurrency/Sample.xcodeproj/project.pbxproj b/examples/SynchronousConcurrency/Sample.xcodeproj/project.pbxproj deleted file mode 100644 index 74034a24f4..0000000000 --- a/examples/SynchronousConcurrency/Sample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,806 +0,0 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 0342F7A1563F38A62746D4B8 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh" - - showEnvVarsInLog - 0 - - 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 - - 18C2ED861B9B8CE700F627B3 - 18748FDB1BB727B20053A9C1 - 05E2128D19D4DB510098F589 - 05E2128A19D4DB510098F589 - 05E2128719D4DB510098F589 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2127E19D4DB510098F589 - - buildActionMask - 2147483647 - files - - C3B2A32888B988D317F5DDE1 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2127F19D4DB510098F589 - - buildActionMask - 2147483647 - files - - 0585428019D4DBE100606EA6 - 6C2C82AC19EE274300767484 - 6C2C82AD19EE274300767484 - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2128019D4DB510098F589 - - buildConfigurationList - 05E212A419D4DB510098F589 - buildPhases - - E080B80F89C34A25B3488E26 - 05E2127D19D4DB510098F589 - 05E2127E19D4DB510098F589 - 05E2127F19D4DB510098F589 - F012A6F39E0149F18F564F50 - 0342F7A1563F38A62746D4B8 - - 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 - 18748FD91BB727B20053A9C1 - 18748FDA1BB727B20053A9C1 - 18C2ED841B9B8CE700F627B3 - 18C2ED851B9B8CE700F627B3 - 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 - AsyncTableViewController.h - sourceTree - <group> - - 05E2128C19D4DB510098F589 - - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - AsyncTableViewController.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 - 86D5AE7D8306374F99D2E0F7 - 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_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Debug - - 05E212A619D4DB510098F589 - - baseConfigurationReference - 3673DB8C60BCB89039CAD924 - 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_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Release - - 18748FD91BB727B20053A9C1 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - AsyncViewController.h - sourceTree - <group> - - 18748FDA1BB727B20053A9C1 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - AsyncViewController.m - sourceTree - <group> - - 18748FDB1BB727B20053A9C1 - - fileRef - 18748FDA1BB727B20053A9C1 - isa - PBXBuildFile - - 18C2ED841B9B8CE700F627B3 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - RandomCoreGraphicsNode.h - sourceTree - <group> - - 18C2ED851B9B8CE700F627B3 - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - RandomCoreGraphicsNode.m - sourceTree - <group> - - 18C2ED861B9B8CE700F627B3 - - fileRef - 18C2ED851B9B8CE700F627B3 - isa - PBXBuildFile - - 1A943BF0259746F18D6E423F - - children - - 7D3384C58256708C51C64523 - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 1AE410B73DA5C3BD087ACDD7 - - children - - 86D5AE7D8306374F99D2E0F7 - 3673DB8C60BCB89039CAD924 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - 3673DB8C60BCB89039CAD924 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.release.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig - sourceTree - <group> - - 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 - - 7D3384C58256708C51C64523 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-Sample.a - sourceTree - BUILT_PRODUCTS_DIR - - 86D5AE7D8306374F99D2E0F7 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.debug.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig - sourceTree - <group> - - C3B2A32888B988D317F5DDE1 - - fileRef - 7D3384C58256708C51C64523 - isa - PBXBuildFile - - 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-Sample/Pods-Sample-resources.sh" - - showEnvVarsInLog - 0 - - - rootObject - 05E2127919D4DB510098F589 - - diff --git a/examples/SynchronousConcurrency/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/SynchronousConcurrency/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a80c038249..0000000000 --- a/examples/SynchronousConcurrency/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/SynchronousConcurrency/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/SynchronousConcurrency/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme deleted file mode 100644 index 1e14aa0329..0000000000 --- a/examples/SynchronousConcurrency/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/SynchronousConcurrency/Sample/AppDelegate.h b/examples/SynchronousConcurrency/Sample/AppDelegate.h deleted file mode 100644 index 85855277e9..0000000000 --- a/examples/SynchronousConcurrency/Sample/AppDelegate.h +++ /dev/null @@ -1,20 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#define UseAutomaticLayout 1 - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/examples/SynchronousConcurrency/Sample/AppDelegate.m b/examples/SynchronousConcurrency/Sample/AppDelegate.m deleted file mode 100644 index a99a682823..0000000000 --- a/examples/SynchronousConcurrency/Sample/AppDelegate.m +++ /dev/null @@ -1,33 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "AsyncTableViewController.h" -#import "AsyncViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.backgroundColor = [UIColor whiteColor]; - - UITabBarController *tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil]; - self.window.rootViewController = tabBarController; - - [tabBarController setViewControllers:@[[[AsyncTableViewController alloc] init], [[AsyncViewController alloc] init]]]; - - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/examples/SynchronousConcurrency/Sample/AsyncTableViewController.h b/examples/SynchronousConcurrency/Sample/AsyncTableViewController.h deleted file mode 100644 index a1edcd7f6a..0000000000 --- a/examples/SynchronousConcurrency/Sample/AsyncTableViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface AsyncTableViewController : UIViewController - -@end diff --git a/examples/SynchronousConcurrency/Sample/AsyncTableViewController.m b/examples/SynchronousConcurrency/Sample/AsyncTableViewController.m deleted file mode 100644 index 80efd81209..0000000000 --- a/examples/SynchronousConcurrency/Sample/AsyncTableViewController.m +++ /dev/null @@ -1,86 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import -#import - -#import "AsyncTableViewController.h" -#import "RandomCoreGraphicsNode.h" - -@interface AsyncTableViewController () -{ - ASTableView *_tableView; -} - -@end - -@implementation AsyncTableViewController - -#pragma mark - -#pragma mark UIViewController. - -- (instancetype)init -{ - if (!(self = [super init])) - return nil; - - _tableView = [[ASTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; - _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; - _tableView.asyncDataSource = self; - _tableView.asyncDelegate = self; - - ASRangeTuningParameters tuningParameters; - tuningParameters.leadingBufferScreenfuls = 0.5; - tuningParameters.trailingBufferScreenfuls = 1.0; - [_tableView setTuningParameters:tuningParameters forRangeType:ASLayoutRangeTypePreload]; - [_tableView setTuningParameters:tuningParameters forRangeType:ASLayoutRangeTypeRender]; - - self.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFeatured tag:0]; - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemRedo - target:self - action:@selector(reloadEverything)]; - - return self; -} - -- (void)reloadEverything -{ - [_tableView reloadData]; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - [self.view addSubview:_tableView]; -} - -- (void)viewWillLayoutSubviews -{ - _tableView.frame = self.view.bounds; -} - -#pragma mark - -#pragma mark ASTableView. - -- (ASCellNode *)tableView:(ASTableView *)tableView nodeForRowAtIndexPath:(NSIndexPath *)indexPath -{ - RandomCoreGraphicsNode *elementNode = [[RandomCoreGraphicsNode alloc] init]; - elementNode.preferredFrameSize = CGSizeMake(320, 100); - return elementNode; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - return 100; -} - -@end diff --git a/examples/SynchronousConcurrency/Sample/AsyncViewController.h b/examples/SynchronousConcurrency/Sample/AsyncViewController.h deleted file mode 100644 index b449abbb2f..0000000000 --- a/examples/SynchronousConcurrency/Sample/AsyncViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// AsyncViewController.h -// Sample -// -// Created by Scott Goodson on 9/26/15. -// Copyright © 2015 Facebook. All rights reserved. -// - -#import "ASViewController.h" - -@interface AsyncViewController : ASViewController - -@end diff --git a/examples/SynchronousConcurrency/Sample/AsyncViewController.m b/examples/SynchronousConcurrency/Sample/AsyncViewController.m deleted file mode 100644 index 16e8fdb017..0000000000 --- a/examples/SynchronousConcurrency/Sample/AsyncViewController.m +++ /dev/null @@ -1,37 +0,0 @@ -// -// AsyncViewController.m -// Sample -// -// Created by Scott Goodson on 9/26/15. -// Copyright © 2015 Facebook. All rights reserved. -// - -#import "AsyncViewController.h" -#import "RandomCoreGraphicsNode.h" - -@implementation AsyncViewController - -- (instancetype)init -{ - if (!(self = [super initWithNode:[[RandomCoreGraphicsNode alloc] init]])) { - return nil; - } - - self.neverShowPlaceholders = YES; - self.tabBarItem = [[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorites tag:0]; - return self; -} - -- (void)viewWillAppear:(BOOL)animated -{ - // FIXME: This is only being called on the first time the UITabBarController shows us. - [super viewWillAppear:animated]; -} - -- (void)viewDidDisappear:(BOOL)animated -{ - [self.node recursivelyClearContents]; - [super viewDidDisappear:animated]; -} - -@end diff --git a/examples/SynchronousConcurrency/Sample/Info.plist b/examples/SynchronousConcurrency/Sample/Info.plist deleted file mode 100644 index 35d842827b..0000000000 --- a/examples/SynchronousConcurrency/Sample/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.facebook.AsyncDisplayKit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/examples/SynchronousConcurrency/Sample/RandomCoreGraphicsNode.h b/examples/SynchronousConcurrency/Sample/RandomCoreGraphicsNode.h deleted file mode 100644 index cecc3446b9..0000000000 --- a/examples/SynchronousConcurrency/Sample/RandomCoreGraphicsNode.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// RandomCoreGraphicsNode.h -// Sample -// -// Created by Scott Goodson on 9/5/15. -// Copyright (c) 2015 Facebook. All rights reserved. -// - -#import - -@interface RandomCoreGraphicsNode : ASCellNode -{ - ASTextNode *_textNode; -} - -@end diff --git a/examples/SynchronousConcurrency/Sample/RandomCoreGraphicsNode.m b/examples/SynchronousConcurrency/Sample/RandomCoreGraphicsNode.m deleted file mode 100644 index 046a71e22e..0000000000 --- a/examples/SynchronousConcurrency/Sample/RandomCoreGraphicsNode.m +++ /dev/null @@ -1,93 +0,0 @@ -// -// RandomCoreGraphicsNode.m -// Sample -// -// Created by Scott Goodson on 9/5/15. -// Copyright (c) 2015 Facebook. All rights reserved. -// - -#import "RandomCoreGraphicsNode.h" -#import - -@implementation RandomCoreGraphicsNode - -+ (UIColor *)randomColor -{ - CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0 - CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white - CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black - return [UIColor colorWithHue:hue saturation:saturation brightness:brightness alpha:1]; -} - -+ (void)drawRect:(CGRect)bounds withParameters:(id)parameters isCancelled:(asdisplaynode_iscancelled_block_t)isCancelledBlock isRasterizing:(BOOL)isRasterizing -{ - CGFloat locations[3]; - NSMutableArray *colors = [NSMutableArray arrayWithCapacity:3]; - [colors addObject:(id)[[RandomCoreGraphicsNode randomColor] CGColor]]; - locations[0] = 0.0; - [colors addObject:(id)[[RandomCoreGraphicsNode randomColor] CGColor]]; - locations[1] = 1.0; - [colors addObject:(id)[[RandomCoreGraphicsNode randomColor] CGColor]]; - locations[2] = ( arc4random() % 256 / 256.0 ); - - - CGContextRef ctx = UIGraphicsGetCurrentContext(); - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - CGGradientRef gradient = CGGradientCreateWithColors(colorSpace, (CFArrayRef)colors, locations); - - CGGradientDrawingOptions drawingOptions; - CGContextDrawLinearGradient(ctx, gradient, CGPointZero, CGPointMake(bounds.size.width, bounds.size.height), drawingOptions); - - CGColorSpaceRelease(colorSpace); -} - -- (NSObject *)drawParametersForAsyncLayer:(_ASDisplayLayer *)layer -{ - return [self description]; -} - -- (NSDictionary *)textStyle -{ - UIFont *font = [UIFont fontWithName:@"HelveticaNeue" size:36.0f]; - - NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - style.paragraphSpacing = 0.5 * font.lineHeight; - style.hyphenationFactor = 1.0; - - return @{ NSFontAttributeName: font, - NSParagraphStyleAttributeName: style }; -} - -- (instancetype)init -{ - if (!(self = [super init])) { - return nil; - } - - _textNode = [[ASTextNode alloc] init]; - _textNode.placeholderEnabled = NO; - _textNode.attributedString = [[NSAttributedString alloc] initWithString:@"Hello, ASDK!" - attributes:[self textStyle]]; - [self addSubnode:_textNode]; - - return self; -} - -- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize -{ - [_textNode measure:constrainedSize]; - return CGSizeMake(constrainedSize.width, 100); -} - -- (void)layout -{ - CGSize boundsSize = self.bounds.size; - CGSize textSize = _textNode.calculatedSize; - CGRect textRect = CGRectMake(roundf((boundsSize.width - textSize.width) / 2.0), - roundf((boundsSize.height - textSize.height) / 2.0), - textSize.width, - textSize.height); - _textNode.frame = textRect; -} - -@end diff --git a/examples/SynchronousConcurrency/Sample/main.m b/examples/SynchronousConcurrency/Sample/main.m deleted file mode 100644 index ae9488711c..0000000000 --- a/examples/SynchronousConcurrency/Sample/main.m +++ /dev/null @@ -1,20 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/examples/SynchronousKittens/Default-568h@2x.png b/examples/SynchronousKittens/Default-568h@2x.png deleted file mode 100644 index 6ee80b9393..0000000000 Binary files a/examples/SynchronousKittens/Default-568h@2x.png and /dev/null differ diff --git a/examples/SynchronousKittens/Default-667h@2x.png b/examples/SynchronousKittens/Default-667h@2x.png deleted file mode 100644 index e7b975e21b..0000000000 Binary files a/examples/SynchronousKittens/Default-667h@2x.png and /dev/null differ diff --git a/examples/SynchronousKittens/Default-736h@3x.png b/examples/SynchronousKittens/Default-736h@3x.png deleted file mode 100644 index c8949cae16..0000000000 Binary files a/examples/SynchronousKittens/Default-736h@3x.png and /dev/null differ diff --git a/examples/SynchronousKittens/Podfile b/examples/SynchronousKittens/Podfile deleted file mode 100644 index ff6637ee68..0000000000 --- a/examples/SynchronousKittens/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' -target 'Sample' do - pod 'AsyncDisplayKit', :path => '../..' -end diff --git a/examples/SynchronousKittens/Sample.xcodeproj/project.pbxproj b/examples/SynchronousKittens/Sample.xcodeproj/project.pbxproj deleted file mode 100644 index 549bd30cbe..0000000000 --- a/examples/SynchronousKittens/Sample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,806 +0,0 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 05561CF819D4E77700CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - BlurbNode.h - sourceTree - <group> - - 05561CF919D4E77700CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - BlurbNode.m - sourceTree - <group> - - 05561CFA19D4E77700CBA93C - - fileRef - 05561CF919D4E77700CBA93C - isa - PBXBuildFile - - 05561CFB19D4F94A00CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - KittenNode.h - sourceTree - <group> - - 05561CFC19D4F94A00CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - KittenNode.mm - sourceTree - <group> - - 05561CFD19D4F94A00CBA93C - - fileRef - 05561CFC19D4F94A00CBA93C - isa - PBXBuildFile - - 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 - - 05561CFD19D4F94A00CBA93C - 05E2128D19D4DB510098F589 - 05E2128A19D4DB510098F589 - 05561CFA19D4E77700CBA93C - 05E2128719D4DB510098F589 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2127E19D4DB510098F589 - - buildActionMask - 2147483647 - files - - 4186058E3E168D53D99777F3 - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2127F19D4DB510098F589 - - buildActionMask - 2147483647 - files - - 0585428019D4DBE100606EA6 - 6C2C82AC19EE274300767484 - 6C2C82AD19EE274300767484 - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2128019D4DB510098F589 - - buildConfigurationList - 05E212A419D4DB510098F589 - buildPhases - - E080B80F89C34A25B3488E26 - 05E2127D19D4DB510098F589 - 05E2127E19D4DB510098F589 - 05E2127F19D4DB510098F589 - F012A6F39E0149F18F564F50 - 626F666C417D1641EB1FF73D - - 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 - 05561CFB19D4F94A00CBA93C - 05561CFC19D4F94A00CBA93C - 05561CF819D4E77700CBA93C - 05561CF919D4E77700CBA93C - 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 - BE330B4179344E0F8E899043 - 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_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Debug - - 05E212A619D4DB510098F589 - - baseConfigurationReference - F51793F3B0AD498E5C28A426 - 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_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Release - - 1A943BF0259746F18D6E423F - - children - - 77BD0D94BEDD0C95E94180C7 - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 1AE410B73DA5C3BD087ACDD7 - - children - - BE330B4179344E0F8E899043 - F51793F3B0AD498E5C28A426 - - isa - PBXGroup - name - Pods - sourceTree - <group> - - 4186058E3E168D53D99777F3 - - fileRef - 77BD0D94BEDD0C95E94180C7 - isa - PBXBuildFile - - 626F666C417D1641EB1FF73D - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh" - - showEnvVarsInLog - 0 - - 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 - - 77BD0D94BEDD0C95E94180C7 - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-Sample.a - sourceTree - BUILT_PRODUCTS_DIR - - BE330B4179344E0F8E899043 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.debug.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.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-Sample/Pods-Sample-resources.sh" - - showEnvVarsInLog - 0 - - F51793F3B0AD498E5C28A426 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.release.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig - sourceTree - <group> - - - rootObject - 05E2127919D4DB510098F589 - - diff --git a/examples/SynchronousKittens/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/SynchronousKittens/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a80c038249..0000000000 --- a/examples/SynchronousKittens/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/SynchronousKittens/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/SynchronousKittens/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme deleted file mode 100644 index 1e14aa0329..0000000000 --- a/examples/SynchronousKittens/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/SynchronousKittens/Sample.xcworkspace/contents.xcworkspacedata b/examples/SynchronousKittens/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/SynchronousKittens/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/SynchronousKittens/Sample/AppDelegate.h b/examples/SynchronousKittens/Sample/AppDelegate.h deleted file mode 100644 index 85855277e9..0000000000 --- a/examples/SynchronousKittens/Sample/AppDelegate.h +++ /dev/null @@ -1,20 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#define UseAutomaticLayout 1 - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/examples/SynchronousKittens/Sample/AppDelegate.m b/examples/SynchronousKittens/Sample/AppDelegate.m deleted file mode 100644 index 1dea563b77..0000000000 --- a/examples/SynchronousKittens/Sample/AppDelegate.m +++ /dev/null @@ -1,27 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "ViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.backgroundColor = [UIColor whiteColor]; - self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/examples/SynchronousKittens/Sample/BlurbNode.h b/examples/SynchronousKittens/Sample/BlurbNode.h deleted file mode 100644 index 57d8e30787..0000000000 --- a/examples/SynchronousKittens/Sample/BlurbNode.h +++ /dev/null @@ -1,19 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -/** - * Simple node that displays a placekitten.com attribution. - */ -@interface BlurbNode : ASCellNode - -@end diff --git a/examples/SynchronousKittens/Sample/BlurbNode.m b/examples/SynchronousKittens/Sample/BlurbNode.m deleted file mode 100644 index 693ec0cd03..0000000000 --- a/examples/SynchronousKittens/Sample/BlurbNode.m +++ /dev/null @@ -1,122 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "BlurbNode.h" -#import "AppDelegate.h" - -#import -#import - -#import -#import - -static CGFloat kTextPadding = 10.0f; -static NSString *kLinkAttributeName = @"PlaceKittenNodeLinkAttributeName"; - -@interface BlurbNode () -{ - ASTextNode *_textNode; -} - -@end - - -@implementation BlurbNode - -#pragma mark - -#pragma mark ASCellNode. - -- (instancetype)init -{ - if (!(self = [super init])) - return nil; - - // create a text node - _textNode = [[ASTextNode alloc] init]; - - // configure the node to support tappable links - _textNode.delegate = self; - _textNode.userInteractionEnabled = YES; - _textNode.linkAttributeNames = @[ kLinkAttributeName ]; - - // generate an attributed string using the custom link attribute specified above - NSString *blurb = @"kittens courtesy placekitten.com \U0001F638"; - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:blurb]; - [string addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"HelveticaNeue-Light" size:16.0f] range:NSMakeRange(0, blurb.length)]; - [string addAttributes:@{ - kLinkAttributeName: [NSURL URLWithString:@"http://placekitten.com/"], - NSForegroundColorAttributeName: [UIColor grayColor], - NSUnderlineStyleAttributeName: @(NSUnderlineStyleSingle | NSUnderlinePatternDot), - } - range:[blurb rangeOfString:@"placekitten.com"]]; - _textNode.attributedString = string; - - // add it as a subnode, and we're done - [self addSubnode:_textNode]; - - return self; -} - -- (void)didLoad -{ - // enable highlighting now that self.layer has loaded -- see ASHighlightOverlayLayer.h - self.layer.as_allowsHighlightDrawing = YES; - - [super didLoad]; -} - -#if UseAutomaticLayout -- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize -{ - ASCenterLayoutSpec *centerSpec = [[ASCenterLayoutSpec alloc] init]; - centerSpec.centeringOptions = ASCenterLayoutSpecCenteringX; - centerSpec.sizingOptions = ASCenterLayoutSpecSizingOptionMinimumY; - centerSpec.child = _textNode; - - UIEdgeInsets padding =UIEdgeInsetsMake(kTextPadding, kTextPadding, kTextPadding, kTextPadding); - return [ASInsetLayoutSpec insetLayoutSpecWithInsets:padding child:centerSpec]; -} -#else -- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize -{ - // called on a background thread. custom nodes must call -measure: on their subnodes in -calculateSizeThatFits: - CGSize measuredSize = [_textNode measure:CGSizeMake(constrainedSize.width - 2 * kTextPadding, - constrainedSize.height - 2 * kTextPadding)]; - return CGSizeMake(constrainedSize.width, measuredSize.height + 2 * kTextPadding); -} - -- (void)layout -{ - // called on the main thread. we'll use the stashed size from above, instead of blocking on text sizing - CGSize textNodeSize = _textNode.calculatedSize; - _textNode.frame = CGRectMake(roundf((self.calculatedSize.width - textNodeSize.width) / 2.0f), - kTextPadding, - textNodeSize.width, - textNodeSize.height); -} -#endif - -#pragma mark - -#pragma mark ASTextNodeDelegate methods. - -- (BOOL)textNode:(ASTextNode *)richTextNode shouldHighlightLinkAttribute:(NSString *)attribute value:(id)value atPoint:(CGPoint)point -{ - // opt into link highlighting -- tap and hold the link to try it! must enable highlighting on a layer, see -didLoad - return YES; -} - -- (void)textNode:(ASTextNode *)richTextNode tappedLinkAttribute:(NSString *)attribute value:(NSURL *)URL atPoint:(CGPoint)point textRange:(NSRange)textRange -{ - // the node tapped a link, open it - [[UIApplication sharedApplication] openURL:URL]; -} - -@end diff --git a/examples/SynchronousKittens/Sample/Info.plist b/examples/SynchronousKittens/Sample/Info.plist deleted file mode 100644 index 35d842827b..0000000000 --- a/examples/SynchronousKittens/Sample/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.facebook.AsyncDisplayKit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/examples/SynchronousKittens/Sample/KittenNode.h b/examples/SynchronousKittens/Sample/KittenNode.h deleted file mode 100644 index 3cc23d5a44..0000000000 --- a/examples/SynchronousKittens/Sample/KittenNode.h +++ /dev/null @@ -1,24 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -/** - * Social media-style node that displays a kitten picture and a random length - * of lorem ipsum text. Uses a placekitten.com kitten of the specified size. - */ -@interface KittenNode : ASCellNode - -- (instancetype)initWithKittenOfSize:(CGSize)size; - -- (void)toggleImageEnlargement; - -@end diff --git a/examples/SynchronousKittens/Sample/KittenNode.mm b/examples/SynchronousKittens/Sample/KittenNode.mm deleted file mode 100644 index 847a2629c7..0000000000 --- a/examples/SynchronousKittens/Sample/KittenNode.mm +++ /dev/null @@ -1,197 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "KittenNode.h" -#import "AppDelegate.h" - -#import - -#import -#import - -static const CGFloat kImageSize = 80.0f; -static const CGFloat kOuterPadding = 16.0f; -static const CGFloat kInnerPadding = 10.0f; - - -@interface KittenNode () -{ - CGSize _kittenSize; - - ASNetworkImageNode *_imageNode; - ASTextNode *_textNode; - ASDisplayNode *_divider; - BOOL _isImageEnlarged; - BOOL _swappedTextAndImage; -} - -@end - - -@implementation KittenNode - -// lorem ipsum text courtesy https://kittyipsum.com/ <3 -+ (NSArray *)placeholders -{ - static NSArray *placeholders = nil; - - static dispatch_once_t once; - dispatch_once(&once, ^{ - placeholders = @[ - @"Kitty ipsum dolor sit amet, purr sleep on your face lay down in your way biting, sniff tincidunt a etiam fluffy fur judging you stuck in a tree kittens.", - @"Lick tincidunt a biting eat the grass, egestas enim ut lick leap puking climb the curtains lick.", - @"Lick quis nunc toss the mousie vel, tortor pellentesque sunbathe orci turpis non tail flick suscipit sleep in the sink.", - @"Orci turpis litter box et stuck in a tree, egestas ac tempus et aliquam elit.", - @"Hairball iaculis dolor dolor neque, nibh adipiscing vehicula egestas dolor aliquam.", - @"Sunbathe fluffy fur tortor faucibus pharetra jump, enim jump on the table I don't like that food catnip toss the mousie scratched.", - @"Quis nunc nam sleep in the sink quis nunc purr faucibus, chase the red dot consectetur bat sagittis.", - @"Lick tail flick jump on the table stretching purr amet, rhoncus scratched jump on the table run.", - @"Suspendisse aliquam vulputate feed me sleep on your keyboard, rip the couch faucibus sleep on your keyboard tristique give me fish dolor.", - @"Rip the couch hiss attack your ankles biting pellentesque puking, enim suspendisse enim mauris a.", - @"Sollicitudin iaculis vestibulum toss the mousie biting attack your ankles, puking nunc jump adipiscing in viverra.", - @"Nam zzz amet neque, bat tincidunt a iaculis sniff hiss bibendum leap nibh.", - @"Chase the red dot enim puking chuf, tristique et egestas sniff sollicitudin pharetra enim ut mauris a.", - @"Sagittis scratched et lick, hairball leap attack adipiscing catnip tail flick iaculis lick.", - @"Neque neque sleep in the sink neque sleep on your face, climb the curtains chuf tail flick sniff tortor non.", - @"Ac etiam kittens claw toss the mousie jump, pellentesque rhoncus litter box give me fish adipiscing mauris a.", - @"Pharetra egestas sunbathe faucibus ac fluffy fur, hiss feed me give me fish accumsan.", - @"Tortor leap tristique accumsan rutrum sleep in the sink, amet sollicitudin adipiscing dolor chase the red dot.", - @"Knock over the lamp pharetra vehicula sleep on your face rhoncus, jump elit cras nec quis quis nunc nam.", - @"Sollicitudin feed me et ac in viverra catnip, nunc eat I don't like that food iaculis give me fish.", - ]; - }); - - return placeholders; -} - -- (instancetype)initWithKittenOfSize:(CGSize)size -{ - if (!(self = [super init])) - return nil; - - _kittenSize = size; - - // kitten image, with a solid background colour serving as placeholder - _imageNode = [[ASNetworkImageNode alloc] init]; - _imageNode.backgroundColor = ASDisplayNodeDefaultPlaceholderColor(); - _imageNode.URL = [NSURL URLWithString:[NSString stringWithFormat:@"https://placekitten.com/%zd/%zd", - (NSInteger)roundl(_kittenSize.width), - (NSInteger)roundl(_kittenSize.height)]]; -// _imageNode.contentMode = UIViewContentModeCenter; - [_imageNode addTarget:self action:@selector(toggleNodesSwap) forControlEvents:ASControlNodeEventTouchUpInside]; - [self addSubnode:_imageNode]; - - // lorem ipsum text, plus some nice styling - _textNode = [[ASTextNode alloc] init]; - _textNode.attributedString = [[NSAttributedString alloc] initWithString:[self kittyIpsum] - attributes:[self textStyle]]; - [self addSubnode:_textNode]; - - // hairline cell separator - _divider = [[ASDisplayNode alloc] init]; - _divider.backgroundColor = [UIColor lightGrayColor]; - [self addSubnode:_divider]; - - return self; -} - -- (NSString *)kittyIpsum -{ - NSArray *placeholders = [KittenNode placeholders]; - u_int32_t ipsumCount = (u_int32_t)[placeholders count]; - u_int32_t location = arc4random_uniform(ipsumCount); - u_int32_t length = arc4random_uniform(ipsumCount - location); - - NSMutableString *string = [placeholders[location] mutableCopy]; - for (u_int32_t i = location + 1; i < location + length; i++) { - [string appendString:(i % 2 == 0) ? @"\n" : @" "]; - [string appendString:placeholders[i]]; - } - - return string; -} - -- (NSDictionary *)textStyle -{ - UIFont *font = [UIFont fontWithName:@"HelveticaNeue" size:12.0f]; - - NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - style.paragraphSpacing = 0.5 * font.lineHeight; - style.hyphenationFactor = 1.0; - - return @{ NSFontAttributeName: font, - NSParagraphStyleAttributeName: style }; -} - -#if UseAutomaticLayout -- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize -{ - _imageNode.preferredFrameSize = _isImageEnlarged ? CGSizeMake(2.0 * kImageSize, 2.0 * kImageSize) : CGSizeMake(kImageSize, kImageSize); - _textNode.flexShrink = YES; - - ASStackLayoutSpec *stackSpec = [[ASStackLayoutSpec alloc] init]; - stackSpec.direction = ASStackLayoutDirectionHorizontal; - stackSpec.spacing = kInnerPadding; - [stackSpec setChildren:!_swappedTextAndImage ? @[_imageNode, _textNode] : @[_textNode, _imageNode]]; - - ASInsetLayoutSpec *insetSpec = [[ASInsetLayoutSpec alloc] init]; - insetSpec.insets = UIEdgeInsetsMake(kOuterPadding, kOuterPadding, kOuterPadding, kOuterPadding); - insetSpec.child = stackSpec; - - return insetSpec; -} - -// With box model, you don't need to override this method, unless you want to add custom logic. -- (void)layout -{ - [super layout]; - - // Manually layout the divider. - CGFloat pixelHeight = 1.0f / [[UIScreen mainScreen] scale]; - _divider.frame = CGRectMake(0.0f, 0.0f, self.calculatedSize.width, pixelHeight); -} -#else -- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize -{ - CGSize imageSize = CGSizeMake(kImageSize, kImageSize); - CGSize textSize = [_textNode measure:CGSizeMake(constrainedSize.width - kImageSize - 2 * kOuterPadding - kInnerPadding, - constrainedSize.height)]; - - // ensure there's room for the text - CGFloat requiredHeight = MAX(textSize.height, imageSize.height); - return CGSizeMake(constrainedSize.width, requiredHeight + 2 * kOuterPadding); -} - -- (void)layout -{ - CGFloat pixelHeight = 1.0f / [[UIScreen mainScreen] scale]; - _divider.frame = CGRectMake(0.0f, 0.0f, self.calculatedSize.width, pixelHeight); - - _imageNode.frame = CGRectMake(kOuterPadding, kOuterPadding, kImageSize, kImageSize); - - CGSize textSize = _textNode.calculatedSize; - _textNode.frame = CGRectMake(kOuterPadding + kImageSize + kInnerPadding, kOuterPadding, textSize.width, textSize.height); -} -#endif - -- (void)toggleImageEnlargement -{ - _isImageEnlarged = !_isImageEnlarged; - [self setNeedsLayout]; -} - -- (void)toggleNodesSwap -{ - _swappedTextAndImage = !_swappedTextAndImage; - [self setNeedsLayout]; -} - -@end diff --git a/examples/SynchronousKittens/Sample/ViewController.h b/examples/SynchronousKittens/Sample/ViewController.h deleted file mode 100644 index d0e9200d88..0000000000 --- a/examples/SynchronousKittens/Sample/ViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface ViewController : UIViewController - -@end diff --git a/examples/SynchronousKittens/Sample/ViewController.m b/examples/SynchronousKittens/Sample/ViewController.m deleted file mode 100644 index 9b39e79e0a..0000000000 --- a/examples/SynchronousKittens/Sample/ViewController.m +++ /dev/null @@ -1,211 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "ViewController.h" - -#import -#import - -#import "BlurbNode.h" -#import "KittenNode.h" - - -static const NSInteger kLitterSize = 20; // intial number of kitten cells in ASTableView -static const NSInteger kLitterBatchSize = 10; // number of kitten cells to add to ASTableView -static const NSInteger kMaxLitterSize = 100; // max number of kitten cells allowed in ASTableView - -@interface ViewController () -{ - ASTableView *_tableView; - - // array of boxed CGSizes corresponding to placekitten.com kittens - NSMutableArray *_kittenDataSource; - - BOOL _dataSourceLocked; - NSIndexPath *_blurbNodeIndexPath; -} - -@property (nonatomic, strong) NSMutableArray *kittenDataSource; -@property (atomic, assign) BOOL dataSourceLocked; - -@end - - -@implementation ViewController - -#pragma mark - -#pragma mark UIViewController. - -- (instancetype)init -{ - if (!(self = [super init])) - return nil; - - _tableView = [[ASTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain asyncDataFetching:YES]; - _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; // KittenNode has its own separator - _tableView.asyncDataSource = self; - _tableView.asyncDelegate = self; - - // populate our "data source" with some random kittens - _kittenDataSource = [self createLitterWithSize:kLitterSize]; - - _blurbNodeIndexPath = [NSIndexPath indexPathForItem:0 inSection:0]; - - self.title = @"Kittens"; - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit - target:self - action:@selector(toggleEditingMode)]; - - return self; -} - -- (NSMutableArray *)createLitterWithSize:(NSInteger)litterSize -{ - NSMutableArray *kittens = [NSMutableArray arrayWithCapacity:litterSize]; - for (NSInteger i = 0; i < litterSize; i++) { - - // placekitten.com will return the same kitten picture if the same pixel height & width are requested, - // so generate kittens with different width & height values. - u_int32_t deltaX = arc4random_uniform(10) - 5; - u_int32_t deltaY = arc4random_uniform(10) - 5; - CGSize size = CGSizeMake(350 + 2 * deltaX, 350 + 4 * deltaY); - - [kittens addObject:[NSValue valueWithCGSize:size]]; - } - return kittens; -} - -- (void)setKittenDataSource:(NSMutableArray *)kittenDataSource { - ASDisplayNodeAssert(!self.dataSourceLocked, @"Could not update data source when it is locked !"); - - _kittenDataSource = kittenDataSource; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - [self.view addSubview:_tableView]; - - [_tableView reloadDataImmediately]; -} - -- (void)viewWillLayoutSubviews -{ - _tableView.frame = self.view.bounds; -} - -- (void)toggleEditingMode -{ - [_tableView setEditing:!_tableView.editing animated:YES]; -} - - -#pragma mark - -#pragma mark ASTableView. - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [_tableView deselectRowAtIndexPath:indexPath animated:YES]; - [_tableView beginUpdates]; - // Assume only kitten nodes are selectable (see -tableView:shouldHighlightRowAtIndexPath:). - KittenNode *node = (KittenNode *)[_tableView nodeForRowAtIndexPath:indexPath]; - [node toggleImageEnlargement]; - [_tableView endUpdates]; -} - -- (ASCellNode *)tableView:(ASTableView *)tableView nodeForRowAtIndexPath:(NSIndexPath *)indexPath -{ - // special-case the first row - if ([_blurbNodeIndexPath compare:indexPath] == NSOrderedSame) { - BlurbNode *node = [[BlurbNode alloc] init]; - return node; - } - - NSValue *size = _kittenDataSource[indexPath.row - 1]; - KittenNode *node = [[KittenNode alloc] initWithKittenOfSize:size.CGSizeValue]; - return node; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - // blurb node + kLitterSize kitties - return 1 + _kittenDataSource.count; -} - -- (BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Enable selection for kitten nodes - return [_blurbNodeIndexPath compare:indexPath] != NSOrderedSame; -} - -- (void)tableViewLockDataSource:(ASTableView *)tableView -{ - self.dataSourceLocked = YES; -} - -- (void)tableViewUnlockDataSource:(ASTableView *)tableView -{ - self.dataSourceLocked = NO; -} - -- (BOOL)shouldBatchFetchForTableView:(UITableView *)tableView -{ - return _kittenDataSource.count < kMaxLitterSize; -} - -- (void)tableView:(UITableView *)tableView willBeginBatchFetchWithContext:(ASBatchContext *)context -{ - NSLog(@"adding kitties"); - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - sleep(1); - dispatch_async(dispatch_get_main_queue(), ^{ - - // populate a new array of random-sized kittens - NSArray *moarKittens = [self createLitterWithSize:kLitterBatchSize]; - - NSMutableArray *indexPaths = [[NSMutableArray alloc] init]; - - // find number of kittens in the data source and create their indexPaths - NSInteger existingRows = _kittenDataSource.count + 1; - - for (NSInteger i = 0; i < moarKittens.count; i++) { - [indexPaths addObject:[NSIndexPath indexPathForRow:existingRows + i inSection:0]]; - } - - // add new kittens to the data source & notify table of new indexpaths - [_kittenDataSource addObjectsFromArray:moarKittens]; - [tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade]; - - [context completeBatchFetching:YES]; - - NSLog(@"kittens added"); - }); - }); -} - -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Enable editing for Kitten nodes - return [_blurbNodeIndexPath compare:indexPath] != NSOrderedSame; -} - -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (editingStyle == UITableViewCellEditingStyleDelete) { - // Assume only kitten nodes are editable (see -tableView:canEditRowAtIndexPath:). - [_kittenDataSource removeObjectAtIndex:indexPath.row - 1]; - [_tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; - } -} - -@end diff --git a/examples/SynchronousKittens/Sample/main.m b/examples/SynchronousKittens/Sample/main.m deleted file mode 100644 index ae9488711c..0000000000 --- a/examples/SynchronousKittens/Sample/main.m +++ /dev/null @@ -1,20 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/examples/VerticalWithinHorizontalScrolling/Podfile b/examples/VerticalWithinHorizontalScrolling/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/VerticalWithinHorizontalScrolling/Podfile +++ b/examples/VerticalWithinHorizontalScrolling/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/VideoTableView/Default-568h@2x.png b/examples/VideoTableView/Default-568h@2x.png deleted file mode 100644 index 6ee80b9393..0000000000 Binary files a/examples/VideoTableView/Default-568h@2x.png and /dev/null differ diff --git a/examples/VideoTableView/Default-667h@2x.png b/examples/VideoTableView/Default-667h@2x.png deleted file mode 100644 index e7b975e21b..0000000000 Binary files a/examples/VideoTableView/Default-667h@2x.png and /dev/null differ diff --git a/examples/VideoTableView/Default-736h@3x.png b/examples/VideoTableView/Default-736h@3x.png deleted file mode 100644 index c8949cae16..0000000000 Binary files a/examples/VideoTableView/Default-736h@3x.png and /dev/null differ diff --git a/examples/VideoTableView/Podfile b/examples/VideoTableView/Podfile deleted file mode 100644 index ff6637ee68..0000000000 --- a/examples/VideoTableView/Podfile +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' -target 'Sample' do - pod 'AsyncDisplayKit', :path => '../..' -end diff --git a/examples/VideoTableView/Sample.xcodeproj/project.pbxproj b/examples/VideoTableView/Sample.xcodeproj/project.pbxproj deleted file mode 100644 index f567ebb15c..0000000000 --- a/examples/VideoTableView/Sample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,806 +0,0 @@ - - - - - archiveVersion - 1 - classes - - objectVersion - 46 - objects - - 05561CF819D4E77700CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - BlurbNode.h - sourceTree - <group> - - 05561CF919D4E77700CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.objc - path - BlurbNode.m - sourceTree - <group> - - 05561CFA19D4E77700CBA93C - - fileRef - 05561CF919D4E77700CBA93C - isa - PBXBuildFile - - 05561CFB19D4F94A00CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.c.h - path - NicCageNode.h - sourceTree - <group> - - 05561CFC19D4F94A00CBA93C - - fileEncoding - 4 - isa - PBXFileReference - lastKnownFileType - sourcecode.cpp.objcpp - path - NicCageNode.mm - sourceTree - <group> - - 05561CFD19D4F94A00CBA93C - - fileRef - 05561CFC19D4F94A00CBA93C - isa - PBXBuildFile - - 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 - - 05561CFD19D4F94A00CBA93C - 05E2128D19D4DB510098F589 - 05E2128A19D4DB510098F589 - 05561CFA19D4E77700CBA93C - 05E2128719D4DB510098F589 - - isa - PBXSourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2127E19D4DB510098F589 - - buildActionMask - 2147483647 - files - - 67ADD7A0A11DF37B2D73094B - - isa - PBXFrameworksBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2127F19D4DB510098F589 - - buildActionMask - 2147483647 - files - - 0585428019D4DBE100606EA6 - 6C2C82AC19EE274300767484 - 6C2C82AD19EE274300767484 - - isa - PBXResourcesBuildPhase - runOnlyForDeploymentPostprocessing - 0 - - 05E2128019D4DB510098F589 - - buildConfigurationList - 05E212A419D4DB510098F589 - buildPhases - - E080B80F89C34A25B3488E26 - 05E2127D19D4DB510098F589 - 05E2127E19D4DB510098F589 - 05E2127F19D4DB510098F589 - F012A6F39E0149F18F564F50 - EBE12F047824F0A2C6353B54 - - 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 - 05561CFB19D4F94A00CBA93C - 05561CFC19D4F94A00CBA93C - 05561CF819D4E77700CBA93C - 05561CF919D4E77700CBA93C - 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 - 246853115611E4007B767EA5 - 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_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Debug - - 05E212A619D4DB510098F589 - - baseConfigurationReference - C822FB25F4C6DBD8EA3CE6EC - 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_NAME - $(TARGET_NAME) - TARGETED_DEVICE_FAMILY - 1,2 - - isa - XCBuildConfiguration - name - Release - - 12CBA11A5870DDF5A5626B7B - - explicitFileType - archive.ar - includeInIndex - 0 - isa - PBXFileReference - path - libPods-Sample.a - sourceTree - BUILT_PRODUCTS_DIR - - 1A943BF0259746F18D6E423F - - children - - 12CBA11A5870DDF5A5626B7B - - isa - PBXGroup - name - Frameworks - sourceTree - <group> - - 1AE410B73DA5C3BD087ACDD7 - - children - - 246853115611E4007B767EA5 - C822FB25F4C6DBD8EA3CE6EC - - isa - PBXGroup - name - Pods - sourceTree - <group> - - 246853115611E4007B767EA5 - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.debug.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig - sourceTree - <group> - - 67ADD7A0A11DF37B2D73094B - - fileRef - 12CBA11A5870DDF5A5626B7B - 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 - - C822FB25F4C6DBD8EA3CE6EC - - includeInIndex - 1 - isa - PBXFileReference - lastKnownFileType - text.xcconfig - name - Pods-Sample.release.xcconfig - path - Pods/Target Support Files/Pods-Sample/Pods-Sample.release.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 - - EBE12F047824F0A2C6353B54 - - buildActionMask - 2147483647 - files - - inputPaths - - isa - PBXShellScriptBuildPhase - name - Embed Pods Frameworks - outputPaths - - runOnlyForDeploymentPostprocessing - 0 - shellPath - /bin/sh - shellScript - "${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh" - - 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-Sample/Pods-Sample-resources.sh" - - showEnvVarsInLog - 0 - - - rootObject - 05E2127919D4DB510098F589 - - diff --git a/examples/VideoTableView/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/examples/VideoTableView/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index a80c038249..0000000000 --- a/examples/VideoTableView/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/examples/VideoTableView/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme b/examples/VideoTableView/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme deleted file mode 100644 index 1e14aa0329..0000000000 --- a/examples/VideoTableView/Sample.xcodeproj/xcshareddata/xcschemes/Sample.xcscheme +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/VideoTableView/Sample.xcworkspace/contents.xcworkspacedata b/examples/VideoTableView/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/VideoTableView/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/VideoTableView/Sample/AppDelegate.h b/examples/VideoTableView/Sample/AppDelegate.h deleted file mode 100644 index 85855277e9..0000000000 --- a/examples/VideoTableView/Sample/AppDelegate.h +++ /dev/null @@ -1,20 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#define UseAutomaticLayout 1 - -@interface AppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/examples/VideoTableView/Sample/AppDelegate.m b/examples/VideoTableView/Sample/AppDelegate.m deleted file mode 100644 index 1dea563b77..0000000000 --- a/examples/VideoTableView/Sample/AppDelegate.m +++ /dev/null @@ -1,27 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "AppDelegate.h" - -#import "ViewController.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - self.window.backgroundColor = [UIColor whiteColor]; - self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:[[ViewController alloc] init]]; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/examples/VideoTableView/Sample/BlurbNode.h b/examples/VideoTableView/Sample/BlurbNode.h deleted file mode 100644 index 57d8e30787..0000000000 --- a/examples/VideoTableView/Sample/BlurbNode.h +++ /dev/null @@ -1,19 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -/** - * Simple node that displays a placekitten.com attribution. - */ -@interface BlurbNode : ASCellNode - -@end diff --git a/examples/VideoTableView/Sample/BlurbNode.m b/examples/VideoTableView/Sample/BlurbNode.m deleted file mode 100644 index fa9533fd69..0000000000 --- a/examples/VideoTableView/Sample/BlurbNode.m +++ /dev/null @@ -1,115 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "BlurbNode.h" -#import "AppDelegate.h" - -#import -#import - -#import -#import - -static CGFloat kTextPadding = 10.0f; -static NSString *kLinkAttributeName = @"PlaceKittenNodeLinkAttributeName"; - -@interface BlurbNode () -{ - ASTextNode *_textNode; -} - -@end - - -@implementation BlurbNode - -#pragma mark - -#pragma mark ASCellNode. - -- (instancetype)init -{ - if (!(self = [super init])) - return nil; - - // create a text node - _textNode = [[ASTextNode alloc] init]; - - // configure the node to support tappable links - _textNode.delegate = self; - _textNode.userInteractionEnabled = YES; - _textNode.linkAttributeNames = @[ kLinkAttributeName ]; - - // generate an attributed string using the custom link attribute specified above - NSString *blurb = @"Nic Cage courtesy of himself."; - NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:blurb]; - _textNode.attributedString = string; - - // add it as a subnode, and we're done - [self addSubnode:_textNode]; - - return self; -} - -- (void)didLoad -{ - // enable highlighting now that self.layer has loaded -- see ASHighlightOverlayLayer.h - self.layer.as_allowsHighlightDrawing = YES; - - [super didLoad]; -} - -#if UseAutomaticLayout -- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize -{ - ASCenterLayoutSpec *centerSpec = [[ASCenterLayoutSpec alloc] init]; - centerSpec.centeringOptions = ASCenterLayoutSpecCenteringX; - centerSpec.sizingOptions = ASCenterLayoutSpecSizingOptionMinimumY; - centerSpec.child = _textNode; - - UIEdgeInsets padding =UIEdgeInsetsMake(kTextPadding, kTextPadding, kTextPadding, kTextPadding); - return [ASInsetLayoutSpec insetLayoutSpecWithInsets:padding child:centerSpec]; -} -#else -- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize -{ - // called on a background thread. custom nodes must call -measure: on their subnodes in -calculateSizeThatFits: - CGSize measuredSize = [_textNode measure:CGSizeMake(constrainedSize.width - 2 * kTextPadding, - constrainedSize.height - 2 * kTextPadding)]; - return CGSizeMake(constrainedSize.width, measuredSize.height + 2 * kTextPadding); -} - -- (void)layout -{ - // called on the main thread. we'll use the stashed size from above, instead of blocking on text sizing - CGSize textNodeSize = _textNode.calculatedSize; - _textNode.frame = CGRectMake(roundf((self.calculatedSize.width - textNodeSize.width) / 2.0f), - kTextPadding, - textNodeSize.width, - textNodeSize.height); -} -#endif - -#pragma mark - -#pragma mark ASTextNodeDelegate methods. - -- (BOOL)textNode:(ASTextNode *)richTextNode shouldHighlightLinkAttribute:(NSString *)attribute value:(id)value atPoint:(CGPoint)point -{ - // opt into link highlighting -- tap and hold the link to try it! must enable highlighting on a layer, see -didLoad - return YES; -} - -- (void)textNode:(ASTextNode *)richTextNode tappedLinkAttribute:(NSString *)attribute value:(NSURL *)URL atPoint:(CGPoint)point textRange:(NSRange)textRange -{ - // the node tapped a link, open it - [[UIApplication sharedApplication] openURL:URL]; -} - -@end diff --git a/examples/VideoTableView/Sample/Info.plist b/examples/VideoTableView/Sample/Info.plist deleted file mode 100644 index 35d842827b..0000000000 --- a/examples/VideoTableView/Sample/Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - com.facebook.AsyncDisplayKit.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/examples/VideoTableView/Sample/NicCageNode.h b/examples/VideoTableView/Sample/NicCageNode.h deleted file mode 100644 index 4330fcd16d..0000000000 --- a/examples/VideoTableView/Sample/NicCageNode.h +++ /dev/null @@ -1,24 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -/** - * Social media-style node that displays a kitten picture and a random length - * of lorem ipsum text. Uses a placekitten.com kitten of the specified size. - */ -@interface NicCageNode : ASCellNode - -- (instancetype)initWithKittenOfSize:(CGSize)size; - -- (void)toggleImageEnlargement; - -@end diff --git a/examples/VideoTableView/Sample/NicCageNode.mm b/examples/VideoTableView/Sample/NicCageNode.mm deleted file mode 100644 index 4ca2733522..0000000000 --- a/examples/VideoTableView/Sample/NicCageNode.mm +++ /dev/null @@ -1,255 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "NicCageNode.h" -#import "AppDelegate.h" - -#import - -#import -#import -#import -#import - -static const CGFloat kImageSize = 80.0f; -static const CGFloat kOuterPadding = 16.0f; -static const CGFloat kInnerPadding = 10.0f; - -@interface NicCageNode () -{ - CGSize _kittenSize; - -// ASNetworkImageNode *_imageNode; - ASVideoNode *_videoNode; - ASTextNode *_textNode; - ASDisplayNode *_divider; - BOOL _isImageEnlarged; - BOOL _swappedTextAndImage; -} - -@end - - -@implementation NicCageNode - -// lorem ipsum text courtesy https://kittyipsum.com/ <3 -+ (NSArray *)placeholders -{ - static NSArray *placeholders = nil; - - static dispatch_once_t once; - dispatch_once(&once, ^{ - placeholders = @[ - @"Kitty ipsum dolor sit amet, purr sleep on your face lay down in your way biting, sniff tincidunt a etiam fluffy fur judging you stuck in a tree kittens.", - @"Lick tincidunt a biting eat the grass, egestas enim ut lick leap puking climb the curtains lick.", - @"Lick quis nunc toss the mousie vel, tortor pellentesque sunbathe orci turpis non tail flick suscipit sleep in the sink.", - @"Orci turpis litter box et stuck in a tree, egestas ac tempus et aliquam elit.", - @"Hairball iaculis dolor dolor neque, nibh adipiscing vehicula egestas dolor aliquam.", - @"Sunbathe fluffy fur tortor faucibus pharetra jump, enim jump on the table I don't like that food catnip toss the mousie scratched.", - @"Quis nunc nam sleep in the sink quis nunc purr faucibus, chase the red dot consectetur bat sagittis.", - @"Lick tail flick jump on the table stretching purr amet, rhoncus scratched jump on the table run.", - @"Suspendisse aliquam vulputate feed me sleep on your keyboard, rip the couch faucibus sleep on your keyboard tristique give me fish dolor.", - @"Rip the couch hiss attack your ankles biting pellentesque puking, enim suspendisse enim mauris a.", - @"Sollicitudin iaculis vestibulum toss the mousie biting attack your ankles, puking nunc jump adipiscing in viverra.", - @"Nam zzz amet neque, bat tincidunt a iaculis sniff hiss bibendum leap nibh.", - @"Chase the red dot enim puking chuf, tristique et egestas sniff sollicitudin pharetra enim ut mauris a.", - @"Sagittis scratched et lick, hairball leap attack adipiscing catnip tail flick iaculis lick.", - @"Neque neque sleep in the sink neque sleep on your face, climb the curtains chuf tail flick sniff tortor non.", - @"Ac etiam kittens claw toss the mousie jump, pellentesque rhoncus litter box give me fish adipiscing mauris a.", - @"Pharetra egestas sunbathe faucibus ac fluffy fur, hiss feed me give me fish accumsan.", - @"Tortor leap tristique accumsan rutrum sleep in the sink, amet sollicitudin adipiscing dolor chase the red dot.", - @"Knock over the lamp pharetra vehicula sleep on your face rhoncus, jump elit cras nec quis quis nunc nam.", - @"Sollicitudin feed me et ac in viverra catnip, nunc eat I don't like that food iaculis give me fish.", - ]; - }); - - return placeholders; -} - -- (instancetype)initWithKittenOfSize:(CGSize)size -{ - if (!(self = [super init])) - return nil; - - _kittenSize = size; - - u_int32_t videoInitMethod = arc4random_uniform(3); - u_int32_t autoPlay = arc4random_uniform(2); - NSArray* methodArray = @[@"AVAsset", @"File URL", @"HLS URL"]; - NSArray* autoPlayArray = @[@"paused", @"auto play"]; - - switch (videoInitMethod) { - case 0: - // Construct an AVAsset from a URL - _videoNode = [[ASVideoNode alloc] init]; - _videoNode.asset = [AVAsset assetWithURL:[NSURL URLWithString:@"https://files.parsetfss.com/8a8a3b0c-619e-4e4d-b1d5-1b5ba9bf2b42/tfss-753fe655-86bb-46da-89b7-aa59c60e49c0-niccage.mp4"]]; - break; - - case 1: - // Construct the video node directly from the .mp4 URL - _videoNode = [[ASVideoNode alloc] init]; - _videoNode.asset = [AVAsset assetWithURL:[NSURL URLWithString:@"https://files.parsetfss.com/8a8a3b0c-619e-4e4d-b1d5-1b5ba9bf2b42/tfss-753fe655-86bb-46da-89b7-aa59c60e49c0-niccage.mp4"]]; - break; - - case 2: - // Construct the video node from an HTTP Live Streaming URL - // URL from https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/AVFoundationPG/Articles/02_Playback.html - _videoNode = [[ASVideoNode alloc] init]; - _videoNode.asset = [AVAsset assetWithURL:[NSURL URLWithString:@"http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8"]]; - break; - } - - if (autoPlay == 1) - _videoNode.shouldAutoplay = YES; - - _videoNode.shouldAutorepeat = YES; - _videoNode.backgroundColor = ASDisplayNodeDefaultPlaceholderColor(); - - [self addSubnode:_videoNode]; - - _textNode = [[ASTextNode alloc] init]; - _textNode.attributedString = [[NSAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@ %@ %@", methodArray[videoInitMethod], autoPlayArray[autoPlay], [self kittyIpsum]] - attributes:[self textStyle]]; - [self addSubnode:_textNode]; - - // hairline cell separator - _divider = [[ASDisplayNode alloc] init]; - _divider.backgroundColor = [UIColor lightGrayColor]; - [self addSubnode:_divider]; - - return self; -} - -- (NSString *)kittyIpsum -{ - NSArray *placeholders = [NicCageNode placeholders]; - u_int32_t ipsumCount = (u_int32_t)[placeholders count]; - u_int32_t location = arc4random_uniform(ipsumCount); - u_int32_t length = arc4random_uniform(ipsumCount - location); - - NSMutableString *string = [placeholders[location] mutableCopy]; - for (u_int32_t i = location + 1; i < location + length; i++) { - [string appendString:(i % 2 == 0) ? @"\n" : @" "]; - [string appendString:placeholders[i]]; - } - - return string; -} - -- (NSDictionary *)textStyle -{ - UIFont *font = [UIFont fontWithName:@"HelveticaNeue" size:12.0f]; - - NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; - style.paragraphSpacing = 0.5 * font.lineHeight; - style.hyphenationFactor = 1.0; - - return @{ NSFontAttributeName: font, - NSParagraphStyleAttributeName: style }; -} - -#if UseAutomaticLayout -- (ASLayoutSpec *)layoutSpecThatFits:(ASSizeRange)constrainedSize -{ - _videoNode.preferredFrameSize = _isImageEnlarged ? CGSizeMake(2.0 * kImageSize, 2.0 * kImageSize) : CGSizeMake(kImageSize, kImageSize); - _textNode.flexShrink = YES; - - ASStackLayoutSpec *stackSpec = [[ASStackLayoutSpec alloc] init]; - stackSpec.direction = ASStackLayoutDirectionHorizontal; - stackSpec.spacing = kInnerPadding; - [stackSpec setChildren:!_swappedTextAndImage ? @[_videoNode, _textNode] : @[_textNode, _videoNode]]; - - ASInsetLayoutSpec *insetSpec = [[ASInsetLayoutSpec alloc] init]; - insetSpec.insets = UIEdgeInsetsMake(kOuterPadding, kOuterPadding, kOuterPadding, kOuterPadding); - insetSpec.child = stackSpec; - - return insetSpec; -} - -// With box model, you don't need to override this method, unless you want to add custom logic. -- (void)layout -{ - [super layout]; - - // Manually layout the divider. - CGFloat pixelHeight = 1.0f / [[UIScreen mainScreen] scale]; - _divider.frame = CGRectMake(0.0f, 0.0f, self.calculatedSize.width, pixelHeight); -} -#else -- (CGSize)calculateSizeThatFits:(CGSize)constrainedSize -{ - CGSize imageSize = CGSizeMake(kImageSize, kImageSize); - CGSize textSize = [_textNode measure:CGSizeMake(constrainedSize.width - kImageSize - 2 * kOuterPadding - kInnerPadding, - constrainedSize.height)]; - - // ensure there's room for the text - CGFloat requiredHeight = MAX(textSize.height, imageSize.height); - return CGSizeMake(constrainedSize.width, requiredHeight + 2 * kOuterPadding); -} - -- (void)layout -{ - CGFloat pixelHeight = 1.0f / [[UIScreen mainScreen] scale]; - _divider.frame = CGRectMake(0.0f, 0.0f, self.calculatedSize.width, pixelHeight); - - _imageNode.frame = CGRectMake(kOuterPadding, kOuterPadding, kImageSize, kImageSize); - - CGSize textSize = _textNode.calculatedSize; - _textNode.frame = CGRectMake(kOuterPadding + kImageSize + kInnerPadding, kOuterPadding, textSize.width, textSize.height); -} -#endif - -- (void)toggleImageEnlargement -{ - _isImageEnlarged = !_isImageEnlarged; - [self setNeedsLayout]; -} - -- (void)toggleNodesSwap -{ - _swappedTextAndImage = !_swappedTextAndImage; - - [UIView animateWithDuration:0.15 animations:^{ - self.alpha = 0; - } completion:^(BOOL finished) { - [self setNeedsLayout]; - [self.view layoutIfNeeded]; - - [UIView animateWithDuration:0.15 animations:^{ - self.alpha = 1; - }]; - }]; -} - -- (void)updateBackgroundColor -{ - if (self.highlighted) { - self.backgroundColor = [UIColor lightGrayColor]; - } else if (self.selected) { - self.backgroundColor = [UIColor blueColor]; - } else { - self.backgroundColor = [UIColor whiteColor]; - } -} - -- (void)setSelected:(BOOL)selected -{ - [super setSelected:selected]; - [self updateBackgroundColor]; -} - -- (void)setHighlighted:(BOOL)highlighted -{ - [super setHighlighted:highlighted]; - [self updateBackgroundColor]; -} - -@end diff --git a/examples/VideoTableView/Sample/ViewController.h b/examples/VideoTableView/Sample/ViewController.h deleted file mode 100644 index d0e9200d88..0000000000 --- a/examples/VideoTableView/Sample/ViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -@interface ViewController : UIViewController - -@end diff --git a/examples/VideoTableView/Sample/ViewController.m b/examples/VideoTableView/Sample/ViewController.m deleted file mode 100644 index 062433ba4a..0000000000 --- a/examples/VideoTableView/Sample/ViewController.m +++ /dev/null @@ -1,199 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import "ViewController.h" - -#import -#import - -#import "BlurbNode.h" -#import "NicCageNode.h" -#import - -static const NSInteger kCageSize = 20; // intial number of Cage cells in ASTableView -static const NSInteger kCageBatchSize = 10; // number of Cage cells to add to ASTableView -static const NSInteger kMaxCageSize = 100; // max number of Cage cells allowed in ASTableView - -@interface ViewController () -{ - ASTableView *_tableView; - - // array of boxed CGSizes corresponding to placekitten.com kittens - NSMutableArray *_kittenDataSource; - - BOOL _dataSourceLocked; - NSIndexPath *_blurbNodeIndexPath; -} - -@property (nonatomic, strong) NSMutableArray *kittenDataSource; -@property (atomic, assign) BOOL dataSourceLocked; - -@end - -@implementation ViewController - -#pragma mark - -#pragma mark UIViewController. - -- (instancetype)init -{ - if (!(self = [super init])) - return nil; - - _tableView = [[ASTableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain asyncDataFetching:YES]; - _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; // KittenNode has its own separator - _tableView.asyncDataSource = self; - _tableView.asyncDelegate = self; - - // populate our "data source" with some random kittens - _kittenDataSource = [self createLitterWithSize:kCageSize]; - - _blurbNodeIndexPath = [NSIndexPath indexPathForItem:0 inSection:0]; - - self.title = @"Nic Cage"; - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit - target:self - action:@selector(toggleEditingMode)]; - - return self; -} - -- (NSMutableArray *)createLitterWithSize:(NSInteger)litterSize -{ - NSMutableArray *cages = [NSMutableArray arrayWithCapacity:litterSize]; - for (NSInteger i = 0; i < litterSize; i++) { - - u_int32_t deltaX = arc4random_uniform(10) - 5; - u_int32_t deltaY = arc4random_uniform(10) - 5; - CGSize size = CGSizeMake(350 + 2 * deltaX, 350 + 4 * deltaY); - - [cages addObject:[NSValue valueWithCGSize:size]]; - } - return cages; -} - -- (void)setKittenDataSource:(NSMutableArray *)kittenDataSource { - ASDisplayNodeAssert(!self.dataSourceLocked, @"Could not update data source when it is locked !"); - - _kittenDataSource = kittenDataSource; -} - -- (void)viewDidLoad -{ - [super viewDidLoad]; - - [self.view addSubview:_tableView]; -} - -- (void)viewWillLayoutSubviews -{ - _tableView.frame = self.view.bounds; -} - -- (void)toggleEditingMode -{ - [_tableView setEditing:!_tableView.editing animated:YES]; -} - -#pragma mark - -#pragma mark ASTableView. - -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath -{ - [_tableView deselectRowAtIndexPath:indexPath animated:YES]; - // Assume only kitten nodes are selectable (see -tableView:shouldHighlightRowAtIndexPath:). - NicCageNode *node = (NicCageNode *)[_tableView nodeForRowAtIndexPath:indexPath]; - [node toggleImageEnlargement]; -} - -- (ASCellNode *)tableView:(ASTableView *)tableView nodeForRowAtIndexPath:(NSIndexPath *)indexPath -{ - // special-case the first row - if ([_blurbNodeIndexPath compare:indexPath] == NSOrderedSame) { - BlurbNode *node = [[BlurbNode alloc] init]; - return node; - } - - NSValue *size = _kittenDataSource[indexPath.row - 1]; - NicCageNode *node = [[NicCageNode alloc] initWithKittenOfSize:size.CGSizeValue]; - return node; -} - -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section -{ - // blurb node + kLitterSize kitties - return 1 + _kittenDataSource.count; -} - -- (BOOL)tableView:(UITableView *)tableView shouldHighlightRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Enable selection for kitten nodes - return [_blurbNodeIndexPath compare:indexPath] != NSOrderedSame; -} - -- (void)tableViewLockDataSource:(ASTableView *)tableView -{ - self.dataSourceLocked = YES; -} - -- (void)tableViewUnlockDataSource:(ASTableView *)tableView -{ - self.dataSourceLocked = NO; -} - -- (BOOL)shouldBatchFetchForTableView:(UITableView *)tableView -{ - return _kittenDataSource.count < kMaxCageSize; -} - -- (void)tableView:(UITableView *)tableView willBeginBatchFetchWithContext:(ASBatchContext *)context -{ - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - sleep(1); - dispatch_async(dispatch_get_main_queue(), ^{ - - // populate a new array of random-sized kittens - NSArray *moarKittens = [self createLitterWithSize:kCageBatchSize]; - - NSMutableArray *indexPaths = [[NSMutableArray alloc] init]; - - // find number of kittens in the data source and create their indexPaths - NSInteger existingRows = _kittenDataSource.count + 1; - - for (NSInteger i = 0; i < moarKittens.count; i++) { - [indexPaths addObject:[NSIndexPath indexPathForRow:existingRows + i inSection:0]]; - } - - // add new kittens to the data source & notify table of new indexpaths - [_kittenDataSource addObjectsFromArray:moarKittens]; - [tableView insertRowsAtIndexPaths:indexPaths withRowAnimation:UITableViewRowAnimationFade]; - - [context completeBatchFetching:YES]; - }); - }); -} - -- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath -{ - // Enable editing for Kitten nodes - return [_blurbNodeIndexPath compare:indexPath] != NSOrderedSame; -} - -- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath -{ - if (editingStyle == UITableViewCellEditingStyleDelete) { - // Assume only kitten nodes are editable (see -tableView:canEditRowAtIndexPath:). - [_kittenDataSource removeObjectAtIndex:indexPath.row - 1]; - [_tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationAutomatic]; - } -} - -@end diff --git a/examples/VideoTableView/Sample/main.m b/examples/VideoTableView/Sample/main.m deleted file mode 100644 index ae9488711c..0000000000 --- a/examples/VideoTableView/Sample/main.m +++ /dev/null @@ -1,20 +0,0 @@ -/* This file provided by Facebook is for non-commercial testing and evaluation - * purposes only. Facebook reserves all rights not expressly granted. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * FACEBOOK BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/examples/Videos/Podfile b/examples/Videos/Podfile index ff6637ee68..919de4b311 100644 --- a/examples/Videos/Podfile +++ b/examples/Videos/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples/Videos/Sample.xcworkspace/contents.xcworkspacedata b/examples/Videos/Sample.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 7b5a2f3050..0000000000 --- a/examples/Videos/Sample.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/examples/Videos/best.png b/examples/Videos/best.png deleted file mode 100644 index d50d8103a6..0000000000 Binary files a/examples/Videos/best.png and /dev/null differ diff --git a/examples/Videos/medium.png b/examples/Videos/medium.png deleted file mode 100644 index 7c08e0adc0..0000000000 Binary files a/examples/Videos/medium.png and /dev/null differ diff --git a/examples/Videos/worst.png b/examples/Videos/worst.png deleted file mode 100644 index 78727fa98f..0000000000 Binary files a/examples/Videos/worst.png and /dev/null differ diff --git a/examples_extra/ASTableViewStressTest/Podfile b/examples_extra/ASTableViewStressTest/Podfile index ff6637ee68..919de4b311 100644 --- a/examples_extra/ASTableViewStressTest/Podfile +++ b/examples_extra/ASTableViewStressTest/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples_extra/CollectionViewWithViewControllerCells/Podfile b/examples_extra/CollectionViewWithViewControllerCells/Podfile index ff6637ee68..919de4b311 100644 --- a/examples_extra/CollectionViewWithViewControllerCells/Podfile +++ b/examples_extra/CollectionViewWithViewControllerCells/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples_extra/SynchronousConcurrency/Podfile b/examples_extra/SynchronousConcurrency/Podfile index ff6637ee68..919de4b311 100644 --- a/examples_extra/SynchronousConcurrency/Podfile +++ b/examples_extra/SynchronousConcurrency/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples_extra/SynchronousKittens/Podfile b/examples_extra/SynchronousKittens/Podfile index ff6637ee68..919de4b311 100644 --- a/examples_extra/SynchronousKittens/Podfile +++ b/examples_extra/SynchronousKittens/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end diff --git a/examples_extra/VideoTableView/Podfile b/examples_extra/VideoTableView/Podfile index ff6637ee68..919de4b311 100644 --- a/examples_extra/VideoTableView/Podfile +++ b/examples_extra/VideoTableView/Podfile @@ -1,5 +1,5 @@ source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '7.1' +platform :ios, '7.0' target 'Sample' do pod 'AsyncDisplayKit', :path => '../..' end