Skip to content

Commit 376d53f

Browse files
author
Yunus TEK
committed
Upgrade to Swift 5.0
1 parent 5b36ba9 commit 376d53f

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

Sources/ButtonBarPagerTabStripViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public struct ButtonBarPagerTabStripSettings {
5656
public var buttonBarItemFont = UIFont.systemFont(ofSize: 18)
5757
public var buttonBarItemLeftRightMargin: CGFloat = 8
5858
public var buttonBarItemTitleColor: UIColor?
59-
@available(*, deprecated: 7.0.0) public var buttonBarItemsShouldFillAvailiableWidth: Bool {
59+
@available(*, deprecated) public var buttonBarItemsShouldFillAvailiableWidth: Bool {
6060
set {
6161
buttonBarItemsShouldFillAvailableWidth = newValue
6262
}

Sources/PagerTabStripViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
172172
}
173173

174174
open func moveTo(viewController: UIViewController, animated: Bool = true) {
175-
moveToViewController(at: viewControllers.index(of: viewController)!, animated: animated)
175+
moveToViewController(at: viewControllers.firstIndex(of: viewController)!, animated: animated)
176176
}
177177

178178
// MARK: - PagerTabStripDataSource
@@ -203,7 +203,7 @@ open class PagerTabStripViewController: UIViewController, UIScrollViewDelegate {
203203
}
204204

205205
open func offsetForChild(viewController: UIViewController) throws -> CGFloat {
206-
guard let index = viewControllers.index(of: viewController) else {
206+
guard let index = viewControllers.firstIndex(of: viewController) else {
207207
throw PagerTabStripError.viewControllerOutOfBounds
208208
}
209209
return offsetForChild(at: index)

XLPagerTabStrip.xcodeproj/project.pbxproj

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,12 @@
231231
TargetAttributes = {
232232
28F8287C1C494B2C00330CF4 = {
233233
CreatedOnToolsVersion = 7.2;
234-
LastSwiftMigration = 0900;
234+
LastSwiftMigration = 1020;
235235
ProvisioningStyle = Manual;
236236
};
237237
28F828861C494B2C00330CF4 = {
238238
CreatedOnToolsVersion = 7.2;
239-
LastSwiftMigration = 0800;
239+
LastSwiftMigration = 1020;
240240
};
241241
};
242242
};
@@ -469,8 +469,7 @@
469469
PRODUCT_NAME = "$(TARGET_NAME)";
470470
PROVISIONING_PROFILE_SPECIFIER = "";
471471
SKIP_INSTALL = YES;
472-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
473-
SWIFT_VERSION = 4.2;
472+
SWIFT_VERSION = 5.0;
474473
};
475474
name = Debug;
476475
};
@@ -495,8 +494,7 @@
495494
PRODUCT_NAME = "$(TARGET_NAME)";
496495
PROVISIONING_PROFILE_SPECIFIER = "";
497496
SKIP_INSTALL = YES;
498-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
499-
SWIFT_VERSION = 4.2;
497+
SWIFT_VERSION = 5.0;
500498
};
501499
name = Release;
502500
};
@@ -509,7 +507,7 @@
509507
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.XLPagerTabStripTests;
510508
PRODUCT_NAME = "$(TARGET_NAME)";
511509
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
512-
SWIFT_VERSION = 4.2;
510+
SWIFT_VERSION = 5.0;
513511
};
514512
name = Debug;
515513
};
@@ -521,7 +519,7 @@
521519
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
522520
PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.XLPagerTabStripTests;
523521
PRODUCT_NAME = "$(TARGET_NAME)";
524-
SWIFT_VERSION = 4.2;
522+
SWIFT_VERSION = 5.0;
525523
};
526524
name = Release;
527525
};

0 commit comments

Comments
 (0)