Skip to content

Commit

Permalink
Implementation of layout.centers(of: UIView) and layout.centers()
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc Dion authored and Luc Dion committed Mar 6, 2017
1 parent dda7f27 commit 803659e
Show file tree
Hide file tree
Showing 24 changed files with 886 additions and 198 deletions.
63 changes: 4 additions & 59 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,65 +1,10 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xcuserstate

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
.build/

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Pods/
Carthage/Build

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
MCSwiftLayoutSample/Pods
xcuserdata
*.xcworkspace
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Gemfile
source 'https://rubygems.org'

gem 'cocoapods', '~>1.1.0'
gem 'synx', '~> 0.2.1'
Binary file modified Keynote Layout presentation.key
Binary file not shown.
83 changes: 83 additions & 0 deletions MCSwiftLayout.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@

/* Begin PBXBuildFile section */
2439CC311E6659FA003326FB /* Layout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2439CC301E6659FA003326FB /* Layout.swift */; };
246D36481E6C46F50050F202 /* BasicTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 246D36471E6C46F50050F202 /* BasicTests.swift */; };
249EFE841E64FB4C00165E39 /* MCSwiftLayout.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 249EFE7A1E64FB4C00165E39 /* MCSwiftLayout.framework */; };
249EFE891E64FB4C00165E39 /* MCSwiftLayoutTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 249EFE881E64FB4C00165E39 /* MCSwiftLayoutTests.swift */; };
249EFE8B1E64FB4C00165E39 /* MCSwiftLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 249EFE7D1E64FB4C00165E39 /* MCSwiftLayout.h */; settings = {ATTRIBUTES = (Public, ); }; };
E88B11042FE48DD3D4E7EB0C /* Pods_MCSwiftLayoutTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB717599553AA71EE659C312 /* Pods_MCSwiftLayoutTests.framework */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand All @@ -25,12 +27,16 @@

/* Begin PBXFileReference section */
2439CC301E6659FA003326FB /* Layout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Layout.swift; sourceTree = "<group>"; };
246D36471E6C46F50050F202 /* BasicTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BasicTests.swift; sourceTree = "<group>"; };
249EFE7A1E64FB4C00165E39 /* MCSwiftLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MCSwiftLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; };
249EFE7D1E64FB4C00165E39 /* MCSwiftLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MCSwiftLayout.h; sourceTree = "<group>"; };
249EFE7E1E64FB4C00165E39 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
249EFE831E64FB4C00165E39 /* MCSwiftLayoutTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MCSwiftLayoutTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
249EFE881E64FB4C00165E39 /* MCSwiftLayoutTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MCSwiftLayoutTests.swift; sourceTree = "<group>"; };
249EFE8A1E64FB4C00165E39 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
657A2A825B5BD607ACB09F58 /* Pods-MCSwiftLayoutTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MCSwiftLayoutTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MCSwiftLayoutTests/Pods-MCSwiftLayoutTests.debug.xcconfig"; sourceTree = "<group>"; };
DB717599553AA71EE659C312 /* Pods_MCSwiftLayoutTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MCSwiftLayoutTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E8C9302287EF4331340F627C /* Pods-MCSwiftLayoutTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MCSwiftLayoutTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-MCSwiftLayoutTests/Pods-MCSwiftLayoutTests.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -46,18 +52,29 @@
buildActionMask = 2147483647;
files = (
249EFE841E64FB4C00165E39 /* MCSwiftLayout.framework in Frameworks */,
E88B11042FE48DD3D4E7EB0C /* Pods_MCSwiftLayoutTests.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
138A1F602470415292B7194B /* Frameworks */ = {
isa = PBXGroup;
children = (
DB717599553AA71EE659C312 /* Pods_MCSwiftLayoutTests.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
249EFE701E64FB4C00165E39 = {
isa = PBXGroup;
children = (
249EFE7C1E64FB4C00165E39 /* MCSwiftLayout */,
249EFE871E64FB4C00165E39 /* MCSwiftLayoutTests */,
249EFE7B1E64FB4C00165E39 /* Products */,
8604B3F1C9C7A0EB2F11356F /* Pods */,
138A1F602470415292B7194B /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -84,11 +101,21 @@
isa = PBXGroup;
children = (
249EFE881E64FB4C00165E39 /* MCSwiftLayoutTests.swift */,
246D36471E6C46F50050F202 /* BasicTests.swift */,
249EFE8A1E64FB4C00165E39 /* Info.plist */,
);
path = MCSwiftLayoutTests;
sourceTree = "<group>";
};
8604B3F1C9C7A0EB2F11356F /* Pods */ = {
isa = PBXGroup;
children = (
657A2A825B5BD607ACB09F58 /* Pods-MCSwiftLayoutTests.debug.xcconfig */,
E8C9302287EF4331340F627C /* Pods-MCSwiftLayoutTests.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -125,9 +152,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 249EFE911E64FB4C00165E39 /* Build configuration list for PBXNativeTarget "MCSwiftLayoutTests" */;
buildPhases = (
DD0B0B702D32991A998E967B /* [CP] Check Pods Manifest.lock */,
249EFE7F1E64FB4C00165E39 /* Sources */,
249EFE801E64FB4C00165E39 /* Frameworks */,
249EFE811E64FB4C00165E39 /* Resources */,
45B171B50A18EC68ECE6BBC9 /* [CP] Embed Pods Frameworks */,
876430984866C52BFD6C79B8 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -197,6 +227,54 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
45B171B50A18EC68ECE6BBC9 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/MCSwiftLayoutSample/Pods/Target Support Files/Pods-MCSwiftLayoutTests/Pods-MCSwiftLayoutTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
876430984866C52BFD6C79B8 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/MCSwiftLayoutSample/Pods/Target Support Files/Pods-MCSwiftLayoutTests/Pods-MCSwiftLayoutTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
DD0B0B702D32991A998E967B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
249EFE751E64FB4C00165E39 /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand All @@ -210,6 +288,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
246D36481E6C46F50050F202 /* BasicTests.swift in Sources */,
249EFE891E64FB4C00165E39 /* MCSwiftLayoutTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -336,6 +415,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = MCSwiftLayout/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mirego.MCSwiftLayout;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -357,6 +437,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = MCSwiftLayout/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.mirego.MCSwiftLayout;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -367,6 +448,7 @@
};
249EFE921E64FB4C00165E39 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 657A2A825B5BD607ACB09F58 /* Pods-MCSwiftLayoutTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
DEVELOPMENT_TEAM = 4Q596JWQC5;
Expand All @@ -380,6 +462,7 @@
};
249EFE931E64FB4C00165E39 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = E8C9302287EF4331340F627C /* Pods-MCSwiftLayoutTests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
DEVELOPMENT_TEAM = 4Q596JWQC5;
Expand Down
Loading

0 comments on commit 803659e

Please sign in to comment.