Skip to content

Commit 1264495

Browse files
committed
Update Swift 4.2
1 parent d5d73db commit 1264495

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

LiveKnob.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "LiveKnob"
19-
s.version = "0.0.2"
19+
s.version = "0.0.3"
2020
s.summary = "Yet another knob for iOS but with IBDesignable and Ableton Live style."
21+
s.swift_version = "4.2"
2122

2223
# This description is used to generate tags and improve search results.
2324
# * Think: What does it do? Why did you write it? What is the focus?

LiveKnob.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
292292
PRODUCT_BUNDLE_IDENTIFIER = com.cemolcay.LiveKnob;
293293
PRODUCT_NAME = "$(TARGET_NAME)";
294-
SWIFT_VERSION = 4.0;
294+
SWIFT_VERSION = 4.2;
295295
TARGETED_DEVICE_FAMILY = "1,2";
296296
};
297297
name = Debug;
@@ -307,7 +307,7 @@
307307
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
308308
PRODUCT_BUNDLE_IDENTIFIER = com.cemolcay.LiveKnob;
309309
PRODUCT_NAME = "$(TARGET_NAME)";
310-
SWIFT_VERSION = 4.0;
310+
SWIFT_VERSION = 4.2;
311311
TARGETED_DEVICE_FAMILY = "1,2";
312312
};
313313
name = Release;

LiveKnob/AppDelegate.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1313

1414
var window: UIWindow?
1515

16-
17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
16+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
1817
// Override point for customization after application launch.
1918
return true
2019
}

LiveKnob/LiveKnob.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,19 +125,19 @@ public enum LiveKnobControlType: Int, Codable {
125125
let radius = (min(baseLayer.bounds.width, baseLayer.bounds.height) / 2) - baseLineWidth
126126
let ring = UIBezierPath(arcCenter: center, radius: radius, startAngle: startAngle, endAngle: endAngle, clockwise: true)
127127
baseLayer.path = ring.cgPath
128-
baseLayer.lineCap = kCALineCapRound
128+
baseLayer.lineCap = .round
129129

130130
// Draw pointer.
131131
let pointer = UIBezierPath()
132132
pointer.move(to: center)
133133
pointer.addLine(to: CGPoint(x: center.x + radius, y: center.y))
134134
pointerLayer.path = pointer.cgPath
135-
pointerLayer.lineCap = kCALineCapRound
135+
pointerLayer.lineCap = .round
136136

137137
let angle = CGFloat(angleForValue(value))
138138
let progressRing = UIBezierPath(arcCenter: center, radius: radius, startAngle: startAngle, endAngle: angle, clockwise: true)
139139
progressLayer.path = progressRing.cgPath
140-
progressLayer.lineCap = kCALineCapRound
140+
progressLayer.lineCap = .round
141141

142142
// Draw pointer
143143
CATransaction.begin()

0 commit comments

Comments
 (0)