Skip to content

Commit 11643c1

Browse files
committed
Swift 4 update
1 parent f753406 commit 11643c1

File tree

7 files changed

+14
-10
lines changed

7 files changed

+14
-10
lines changed

.swift-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.0

ElongationPreview.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'ElongationPreview'
3-
s.version = '1.0.5'
3+
s.version = '1.1.0'
44
s.summary = 'ElongationPreview is an elegant push-pop style view controller.'
55
s.license = 'MIT'
66
s.homepage = 'https://github.com/Ramotion/elongation-preview'

ElongationPreview.xcodeproj/project.pbxproj

+6-4
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@
539539
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
540540
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.ElongationPreviewUITests;
541541
PRODUCT_NAME = "$(TARGET_NAME)";
542-
SWIFT_VERSION = 3.0;
542+
SWIFT_VERSION = 4.0;
543543
TEST_TARGET_NAME = ElongationPreviewDemo;
544544
};
545545
name = Debug;
@@ -553,7 +553,7 @@
553553
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
554554
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.ElongationPreviewUITests;
555555
PRODUCT_NAME = "$(TARGET_NAME)";
556-
SWIFT_VERSION = 3.0;
556+
SWIFT_VERSION = 4.0;
557557
TEST_TARGET_NAME = ElongationPreviewDemo;
558558
};
559559
name = Release;
@@ -611,6 +611,7 @@
611611
SDKROOT = iphoneos;
612612
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
613613
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
614+
SWIFT_VERSION = 4.0;
614615
TARGETED_DEVICE_FAMILY = "1,2";
615616
VERSIONING_SYSTEM = "apple-generic";
616617
VERSION_INFO_PREFIX = "";
@@ -662,6 +663,7 @@
662663
MTL_ENABLE_DEBUG_INFO = NO;
663664
SDKROOT = iphoneos;
664665
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
666+
SWIFT_VERSION = 4.0;
665667
TARGETED_DEVICE_FAMILY = "1,2";
666668
VALIDATE_PRODUCT = YES;
667669
VERSIONING_SYSTEM = "apple-generic";
@@ -687,7 +689,7 @@
687689
PRODUCT_NAME = "$(TARGET_NAME)";
688690
SKIP_INSTALL = YES;
689691
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
690-
SWIFT_VERSION = 3.0;
692+
SWIFT_VERSION = 4.0;
691693
};
692694
name = Debug;
693695
};
@@ -708,7 +710,7 @@
708710
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.ElongationPreview;
709711
PRODUCT_NAME = "$(TARGET_NAME)";
710712
SKIP_INSTALL = YES;
711-
SWIFT_VERSION = 3.0;
713+
SWIFT_VERSION = 4.0;
712714
};
713715
name = Release;
714716
};

ElongationPreview/Source/ViewControllers/ElongationDetailViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ open class ElongationDetailViewController: SwipableTableViewController {
7171
// MARK: - Actions ⚡
7272
extension ElongationDetailViewController {
7373

74-
func headerViewTapped(_ gesture: UITapGestureRecognizer) {
74+
@objc func headerViewTapped(_ gesture: UITapGestureRecognizer) {
7575
let location = gesture.location(in: headerView)
7676
let point = headerView.convert(location, from: view)
7777
let action = ElongationConfig.shared.headerTouchAction

ElongationPreview/Source/ViewControllers/SwipableTableViewController.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ open class SwipableTableViewController: UITableViewController, UIGestureRecogniz
2929
tableView.addGestureRecognizer(panGestureRecognizer)
3030
}
3131

32-
func gestureRecognizerSwiped(_ gesture: UIPanGestureRecognizer) { }
32+
@objc func gestureRecognizerSwiped(_ gesture: UIPanGestureRecognizer) { }
3333

3434
/// :nodoc:
3535
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {

ElongationPreviewDemo/Helpers/LoremSwiftum.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ private extension Array {
167167
private extension String {
168168

169169
var stringWithCapitalizedFirstLetter: String {
170-
let firstLetterRange = startIndex..<characters.index(after: startIndex)
171-
let capitalizedFirstLetter = substring(with: firstLetterRange).capitalized
170+
let firstLetterRange = startIndex..<index(after: startIndex)
171+
let capitalizedFirstLetter = self[firstLetterRange].capitalized
172172
return replacingCharacters(in: firstLetterRange, with: capitalizedFirstLetter)
173173
}
174174

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ The [iPhone mockup](https://store.ramotion.com?utm_source=gthb&utm_medium=specia
2828

2929
- iOS 9.0+
3030
- Xcode 8
31-
- Swift 3
31+
- Swift 3 (<= 1.0.5)
32+
- Swift 4 (>= 1.1)
3233

3334
<br>
3435

0 commit comments

Comments
 (0)