Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swift v.4.2 support #57

Open
wants to merge 1 commit into
base: swift_4
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions RangeSeekSlider.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 0900;
LastUpgradeCheck = 1000;
TargetAttributes = {
CE9937541E70236800EA982A = {
CreatedOnToolsVersion = 8.2.1;
Expand Down Expand Up @@ -489,7 +489,8 @@
OBJ_18 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
Expand All @@ -507,15 +508,16 @@
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGET_NAME = RangeSeekSlider;
};
name = Debug;
};
OBJ_19 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "iPhone Developer";
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_IDENTITY = "";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = "";
Expand All @@ -533,7 +535,7 @@
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
TARGET_NAME = RangeSeekSlider;
};
name = Release;
Expand All @@ -542,6 +544,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = S3LY459S86;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -561,6 +564,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = S3LY459S86;
FRAMEWORK_SEARCH_PATHS = (
Expand All @@ -583,11 +587,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand Down Expand Up @@ -618,7 +624,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
USE_HEADERMAP = NO;
};
name = Debug;
Expand All @@ -630,11 +636,13 @@
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand Down Expand Up @@ -662,7 +670,7 @@
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = SWIFT_PACKAGE;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.2;
USE_HEADERMAP = NO;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "1000"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,7 +26,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
Expand All @@ -47,7 +46,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
12 changes: 6 additions & 6 deletions Sources/RangeSeekSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ import UIKit
element.accessibilityHint = minLabelAccessibilityHint
element.accessibilityValue = minLabel.string as? String
element.accessibilityFrame = convert(leftHandle.frame, to: nil)
element.accessibilityTraits = UIAccessibilityTraitAdjustable
element.accessibilityTraits = UIAccessibilityTraits.adjustable
return element
}

Expand All @@ -268,7 +268,7 @@ import UIKit
element.accessibilityHint = maxLabelAccessibilityHint
element.accessibilityValue = maxLabel.string as? String
element.accessibilityFrame = convert(rightHandle.frame, to: nil)
element.accessibilityTraits = UIAccessibilityTraitAdjustable
element.accessibilityTraits = UIAccessibilityTraits.adjustable
return element
}

Expand All @@ -288,7 +288,7 @@ import UIKit
}

open override var intrinsicContentSize: CGSize {
return CGSize(width: UIViewNoIntrinsicMetric, height: 65.0)
return CGSize(width: UIView.noIntrinsicMetric, height: 65.0)
}


Expand Down Expand Up @@ -415,13 +415,13 @@ import UIKit
let labelFrame: CGRect = CGRect(x: 0.0, y: 0.0, width: 75.0, height: 14.0)

minLabelFont = UIFont.systemFont(ofSize: labelFontSize)
minLabel.alignmentMode = kCAAlignmentCenter
minLabel.alignmentMode = CATextLayerAlignmentMode.center
minLabel.frame = labelFrame
minLabel.contentsScale = UIScreen.main.scale
layer.addSublayer(minLabel)

maxLabelFont = UIFont.systemFont(ofSize: labelFontSize)
maxLabel.alignmentMode = kCAAlignmentCenter
maxLabel.alignmentMode = CATextLayerAlignmentMode.center
maxLabel.frame = labelFrame
maxLabel.contentsScale = UIScreen.main.scale
layer.addSublayer(maxLabel)
Expand Down Expand Up @@ -691,7 +691,7 @@ import UIKit

CATransaction.begin()
CATransaction.setAnimationDuration(0.3)
CATransaction.setAnimationTimingFunction(CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut))
CATransaction.setAnimationTimingFunction(CAMediaTimingFunction(name: CAMediaTimingFunctionName.easeInEaseOut))
handle.transform = transform

// the label above the handle will need to move too if the handle changes size
Expand Down
4 changes: 2 additions & 2 deletions Sources/TapticEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ open class TapticEngine {
private static func makeGenerator(_ style: ImpactStyle) -> Any? {
guard #available(iOS 10.0, *) else { return nil }

let feedbackStyle: UIImpactFeedbackStyle
let feedbackStyle: UIImpactFeedbackGenerator.FeedbackStyle
switch style {
case .light:
feedbackStyle = .light
Expand Down Expand Up @@ -129,7 +129,7 @@ open class TapticEngine {
guard #available(iOS 10.0, *) else { return }
guard let generator = generator as? UINotificationFeedbackGenerator else { return }

let feedbackType: UINotificationFeedbackType
let feedbackType: UINotificationFeedbackGenerator.FeedbackType
switch type {
case .success:
feedbackType = .success
Expand Down