Skip to content

Commit a520966

Browse files
committed
Swift4.2
1 parent 9c56b69 commit a520966

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4
1+
4.2

Demo/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
2828
var window: UIWindow?
2929

3030

31-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
31+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
3232
// Override point for customization after application launch.
3333
return true
3434
}

ZoomImageView.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Pod::Spec.new do |s|
22
s.name = 'ZoomImageView'
3-
s.version = '0.4.0'
3+
s.version = '0.5.0'
44
s.summary = "UI component library to expand the photo, such as Apple's Photos app"
55
s.homepage = 'https://github.com/muukii/ZoomImageView'
66
s.license = { :type => 'MIT', :file => 'LICENCE' }
7-
s.author = { 'muukii' => 'm@muukii.me' }
7+
s.author = { 'muukii' => 'muukii.[email protected]' }
88
s.source = { :git => 'https://github.com/muukii/ZoomImageView.git', :tag => s.version.to_s }
99
s.social_media_url = 'https://twitter.com/muukii0803'
1010
s.ios.deployment_target = '8.0'

ZoomImageView.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
333333
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
334334
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
335-
SWIFT_VERSION = 4.0;
335+
SWIFT_VERSION = 4.2;
336336
TARGETED_DEVICE_FAMILY = "1,2";
337337
VERSIONING_SYSTEM = "apple-generic";
338338
VERSION_INFO_PREFIX = "";
@@ -386,7 +386,7 @@
386386
SDKROOT = iphoneos;
387387
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
388388
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
389-
SWIFT_VERSION = 4.0;
389+
SWIFT_VERSION = 4.2;
390390
TARGETED_DEVICE_FAMILY = "1,2";
391391
VALIDATE_PRODUCT = YES;
392392
VERSIONING_SYSTEM = "apple-generic";

ZoomImageView/ZoomImageView.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ open class ZoomImageView : UIScrollView, UIScrollViewDelegate {
103103
imageView.contentMode = .scaleAspectFill
104104
showsVerticalScrollIndicator = false
105105
showsHorizontalScrollIndicator = false
106+
#if swift(>=4.2)
107+
decelerationRate = .fast
108+
#else
106109
decelerationRate = UIScrollViewDecelerationRateFast
110+
#endif
107111
addSubview(imageView)
108112

109113
let doubleTapGesture = UITapGestureRecognizer(target: self, action: #selector(handleDoubleTap(_:)))

0 commit comments

Comments
 (0)