Skip to content

Commit

Permalink
Swift 4 update
Browse files Browse the repository at this point in the history
  • Loading branch information
av0c0der committed Nov 18, 2017
1 parent f753406 commit 11643c1
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0
2 changes: 1 addition & 1 deletion ElongationPreview.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'ElongationPreview'
s.version = '1.0.5'
s.version = '1.1.0'
s.summary = 'ElongationPreview is an elegant push-pop style view controller.'
s.license = 'MIT'
s.homepage = 'https://github.com/Ramotion/elongation-preview'
Expand Down
10 changes: 6 additions & 4 deletions ElongationPreview.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.ElongationPreviewUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_TARGET_NAME = ElongationPreviewDemo;
};
name = Debug;
Expand All @@ -553,7 +553,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.ElongationPreviewUITests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
TEST_TARGET_NAME = ElongationPreviewDemo;
};
name = Release;
Expand Down Expand Up @@ -611,6 +611,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -662,6 +663,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -687,7 +689,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -708,7 +710,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.ElongationPreview;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ open class ElongationDetailViewController: SwipableTableViewController {
// MARK: - Actions ⚡
extension ElongationDetailViewController {

func headerViewTapped(_ gesture: UITapGestureRecognizer) {
@objc func headerViewTapped(_ gesture: UITapGestureRecognizer) {
let location = gesture.location(in: headerView)
let point = headerView.convert(location, from: view)
let action = ElongationConfig.shared.headerTouchAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ open class SwipableTableViewController: UITableViewController, UIGestureRecogniz
tableView.addGestureRecognizer(panGestureRecognizer)
}

func gestureRecognizerSwiped(_ gesture: UIPanGestureRecognizer) { }
@objc func gestureRecognizerSwiped(_ gesture: UIPanGestureRecognizer) { }

/// :nodoc:
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
Expand Down
4 changes: 2 additions & 2 deletions ElongationPreviewDemo/Helpers/LoremSwiftum.swift
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ private extension Array {
private extension String {

var stringWithCapitalizedFirstLetter: String {
let firstLetterRange = startIndex..<characters.index(after: startIndex)
let capitalizedFirstLetter = substring(with: firstLetterRange).capitalized
let firstLetterRange = startIndex..<index(after: startIndex)
let capitalizedFirstLetter = self[firstLetterRange].capitalized
return replacingCharacters(in: firstLetterRange, with: capitalizedFirstLetter)
}

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ The [iPhone mockup](https://store.ramotion.com?utm_source=gthb&utm_medium=specia

- iOS 9.0+
- Xcode 8
- Swift 3
- Swift 3 (<= 1.0.5)
- Swift 4 (>= 1.1)

<br>

Expand Down

0 comments on commit 11643c1

Please sign in to comment.