Skip to content

Commit 03ebb78

Browse files
committed
Swift 5 compatibility.
1 parent ef7fc5f commit 03ebb78

File tree

3 files changed

+10
-13
lines changed

3 files changed

+10
-13
lines changed

SSSpinnerButton.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ Pod::Spec.new do |s|
2222
s.platform = :ios
2323

2424
s.ios.deployment_target = "10.0"
25-
s.swift_version = '4.2'
25+
s.swift_version = '5.0'
2626

2727

2828
s.source = { :git => "https://github.com/simformsolutions/SSSpinnerButton.git", :tag => "#{s.version}" }
2929
#s.source = { :path => ".", :tag => "#{s.version}" }
3030

3131
s.source_files = 'SSSpinnerButton/SSSpinnerButton/**/*.swift'
32-
# s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.2' }
32+
# s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5.0' }
3333
s.documentation_url = 'docs/index.html'
3434

3535

SSSpinnerButton.xcodeproj/project.pbxproj

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
SDKROOT = iphoneos;
339339
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
340340
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
341-
SWIFT_VERSION = 4.2;
341+
SWIFT_VERSION = 5.0;
342342
};
343343
name = Debug;
344344
};
@@ -390,7 +390,7 @@
390390
MTL_ENABLE_DEBUG_INFO = NO;
391391
SDKROOT = iphoneos;
392392
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
393-
SWIFT_VERSION = 4.2;
393+
SWIFT_VERSION = 5.0;
394394
VALIDATE_PRODUCT = YES;
395395
};
396396
name = Release;
@@ -406,7 +406,6 @@
406406
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
407407
PRODUCT_BUNDLE_IDENTIFIER = com.simform.SSSpinnerButton;
408408
PRODUCT_NAME = "$(TARGET_NAME)";
409-
SWIFT_VERSION = 4.2;
410409
TARGETED_DEVICE_FAMILY = "1,2";
411410
};
412411
name = Debug;
@@ -422,7 +421,6 @@
422421
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
423422
PRODUCT_BUNDLE_IDENTIFIER = com.simform.SSSpinnerButton;
424423
PRODUCT_NAME = "$(TARGET_NAME)";
425-
SWIFT_VERSION = 4.2;
426424
TARGETED_DEVICE_FAMILY = "1,2";
427425
};
428426
name = Release;
@@ -483,7 +481,7 @@
483481
SDKROOT = iphoneos;
484482
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
485483
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
486-
SWIFT_VERSION = 4.2;
484+
SWIFT_VERSION = 5.0;
487485
};
488486
name = Analyze;
489487
};
@@ -498,7 +496,6 @@
498496
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
499497
PRODUCT_BUNDLE_IDENTIFIER = com.simform.SSSpinnerButton;
500498
PRODUCT_NAME = "$(TARGET_NAME)";
501-
SWIFT_VERSION = 4.2;
502499
TARGETED_DEVICE_FAMILY = "1,2";
503500
};
504501
name = Analyze;

SSSpinnerButton/SSSpinnerButton/SpinnerButton/SSSpinnerButton.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public extension SSSpinnerButton {
195195
/// - spinnerType: spinner Type ( ballClipRotate(default), ballSpinFade, lineSpinFade, circleStrokeSpin, ballRotateChase)
196196
/// - spinnercolor: color of spinner (default = gray)
197197
/// - complete: complation block (call after animation start)
198-
public func startAnimate(spinnerType: SpinnerType = .ballClipRotate, spinnercolor: UIColor = .gray, complete: (() -> Void)?) {
198+
func startAnimate(spinnerType: SpinnerType = .ballClipRotate, spinnercolor: UIColor = .gray, complete: (() -> Void)?) {
199199
self.startAnimate(spinnerType: spinnerType, spinnercolor: spinnercolor, spinnerSize: nil, complete: complete)
200200
}
201201

@@ -206,7 +206,7 @@ public extension SSSpinnerButton {
206206
/// - spinnercolor: color of spinner (default = gray)
207207
/// - spinnerSize: size of spinner layer
208208
/// - complete: complation block (call after animation start)
209-
public func startAnimate(spinnerType: SpinnerType = .ballClipRotate, spinnercolor: UIColor = .gray, spinnerSize: UInt?, complete: (() -> Void)?) {
209+
func startAnimate(spinnerType: SpinnerType = .ballClipRotate, spinnercolor: UIColor = .gray, spinnerSize: UInt?, complete: (() -> Void)?) {
210210
if self.cornrRadius == 0 {
211211
self.cornrRadius = self.layer.cornerRadius
212212
}
@@ -233,7 +233,7 @@ public extension SSSpinnerButton {
233233
/// stop animation and set button in actual state
234234
///
235235
/// - Parameter complete: complation block (call after animation Stop)
236-
public func stopAnimate(complete: (() -> Void)?) {
236+
func stopAnimate(complete: (() -> Void)?) {
237237
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
238238
self.backToDefaults(completionType: .none, setToDefaults: false, complete: complete)
239239
})
@@ -245,7 +245,7 @@ public extension SSSpinnerButton {
245245
/// - completionType: completion type
246246
/// - backToDefaults: back to default state
247247
/// - complete: complation block (call after animation Stop)
248-
public func stopAnimationWithCompletionTypeAndBackToDefaults(completionType: CompletionType, backToDefaults: Bool, complete: (() -> Void)?) {
248+
func stopAnimationWithCompletionTypeAndBackToDefaults(completionType: CompletionType, backToDefaults: Bool, complete: (() -> Void)?) {
249249
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
250250
self.backToDefaults(completionType: completionType, setToDefaults: backToDefaults, complete: complete)
251251
})
@@ -256,7 +256,7 @@ public extension SSSpinnerButton {
256256
/// - Parameters:
257257
/// - completionType: completion type
258258
/// - complete: complation block (call after animation Stop)
259-
public func stopAnimatingWithCompletionType(completionType: CompletionType, complete: (() -> Void)?) {
259+
func stopAnimatingWithCompletionType(completionType: CompletionType, complete: (() -> Void)?) {
260260
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: {
261261
self.backToDefaults(completionType: completionType, setToDefaults: false, complete: complete)
262262
})

0 commit comments

Comments
 (0)