Skip to content

Commit

Permalink
Merge pull request #85 from corin8823/swift4
Browse files Browse the repository at this point in the history
Support Swift4
  • Loading branch information
corin8823 authored Oct 8, 2017
2 parents 8639358 + 175f0c8 commit f479b06
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
4.0
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
osx_image: xcode9
language: objective-c
install:
- gem install cocoapods -v 1.1.1 --no-document
- gem install cocoapods -v 1.3.1 --no-document

before_script:
- cd Example
- pod install

script:
- xcodebuild -workspace Popover.xcworkspace -scheme "PopoverExample" -destination 'platform=iOS Simulator,OS=10.0,name=iPhone 6s' build test | xcpretty
- xcodebuild -workspace Popover.xcworkspace -scheme "PopoverExample" -destination 'platform=iOS Simulator,OS=11.0,name=iPhone 8' build test | xcpretty
4 changes: 2 additions & 2 deletions Classes/Popover.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ open class Popover: UIView {
UIView.animate(withDuration: self.animationIn / 3,
delay: 0,
options: .curveLinear,
animations: { _ in
animations: {
self.blackOverlay.alpha = 1
}, completion: { _ in
})
Expand All @@ -308,7 +308,7 @@ open class Popover: UIView {
return true
}

open func dismiss() {
@objc open func dismiss() {
if self.superview != nil {
self.willDismissHandler?()
UIView.animate(withDuration: self.animationOut, delay: 0,
Expand Down
15 changes: 10 additions & 5 deletions Example/Popover.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,13 @@
TargetAttributes = {
01A491C91E222AFB007E15FA = {
CreatedOnToolsVersion = 8.2.1;
LastSwiftMigration = 0900;
ProvisioningStyle = Automatic;
TestTargetID = 607FACCF1AFB9204008FA782;
};
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0900;
};
};
};
Expand Down Expand Up @@ -359,7 +360,8 @@
PRODUCT_BUNDLE_IDENTIFIER = corin8823.PopoverExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PopoverExample.app/PopoverExample";
};
name = Debug;
Expand All @@ -375,7 +377,8 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = corin8823.PopoverExampleTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PopoverExample.app/PopoverExample";
};
name = Release;
Expand Down Expand Up @@ -495,7 +498,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -515,7 +519,8 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down

0 comments on commit f479b06

Please sign in to comment.