diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj new file mode 100644 index 00000000..7232ec9f --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.pbxproj @@ -0,0 +1,376 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 13687D481DF8748400E7C260 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13687D471DF8748400E7C260 /* main.m */; }; + 13687D4B1DF8748400E7C260 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13687D4A1DF8748400E7C260 /* AppDelegate.m */; }; + 13687D4E1DF8748400E7C260 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13687D4D1DF8748400E7C260 /* ViewController.m */; }; + 13687D531DF8748400E7C260 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13687D521DF8748400E7C260 /* Assets.xcassets */; }; + 13687D781DF878C600E7C260 /* YGEnums.h in yoga */ = {isa = PBXBuildFile; fileRef = 13687D5E1DF8778F00E7C260 /* YGEnums.h */; }; + 13687D791DF878C600E7C260 /* YGMacros.h in yoga */ = {isa = PBXBuildFile; fileRef = 13687D5F1DF8778F00E7C260 /* YGMacros.h */; }; + 13687D7A1DF878C600E7C260 /* Yoga.h in yoga */ = {isa = PBXBuildFile; fileRef = 13687D631DF8778F00E7C260 /* Yoga.h */; }; + 13687D7C1DF878DD00E7C260 /* UIView+Yoga.h in YogaKit */ = {isa = PBXBuildFile; fileRef = 13687D691DF8778F00E7C260 /* UIView+Yoga.h */; }; + 13687D801DF87CEC00E7C260 /* UIView+Yoga.m in Sources */ = {isa = PBXBuildFile; fileRef = 13687D6A1DF8778F00E7C260 /* UIView+Yoga.m */; }; + 13687D811DF87CF200E7C260 /* YGNodeList.c in Sources */ = {isa = PBXBuildFile; fileRef = 13687D601DF8778F00E7C260 /* YGNodeList.c */; }; + 13687D821DF87CF200E7C260 /* Yoga.c in Sources */ = {isa = PBXBuildFile; fileRef = 13687D621DF8778F00E7C260 /* Yoga.c */; }; + 13687D851DF87D1E00E7C260 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13687D841DF87D1E00E7C260 /* UIKit.framework */; }; + 13687D871DF87D2400E7C260 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 13687D861DF87D2400E7C260 /* Foundation.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 13687D771DF878A000E7C260 /* yoga */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = include/yoga; + dstSubfolderSpec = 16; + files = ( + 13687D781DF878C600E7C260 /* YGEnums.h in yoga */, + 13687D791DF878C600E7C260 /* YGMacros.h in yoga */, + 13687D7A1DF878C600E7C260 /* Yoga.h in yoga */, + ); + name = yoga; + runOnlyForDeploymentPostprocessing = 0; + }; + 13687D7B1DF878CE00E7C260 /* YogaKit */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = include/YogaKit; + dstSubfolderSpec = 16; + files = ( + 13687D7C1DF878DD00E7C260 /* UIView+Yoga.h in YogaKit */, + ); + name = YogaKit; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 13687D431DF8748400E7C260 /* YogaKitSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = YogaKitSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13687D471DF8748400E7C260 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 13687D491DF8748400E7C260 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 13687D4A1DF8748400E7C260 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 13687D4C1DF8748400E7C260 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; + 13687D4D1DF8748400E7C260 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; + 13687D521DF8748400E7C260 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 13687D571DF8748400E7C260 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 13687D5E1DF8778F00E7C260 /* YGEnums.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YGEnums.h; sourceTree = ""; }; + 13687D5F1DF8778F00E7C260 /* YGMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YGMacros.h; sourceTree = ""; }; + 13687D601DF8778F00E7C260 /* YGNodeList.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = YGNodeList.c; sourceTree = ""; }; + 13687D611DF8778F00E7C260 /* YGNodeList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = YGNodeList.h; sourceTree = ""; }; + 13687D621DF8778F00E7C260 /* Yoga.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = Yoga.c; sourceTree = ""; }; + 13687D631DF8778F00E7C260 /* Yoga.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Yoga.h; sourceTree = ""; }; + 13687D691DF8778F00E7C260 /* UIView+Yoga.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIView+Yoga.h"; sourceTree = ""; }; + 13687D6A1DF8778F00E7C260 /* UIView+Yoga.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIView+Yoga.m"; sourceTree = ""; }; + 13687D841DF87D1E00E7C260 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; + 13687D861DF87D2400E7C260 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 13687D401DF8748300E7C260 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 13687D871DF87D2400E7C260 /* Foundation.framework in Frameworks */, + 13687D851DF87D1E00E7C260 /* UIKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 13687D3A1DF8748300E7C260 = { + isa = PBXGroup; + children = ( + 13687D5D1DF8778F00E7C260 /* yoga */, + 13687D641DF8778F00E7C260 /* YogaKit */, + 13687D451DF8748400E7C260 /* YogaKitSample */, + 13687D441DF8748400E7C260 /* Products */, + 13687D831DF87D1E00E7C260 /* Frameworks */, + ); + sourceTree = ""; + }; + 13687D441DF8748400E7C260 /* Products */ = { + isa = PBXGroup; + children = ( + 13687D431DF8748400E7C260 /* YogaKitSample.app */, + ); + name = Products; + sourceTree = ""; + }; + 13687D451DF8748400E7C260 /* YogaKitSample */ = { + isa = PBXGroup; + children = ( + 13687D491DF8748400E7C260 /* AppDelegate.h */, + 13687D4A1DF8748400E7C260 /* AppDelegate.m */, + 13687D4C1DF8748400E7C260 /* ViewController.h */, + 13687D4D1DF8748400E7C260 /* ViewController.m */, + 13687D521DF8748400E7C260 /* Assets.xcassets */, + 13687D571DF8748400E7C260 /* Info.plist */, + 13687D461DF8748400E7C260 /* Supporting Files */, + ); + path = YogaKitSample; + sourceTree = ""; + }; + 13687D461DF8748400E7C260 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 13687D471DF8748400E7C260 /* main.m */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 13687D5D1DF8778F00E7C260 /* yoga */ = { + isa = PBXGroup; + children = ( + 13687D5E1DF8778F00E7C260 /* YGEnums.h */, + 13687D5F1DF8778F00E7C260 /* YGMacros.h */, + 13687D601DF8778F00E7C260 /* YGNodeList.c */, + 13687D611DF8778F00E7C260 /* YGNodeList.h */, + 13687D621DF8778F00E7C260 /* Yoga.c */, + 13687D631DF8778F00E7C260 /* Yoga.h */, + ); + name = yoga; + path = ../../yoga; + sourceTree = ""; + }; + 13687D641DF8778F00E7C260 /* YogaKit */ = { + isa = PBXGroup; + children = ( + 13687D691DF8778F00E7C260 /* UIView+Yoga.h */, + 13687D6A1DF8778F00E7C260 /* UIView+Yoga.m */, + ); + name = YogaKit; + path = ..; + sourceTree = ""; + }; + 13687D831DF87D1E00E7C260 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 13687D861DF87D2400E7C260 /* Foundation.framework */, + 13687D841DF87D1E00E7C260 /* UIKit.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 13687D421DF8748300E7C260 /* YogaKitSample */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13687D5A1DF8748400E7C260 /* Build configuration list for PBXNativeTarget "YogaKitSample" */; + buildPhases = ( + 13687D771DF878A000E7C260 /* yoga */, + 13687D7B1DF878CE00E7C260 /* YogaKit */, + 13687D3F1DF8748300E7C260 /* Sources */, + 13687D401DF8748300E7C260 /* Frameworks */, + 13687D411DF8748300E7C260 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = YogaKitSample; + productName = YogaKitSample; + productReference = 13687D431DF8748400E7C260 /* YogaKitSample.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 13687D3B1DF8748300E7C260 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0810; + ORGANIZATIONNAME = facebook; + TargetAttributes = { + 13687D421DF8748300E7C260 = { + CreatedOnToolsVersion = 8.1; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 13687D3E1DF8748300E7C260 /* Build configuration list for PBXProject "YogaKitSample" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 13687D3A1DF8748300E7C260; + productRefGroup = 13687D441DF8748400E7C260 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13687D421DF8748300E7C260 /* YogaKitSample */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 13687D411DF8748300E7C260 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13687D531DF8748400E7C260 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 13687D3F1DF8748300E7C260 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13687D801DF87CEC00E7C260 /* UIView+Yoga.m in Sources */, + 13687D4E1DF8748400E7C260 /* ViewController.m in Sources */, + 13687D4B1DF8748400E7C260 /* AppDelegate.m in Sources */, + 13687D821DF87CF200E7C260 /* Yoga.c in Sources */, + 13687D811DF87CF200E7C260 /* YGNodeList.c in Sources */, + 13687D481DF8748400E7C260 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 13687D581DF8748400E7C260 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.1; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 13687D591DF8748400E7C260 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + 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_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVES = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.1; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 13687D5B1DF8748400E7C260 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = YogaKitSample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 13687D5C1DF8748400E7C260 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = YogaKitSample/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = com.facebook.YogaKitSample; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 13687D3E1DF8748300E7C260 /* Build configuration list for PBXProject "YogaKitSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13687D581DF8748400E7C260 /* Debug */, + 13687D591DF8748400E7C260 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 13687D5A1DF8748400E7C260 /* Build configuration list for PBXNativeTarget "YogaKitSample" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13687D5B1DF8748400E7C260 /* Debug */, + 13687D5C1DF8748400E7C260 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; +/* End XCConfigurationList section */ + }; + rootObject = 13687D3B1DF8748300E7C260 /* Project object */; +} diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..b8f12e0b --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/xcuserdata/emilsj.xcuserdatad/UserInterfaceState.xcuserstate b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/xcuserdata/emilsj.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..c1f7d4ac Binary files /dev/null and b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/project.xcworkspace/xcuserdata/emilsj.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcuserdata/emilsj.xcuserdatad/xcschemes/YogaKitSample.xcscheme b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcuserdata/emilsj.xcuserdatad/xcschemes/YogaKitSample.xcscheme new file mode 100644 index 00000000..e785e85e --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcuserdata/emilsj.xcuserdatad/xcschemes/YogaKitSample.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcuserdata/emilsj.xcuserdatad/xcschemes/xcschememanagement.plist b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcuserdata/emilsj.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..336f995f --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample.xcodeproj/xcuserdata/emilsj.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,22 @@ + + + + + SchemeUserState + + YogaKitSample.xcscheme + + orderHint + 0 + + + SuppressBuildableAutocreation + + 13687D421DF8748300E7C260 + + primary + + + + + diff --git a/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.h b/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.h new file mode 100644 index 00000000..fd215a3e --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.h @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@interface AppDelegate : UIResponder + +@property (strong, nonatomic) UIWindow *window; + +@end + diff --git a/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.m b/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.m new file mode 100644 index 00000000..7b256fa4 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample/AppDelegate.m @@ -0,0 +1,28 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "AppDelegate.h" +#import "ViewController.h" + +@interface AppDelegate () + +@end + +@implementation AppDelegate + + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; + self.window.rootViewController = [ViewController new]; + self.window.backgroundColor = [UIColor whiteColor]; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..b8236c65 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,48 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/YogaKit/YogaKitSample/YogaKitSample/Info.plist b/YogaKit/YogaKitSample/YogaKitSample/Info.plist new file mode 100644 index 00000000..22ca2cd4 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample/Info.plist @@ -0,0 +1,36 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/YogaKit/YogaKitSample/YogaKitSample/ViewController.h b/YogaKit/YogaKitSample/YogaKitSample/ViewController.h new file mode 100644 index 00000000..3ac7561c --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample/ViewController.h @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@interface ViewController : UIViewController + + +@end + diff --git a/YogaKit/YogaKitSample/YogaKitSample/ViewController.m b/YogaKit/YogaKitSample/YogaKitSample/ViewController.m new file mode 100644 index 00000000..9fcdcdc1 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample/ViewController.m @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "ViewController.h" + +#import + +@interface ViewController () + +@end + +@implementation ViewController + +- (void)viewDidLoad +{ + UIView *root = self.view; + root.backgroundColor = [UIColor redColor]; + [root yg_setUsesYoga:YES]; + [root yg_setWidth:self.view.bounds.size.width]; + [root yg_setHeight:self.view.bounds.size.height]; + [root yg_setAlignItems:YGAlignCenter]; + [root yg_setJustifyContent:YGJustifyCenter]; + + UIView *child1 = [UIView new]; + child1.backgroundColor = [UIColor blueColor]; + [child1 yg_setUsesYoga:YES]; + [child1 yg_setWidth:100]; + [child1 yg_setHeight:100]; + + UIView *child2 = [UIView new]; + child2.backgroundColor = [UIColor greenColor]; + child2.frame = (CGRect) { + .size = { + .width = 200, + .height = 100, + } + }; + + UIView *child3 = [UIView new]; + child3.backgroundColor = [UIColor yellowColor]; + child3.frame = (CGRect) { + .size = { + .width = 100, + .height = 100, + } + }; + + [child2 addSubview:child3]; + [root addSubview:child1]; + [root addSubview:child2]; + [root yg_applyLayout]; +} + + +@end diff --git a/YogaKit/YogaKitSample/YogaKitSample/main.m b/YogaKit/YogaKitSample/YogaKitSample/main.m new file mode 100644 index 00000000..9e12b064 --- /dev/null +++ b/YogaKit/YogaKitSample/YogaKitSample/main.m @@ -0,0 +1,17 @@ +/** + * Copyright (c) 2014-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +}