Skip to content

Commit

Permalink
Migrate to Swift 5
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsaidi committed Mar 26, 2019
1 parent b4c3950 commit 5956148
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Cartfile.resolved
@@ -1,2 +1,2 @@
github "Quick/Nimble" "v7.3.1"
github "Quick/Quick" "v1.3.2"
github "Quick/Nimble" "v8.0.1"
github "Quick/Quick" "v2.0.0"
18 changes: 9 additions & 9 deletions Sheeeeeeeeet.xcodeproj/project.pbxproj
Expand Up @@ -868,17 +868,17 @@
TargetAttributes = {
453C04201FC0655C0028FA02 = {
CreatedOnToolsVersion = 9.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
453C045C1FC065AE0028FA02 = {
CreatedOnToolsVersion = 9.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
456EAA5B1FCE0E1C00A719ED = {
CreatedOnToolsVersion = 9.1;
LastSwiftMigration = 1000;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
TestTargetID = 453C045C1FC065AE0028FA02;
};
Expand Down Expand Up @@ -1262,7 +1262,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -1283,7 +1283,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.Sheeeeeeeeet;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -1299,7 +1299,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.SheeeeeeeeetExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -1315,7 +1315,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.SheeeeeeeeetExample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand All @@ -1331,7 +1331,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.SheeeeeeeeetTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SheeeeeeeeetExample.app/SheeeeeeeeetExample";
};
Expand All @@ -1348,7 +1348,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.danielsaidi.SheeeeeeeeetTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/SheeeeeeeeetExample.app/SheeeeeeeeetExample";
};
Expand Down
2 changes: 1 addition & 1 deletion Sheeeeeeeeet/ActionSheet/ActionSheet+Scroll.swift
Expand Up @@ -21,7 +21,7 @@ public extension ActionSheet {
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(50)) { [weak self] in
guard
let items = self?.items(ofType: ActionSheetSelectItem.self),
let index = (items.index { $0.isSelected == true })
let index = (items.firstIndex { $0.isSelected == true })
else { return }
let path = IndexPath(row: index, section: 0)
self?.itemsTableView?.reloadData()
Expand Down
2 changes: 1 addition & 1 deletion Sheeeeeeeeet/Presenters/ActionSheetStandardPresenter.swift
Expand Up @@ -158,7 +158,7 @@ extension ActionSheetStandardPresenter {

@objc public extension ActionSheetStandardPresenter {

public func backgroundViewTapAction() {
func backgroundViewTapAction() {
guard isDismissableWithTapOnBackground else { return }
events.didDismissWithBackgroundTap?()
dismiss {}
Expand Down
8 changes: 4 additions & 4 deletions SheeeeeeeeetExample/Appearance/UIColor+Hex.swift
Expand Up @@ -19,11 +19,11 @@ import UIKit

public extension UIColor {

public convenience init(hex: Int) {
convenience init(hex: Int) {
self.init(hex: hex, alpha: 1)
}

public convenience init(hex: Int, alpha: CGFloat) {
convenience init(hex: Int, alpha: CGFloat) {
let components = (
R: CGFloat((hex >> 16) & 0xff) / 255,
G: CGFloat((hex >> 08) & 0xff) / 255,
Expand All @@ -38,7 +38,7 @@ public extension UIColor {

public extension UIColor {

public var hexString: String {
var hexString: String {
return hexString(withAlpha: false)
}
}
Expand All @@ -48,7 +48,7 @@ public extension UIColor {

public extension UIColor {

public func hexString(withAlpha: Bool) -> String {
func hexString(withAlpha: Bool) -> String {
var r: CGFloat = 0
var g: CGFloat = 0
var b: CGFloat = 0
Expand Down

0 comments on commit 5956148

Please sign in to comment.