From 1a5daacad67fca9491543aa61c0d71b65c4cb9a5 Mon Sep 17 00:00:00 2001 From: Domenico Date: Sat, 12 Oct 2019 11:41:18 +0200 Subject: [PATCH] -Updated to Swift 5 -Fix for Xcode 11.0 --- ColorMatchTabs.xcodeproj/project.pbxproj | 12 ++++++++---- ColorMatchTabs/Classes/Views/ColorTabs.swift | 2 +- Example/Example.xcodeproj/project.pbxproj | 9 +++++---- .../ViewControllers/ExampleViewContoller.swift | 1 + Example/Podfile.lock | 6 +++--- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/ColorMatchTabs.xcodeproj/project.pbxproj b/ColorMatchTabs.xcodeproj/project.pbxproj index d1c6640..8d56863 100644 --- a/ColorMatchTabs.xcodeproj/project.pbxproj +++ b/ColorMatchTabs.xcodeproj/project.pbxproj @@ -196,13 +196,13 @@ TargetAttributes = { C52989051D4630440058C829 = { CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 0940; + LastSwiftMigration = 1100; }; }; }; buildConfigurationList = C52989001D4630440058C829 /* Build configuration list for PBXProject "ColorMatchTabs" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -370,8 +370,10 @@ C529890F1D4630440058C829 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -382,15 +384,17 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; C52989101D4630440058C829 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; DEFINES_MODULE = YES; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -401,7 +405,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/ColorMatchTabs/Classes/Views/ColorTabs.swift b/ColorMatchTabs/Classes/Views/ColorTabs.swift index 20f31b4..71a8166 100644 --- a/ColorMatchTabs/Classes/Views/ColorTabs.swift +++ b/ColorMatchTabs/Classes/Views/ColorTabs.swift @@ -194,7 +194,7 @@ private extension ColorTabs { @objc func selectButton(_ sender: UIButton) { - if let index = buttons.index(of: sender) { + if let index = buttons.firstIndex(of: sender) { selectedSegmentIndex = index } } diff --git a/Example/Example.xcodeproj/project.pbxproj b/Example/Example.xcodeproj/project.pbxproj index b14cde6..c70830d 100644 --- a/Example/Example.xcodeproj/project.pbxproj +++ b/Example/Example.xcodeproj/project.pbxproj @@ -223,10 +223,9 @@ }; buildConfigurationList = C52989181D463F0C0058C829 /* Build configuration list for PBXProject "Example" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, en, Base, ); @@ -449,12 +448,13 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Example/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.yalantis.Example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -464,12 +464,13 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = Example/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.yalantis.Example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/Example/Example/Classes/ViewControllers/ExampleViewContoller.swift b/Example/Example/Classes/ViewControllers/ExampleViewContoller.swift index a7c1e21..acec812 100644 --- a/Example/Example/Classes/ViewControllers/ExampleViewContoller.swift +++ b/Example/Example/Classes/ViewControllers/ExampleViewContoller.swift @@ -17,6 +17,7 @@ class ExampleViewContoller: ColorMatchTabsViewController { titleLabel.font = UIFont.navigationTitleFont() // to hide bottom button remove the following line popoverViewController = ExamplePopoverViewController() + popoverViewController?.modalPresentationStyle = .fullScreen popoverViewController?.delegate = self colorMatchTabDataSource = self diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 502d7f7..cd38fdf 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - ColorMatchTabs (3.2) + - ColorMatchTabs (3.3) DEPENDENCIES: - ColorMatchTabs (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - ColorMatchTabs: b0b9a1e54348289f40e92947ebe75f90fe5eee21 + ColorMatchTabs: 8d63cd25099bdb8929438f468bb52aafd288d7a0 PODFILE CHECKSUM: ab163ed25fc44cbc1d4ce0c5359c7f321abd68de -COCOAPODS: 1.6.1 +COCOAPODS: 1.8.3