From 1df062211bb68d4a0c9a5d5fb1bdbb8be36aef95 Mon Sep 17 00:00:00 2001 From: Christopher Shireman Date: Wed, 3 Jul 2019 11:06:18 -0700 Subject: [PATCH] Updating to swift 5 --- .DS_Store | Bin 6148 -> 6148 bytes DGRunkeeperSwitch.podspec | 6 +++--- DGRunkeeperSwitch/DGRunkeeperSwitch.swift | 2 +- .../project.pbxproj | 14 +++++++------- .../xcschemes/DGRunkeeperSwitch.xcscheme | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.DS_Store b/.DS_Store index 8cec6445f2d9796ea0f9fabb80b7044cec17766a..ca6bf66f6a97bdd143aae2832d748619ce077278 100644 GIT binary patch delta 34 qcmZoMXffE3#K^QOcrp*8$K*APyiAM+n-4O&u}y4X+sw}KmmdJV6$+UE delta 34 qcmZoMXffE3#K@E{IGKmhWAYkCUM7YEn-4O&u}y4X+sw}KmmdJO)(V>d diff --git a/DGRunkeeperSwitch.podspec b/DGRunkeeperSwitch.podspec index 3efed50..5ca9a64 100644 --- a/DGRunkeeperSwitch.podspec +++ b/DGRunkeeperSwitch.podspec @@ -1,12 +1,12 @@ Pod::Spec.new do |s| s.name = "DGRunkeeperSwitch" - s.version = "1.1.5" + s.version = "1.1.6" s.authors = { "Danil Gontovnik" => "danil@gontovnik.com" } s.homepage = "https://github.com/gontovnik/DGRunkeeperSwitch" s.summary = "DGRunkeeperSwitch is Runkeeper design switch control" - s.source = { :git => "https://github.com/gontovnik/DGRunkeeperSwitch.git", - :tag => '1.1.4' } + s.source = { :git => "https://github.com/hathway/DGRunkeeperSwitch.git", + :tag => '1.1.6' } s.license = { :type => "MIT", :file => "LICENSE" } s.platform = :ios, '8.0' s.source_files = "DGRunkeeperSwitch/**/*.swift" diff --git a/DGRunkeeperSwitch/DGRunkeeperSwitch.swift b/DGRunkeeperSwitch/DGRunkeeperSwitch.swift index 821c668..a0a6bfb 100644 --- a/DGRunkeeperSwitch/DGRunkeeperSwitch.swift +++ b/DGRunkeeperSwitch/DGRunkeeperSwitch.swift @@ -245,7 +245,7 @@ open class DGRunkeeperSwitch: UIControl { let titleLabelMaxHeight = bounds.height - selectedBackgroundInset * 2.0 zip(titleLabels, selectedTitleLabels).forEach { label, selectedLabel in - let index = titleLabels.index(of: label)! + let index = titleLabels.firstIndex(of: label)! var size = label.sizeThatFits(CGSize(width: titleLabelMaxWidth, height: titleLabelMaxHeight)) size.width = min(size.width, titleLabelMaxWidth) diff --git a/DGRunkeeperSwitchExample.xcodeproj/project.pbxproj b/DGRunkeeperSwitchExample.xcodeproj/project.pbxproj index b48322c..af883ca 100644 --- a/DGRunkeeperSwitchExample.xcodeproj/project.pbxproj +++ b/DGRunkeeperSwitchExample.xcodeproj/project.pbxproj @@ -153,7 +153,7 @@ 05B5DE921B98509500F87BB3 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1010; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Danil Gontovnik"; TargetAttributes = { 05B5DE991B98509500F87BB3 = { @@ -162,13 +162,13 @@ }; 4508BA3B1C0CF52700BC38BE = { CreatedOnToolsVersion = 7.1.1; - LastSwiftMigration = 1010; + LastSwiftMigration = 1020; }; }; }; buildConfigurationList = 05B5DE951B98509500F87BB3 /* Build configuration list for PBXProject "DGRunkeeperSwitchExample" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -250,6 +250,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -305,6 +306,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -394,8 +396,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.gatafan.DGRunkeeperSwitch; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -418,8 +419,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.gatafan.DGRunkeeperSwitch; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = On; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; diff --git a/DGRunkeeperSwitchExample.xcodeproj/xcshareddata/xcschemes/DGRunkeeperSwitch.xcscheme b/DGRunkeeperSwitchExample.xcodeproj/xcshareddata/xcschemes/DGRunkeeperSwitch.xcscheme index 235eb5f..52c8ce7 100644 --- a/DGRunkeeperSwitchExample.xcodeproj/xcshareddata/xcschemes/DGRunkeeperSwitch.xcscheme +++ b/DGRunkeeperSwitchExample.xcodeproj/xcshareddata/xcschemes/DGRunkeeperSwitch.xcscheme @@ -1,6 +1,6 @@