Skip to content

Commit

Permalink
Merge pull request #4 from RamonGilabert/swift-3
Browse files Browse the repository at this point in the history
Swift 3
  • Loading branch information
RamonGilabert authored Oct 11, 2016
2 parents 5383cdc + 16d7641 commit 73f851b
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 112 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "RamonGilabert/Walker" "master"
github "RamonGilabert/Walker" "swift-3"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "RamonGilabert/Walker" "2b98a312810756f4c92c8f7cf1c8cb3a5c800e84"
github "RamonGilabert/Walker" "47b9490594e29fea29ba6ce0b53763da3ccecc77"
4 changes: 2 additions & 2 deletions Demo/Morgan/Morgan/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
window = UIWindow()
window?.frame = UIScreen.mainScreen().bounds
window?.frame = UIScreen.main.bounds
window?.rootViewController = controller
window?.makeKeyAndVisible()

Expand Down
30 changes: 15 additions & 15 deletions Demo/Morgan/Morgan/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class ViewController: UIViewController {

lazy var animationView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.whiteColor()
view.backgroundColor = UIColor.white
view.translatesAutoresizingMaskIntoConstraints = false
view.layer.cornerRadius = 7.5
view.layer.shadowColor = UIColor.blackColor().colorWithAlphaComponent(0.15).CGColor
view.layer.shadowColor = UIColor.black.withAlphaComponent(0.15).cgColor
view.layer.shadowOffset.height = 5
view.layer.shadowRadius = 5
view.layer.shadowOpacity = 1
Expand All @@ -24,8 +24,8 @@ class ViewController: UIViewController {
lazy var codeLabel: UILabel = {
let label = UILabel()
label.font = UIFont(name: "Menlo-Regular", size: 16)
label.textColor = UIColor.whiteColor()
label.textAlignment = .Center
label.textColor = UIColor.white
label.textAlignment = .center
label.text = "Tap the view to animate"
label.translatesAutoresizingMaskIntoConstraints = false

Expand All @@ -34,7 +34,7 @@ class ViewController: UIViewController {

lazy var tapGesture: UITapGestureRecognizer = { [unowned self] in
let gesture = UITapGestureRecognizer()
gesture.addTarget(self, action: "handleTapGesture")
gesture.addTarget(self, action: #selector(ViewController.handleTapGesture))

return gesture
}()
Expand Down Expand Up @@ -85,20 +85,20 @@ class ViewController: UIViewController {
// MARK: - Configuration

func setupConstraints() {
NSLayoutConstraint.activateConstraints([
codeLabel.centerXAnchor.constraintEqualToAnchor(view.centerXAnchor),
codeLabel.centerYAnchor.constraintGreaterThanOrEqualToAnchor(animationView.topAnchor, constant: -75),

animationView.widthAnchor.constraintEqualToConstant(Dimensions.viewSize),
animationView.heightAnchor.constraintEqualToConstant(Dimensions.viewSize),
animationView.centerXAnchor.constraintEqualToAnchor(view.centerXAnchor),
animationView.centerYAnchor.constraintGreaterThanOrEqualToAnchor(view.centerYAnchor, constant: -120)
NSLayoutConstraint.activate([
codeLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),
codeLabel.centerYAnchor.constraint(greaterThanOrEqualTo: animationView.topAnchor, constant: -75),

animationView.widthAnchor.constraint(equalToConstant: Dimensions.viewSize),
animationView.heightAnchor.constraint(equalToConstant: Dimensions.viewSize),
animationView.centerXAnchor.constraint(equalTo: view.centerXAnchor),
animationView.centerYAnchor.constraint(greaterThanOrEqualTo: view.centerYAnchor, constant: -120)
])
}

// MARK: - Helper methods

override func preferredStatusBarStyle() -> UIStatusBarStyle {
return .LightContent
override var preferredStatusBarStyle : UIStatusBarStyle {
return .lightContent
}
}
86 changes: 49 additions & 37 deletions Demo/Morgan/MorganDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,28 @@
292D71F91C94A8B600CFC060 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292D71F81C94A8B600CFC060 /* ViewController.swift */; };
292D71FE1C94A8B600CFC060 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 292D71FD1C94A8B600CFC060 /* Assets.xcassets */; };
292D72011C94A8B600CFC060 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 292D71FF1C94A8B600CFC060 /* LaunchScreen.storyboard */; };
45579E752024A00F64B9AF8F /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A432EA12B87936021380A1BC /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
CB83812CBA247881C2F5C6D4 /* Pods_MorganDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A30B468D350C63FCF4B883AD /* Pods_MorganDemo.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
292D71F31C94A8B600CFC060 /* MorganDemoDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MorganDemoDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
292D71F31C94A8B600CFC060 /* MorganDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MorganDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
292D71F61C94A8B600CFC060 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
292D71F81C94A8B600CFC060 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
292D71FD1C94A8B600CFC060 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
292D72001C94A8B600CFC060 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
292D72021C94A8B600CFC060 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
770E2BDA39EF0F869117FDED /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
3FC181F93B1C398BBFEB973D /* Pods-MorganDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MorganDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-MorganDemo/Pods-MorganDemo.release.xcconfig"; sourceTree = "<group>"; };
A30B468D350C63FCF4B883AD /* Pods_MorganDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MorganDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A432EA12B87936021380A1BC /* Pods.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods.framework; sourceTree = BUILT_PRODUCTS_DIR; };
DA319F3D60C66C06465AD417 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
FE0392565841E703803D9D17 /* Pods-MorganDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MorganDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-MorganDemo/Pods-MorganDemo.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
292D71F01C94A8B600CFC060 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
45579E752024A00F64B9AF8F /* Pods.framework in Frameworks */,
CB83812CBA247881C2F5C6D4 /* Pods_MorganDemo.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -43,15 +44,15 @@
children = (
292D71F51C94A8B600CFC060 /* Morgan */,
292D71F41C94A8B600CFC060 /* Products */,
6E414493080EC22AA7FAFCB8 /* Pods */,
9DDF929442EE3A071541D37B /* Frameworks */,
C00DA1E61423DD9B1103818A /* Pods */,
);
sourceTree = "<group>";
};
292D71F41C94A8B600CFC060 /* Products */ = {
isa = PBXGroup;
children = (
292D71F31C94A8B600CFC060 /* MorganDemoDemo.app */,
292D71F31C94A8B600CFC060 /* MorganDemo.app */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -68,44 +69,45 @@
path = Morgan;
sourceTree = "<group>";
};
6E414493080EC22AA7FAFCB8 /* Pods */ = {
9DDF929442EE3A071541D37B /* Frameworks */ = {
isa = PBXGroup;
children = (
DA319F3D60C66C06465AD417 /* Pods.debug.xcconfig */,
770E2BDA39EF0F869117FDED /* Pods.release.xcconfig */,
A432EA12B87936021380A1BC /* Pods.framework */,
A30B468D350C63FCF4B883AD /* Pods_MorganDemo.framework */,
);
name = Pods;
name = Frameworks;
sourceTree = "<group>";
};
9DDF929442EE3A071541D37B /* Frameworks */ = {
C00DA1E61423DD9B1103818A /* Pods */ = {
isa = PBXGroup;
children = (
A432EA12B87936021380A1BC /* Pods.framework */,
FE0392565841E703803D9D17 /* Pods-MorganDemo.debug.xcconfig */,
3FC181F93B1C398BBFEB973D /* Pods-MorganDemo.release.xcconfig */,
);
name = Frameworks;
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
292D71F21C94A8B600CFC060 /* MorganDemoDemo */ = {
292D71F21C94A8B600CFC060 /* MorganDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 292D72051C94A8B600CFC060 /* Build configuration list for PBXNativeTarget "MorganDemoDemo" */;
buildConfigurationList = 292D72051C94A8B600CFC060 /* Build configuration list for PBXNativeTarget "MorganDemo" */;
buildPhases = (
2CFA418D57C4ADD17770DB1B /* Check Pods Manifest.lock */,
418DBD9A9BA5C9321B6B74D4 /* [CP] Check Pods Manifest.lock */,
292D71EF1C94A8B600CFC060 /* Sources */,
292D71F01C94A8B600CFC060 /* Frameworks */,
292D71F11C94A8B600CFC060 /* Resources */,
93C696F91B64E99F59243A22 /* Embed Pods Frameworks */,
1B5EF2CFF7354A6DB658D736 /* Copy Pods Resources */,
8DE9FBB88DEB46D68BFAAD1F /* [CP] Embed Pods Frameworks */,
F0FF4046365805FB3156ED9B /* [CP] Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = MorganDemoDemo;
name = MorganDemo;
productName = Morgan;
productReference = 292D71F31C94A8B600CFC060 /* MorganDemoDemo.app */;
productReference = 292D71F31C94A8B600CFC060 /* MorganDemo.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand All @@ -115,11 +117,12 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = RamonGilabert;
TargetAttributes = {
292D71F21C94A8B600CFC060 = {
CreatedOnToolsVersion = 7.2.1;
LastSwiftMigration = 0800;
};
};
};
Expand All @@ -136,7 +139,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
292D71F21C94A8B600CFC060 /* MorganDemoDemo */,
292D71F21C94A8B600CFC060 /* MorganDemo */,
);
};
/* End PBXProject section */
Expand All @@ -154,49 +157,49 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
1B5EF2CFF7354A6DB658D736 /* Copy Pods Resources */ = {
418DBD9A9BA5C9321B6B74D4 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
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;
};
2CFA418D57C4ADD17770DB1B /* Check Pods Manifest.lock */ = {
8DE9FBB88DEB46D68BFAAD1F /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
name = "[CP] Embed Pods Frameworks";
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";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MorganDemo/Pods-MorganDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
93C696F91B64E99F59243A22 /* Embed Pods Frameworks */ = {
F0FF4046365805FB3156ED9B /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-MorganDemo/Pods-MorganDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -238,8 +241,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
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_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand Down Expand Up @@ -282,8 +287,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
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_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
Expand All @@ -302,31 +309,36 @@
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
292D72061C94A8B600CFC060 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DA319F3D60C66C06465AD417 /* Pods.debug.xcconfig */;
baseConfigurationReference = FE0392565841E703803D9D17 /* Pods-MorganDemo.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Morgan/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.RamonGilabert.Morgan;
PRODUCT_NAME = MorganDemoDemo;
PRODUCT_NAME = MorganDemo;
SWIFT_VERSION = 3.0;
};
name = Debug;
};
292D72071C94A8B600CFC060 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 770E2BDA39EF0F869117FDED /* Pods.release.xcconfig */;
baseConfigurationReference = 3FC181F93B1C398BBFEB973D /* Pods-MorganDemo.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Morgan/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.RamonGilabert.Morgan;
PRODUCT_NAME = MorganDemoDemo;
PRODUCT_NAME = MorganDemo;
SWIFT_VERSION = 3.0;
};
name = Release;
};
Expand All @@ -342,7 +354,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
292D72051C94A8B600CFC060 /* Build configuration list for PBXNativeTarget "MorganDemoDemo" */ = {
292D72051C94A8B600CFC060 /* Build configuration list for PBXNativeTarget "MorganDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
292D72061C94A8B600CFC060 /* Debug */,
Expand Down
3 changes: 2 additions & 1 deletion Demo/Morgan/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ use_frameworks!
platform :ios, '8.0'

pod 'Morgan', path: '../../'
pod 'Walker', git: 'https://www.github.com/RamonGilabert/Walker'
pod 'Walker', git: 'https://www.github.com/RamonGilabert/Walker', :branch => 'swift-3'
target 'MorganDemo'
19 changes: 11 additions & 8 deletions Demo/Morgan/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
PODS:
- Morgan (0.9):
- Morgan (0.9.1):
- Walker
- Walker (0.9)
- Walker (0.9.1)

DEPENDENCIES:
- Morgan (from `../../`)
- Walker (from `https://www.github.com/RamonGilabert/Walker`)
- Walker (from `https://www.github.com/RamonGilabert/Walker`, branch `swift-3`)

EXTERNAL SOURCES:
Morgan:
:path: ../../
:path: "../../"
Walker:
:branch: swift-3
:git: https://www.github.com/RamonGilabert/Walker

CHECKOUT OPTIONS:
Walker:
:commit: 7a06bc367203aa687c71ab00e834206724fc59ba
:commit: 47b9490594e29fea29ba6ce0b53763da3ccecc77
:git: https://www.github.com/RamonGilabert/Walker

SPEC CHECKSUMS:
Morgan: a87ce46d516b79b92a781fa45e1bd0735b912ab3
Walker: a9401362364ed7fb4e816b1946ca44bc8e233f9a
Morgan: 9cb6cdfd5eaafcdc98af5c05620cad575ace77de
Walker: 9a765e7f35adb19ce59079e26d425c1e8c463241

COCOAPODS: 0.39.0.beta.4
PODFILE CHECKSUM: 1e42c290945760aff81f50b01bf8d0e82df4984d

COCOAPODS: 1.0.1
Loading

0 comments on commit 73f851b

Please sign in to comment.