Skip to content

Commit 0f10d38

Browse files
authored
Merge pull request #1 from awulf/master
Update to use Swift 4.2
2 parents ae65bef + 4372e6e commit 0f10d38

7 files changed

Lines changed: 50 additions & 63 deletions

File tree

Example/Podfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
platform :ios, '10.0'
12
use_frameworks!
23

34
target 'iStatusView_Example' do
@@ -9,8 +10,8 @@ target 'iStatusView_Example' do
910
inherit! :search_paths
1011

1112
pod 'Quick', '~> 1.2.0'
12-
pod 'Nimble', '~> 7.0.2'
13+
pod 'Nimble', '~> 8.0'
1314
pod 'FBSnapshotTestCase' , '~> 2.1.4'
14-
pod 'Nimble-Snapshots' , '~> 6.3.0'
15+
pod 'Nimble-Snapshots' , '~> 7.0'
1516
end
1617
end

Example/Podfile.lock

Lines changed: 33 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,55 @@ PODS:
44
- FBSnapshotTestCase/Core (2.1.4)
55
- FBSnapshotTestCase/SwiftSupport (2.1.4):
66
- FBSnapshotTestCase/Core
7-
- iStatusView (0.1.0)
8-
- Nimble (7.0.3)
9-
- Nimble-Snapshots (6.3.0):
10-
- Nimble-Snapshots/Core (= 6.3.0)
11-
- Nimble-Snapshots/Core (6.3.0):
12-
- FBSnapshotTestCase (~> 2.0)
13-
- Nimble (~> 7.0)
7+
- iOSSnapshotTestCase (6.0.2):
8+
- iOSSnapshotTestCase/SwiftSupport (= 6.0.2)
9+
- iOSSnapshotTestCase/Core (6.0.2)
10+
- iOSSnapshotTestCase/SwiftSupport (6.0.2):
11+
- iOSSnapshotTestCase/Core
12+
- iStatusView (0.3.1)
13+
- Nimble (8.0.1)
14+
- Nimble-Snapshots (7.0.0):
15+
- Nimble-Snapshots/Core (= 7.0.0)
16+
- Nimble-Snapshots/Core (7.0.0):
17+
- iOSSnapshotTestCase (~> 6.0)
18+
- Nimble (~> 8.0)
1419
- Quick (1.2.0)
15-
- SnapKit (4.0.0)
20+
- SnapKit (4.2.0)
1621
- SVProgressHUD (2.2.5)
1722

1823
DEPENDENCIES:
1924
- FBSnapshotTestCase (~> 2.1.4)
2025
- iStatusView (from `../`)
21-
- Nimble (~> 7.0.2)
22-
- Nimble-Snapshots (~> 6.3.0)
26+
- Nimble (~> 8.0)
27+
- Nimble-Snapshots (~> 7.0)
2328
- Quick (~> 1.2.0)
2429
- SnapKit
2530
- SVProgressHUD
2631

32+
SPEC REPOS:
33+
https://github.com/cocoapods/specs.git:
34+
- FBSnapshotTestCase
35+
- iOSSnapshotTestCase
36+
- Nimble
37+
- Nimble-Snapshots
38+
- Quick
39+
- SnapKit
40+
- SVProgressHUD
41+
2742
EXTERNAL SOURCES:
2843
iStatusView:
29-
:path: ../
44+
:path: "../"
3045

3146
SPEC CHECKSUMS:
3247
FBSnapshotTestCase: 094f9f314decbabe373b87cc339bea235a63e07a
33-
iStatusView: d1f42102af994e95695d0898eede58464aa1f1b5
34-
Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac
35-
Nimble-Snapshots: f5459b5b091678dc942d03ec4741cacb58ba4a52
48+
iOSSnapshotTestCase: 20083a7be9b8ef742610e16c79f15ad829441f29
49+
iStatusView: 4b774171417a9636a8d2e3a0ada6575fec647d59
50+
Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0
51+
Nimble-Snapshots: 2d6d712ceb2d1850d88f850fbd7c732618106022
3652
Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08
37-
SnapKit: a42d492c16e80209130a3379f73596c3454b7694
53+
SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
3854
SVProgressHUD: 1428aafac632c1f86f62aa4243ec12008d7a51d6
3955

40-
PODFILE CHECKSUM: 8bd0d7f41a3de3822c59388a6836b9ce9afa4d73
56+
PODFILE CHECKSUM: d5321adb1d9cb08c8c51a7a80181f20b1131ee59
4157

42-
COCOAPODS: 1.4.0
58+
COCOAPODS: 1.6.0

Example/iStatusView.xcodeproj/project.pbxproj

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@
168168
607FACCD1AFB9204008FA782 /* Frameworks */,
169169
607FACCE1AFB9204008FA782 /* Resources */,
170170
B2FAA3C50A53725502D7467F /* [CP] Embed Pods Frameworks */,
171-
CF6E7EA8D43993BFF1706CA5 /* [CP] Copy Pods Resources */,
172171
);
173172
buildRules = (
174173
);
@@ -188,7 +187,6 @@
188187
607FACE21AFB9204008FA782 /* Frameworks */,
189188
607FACE31AFB9204008FA782 /* Resources */,
190189
0911146313D8719257467FBD /* [CP] Embed Pods Frameworks */,
191-
3DF63B6BCBCF20752BE54A6C /* [CP] Copy Pods Resources */,
192190
);
193191
buildRules = (
194192
);
@@ -226,6 +224,7 @@
226224
developmentRegion = English;
227225
hasScannedForEncodings = 0;
228226
knownRegions = (
227+
English,
229228
en,
230229
Base,
231230
);
@@ -266,11 +265,12 @@
266265
files = (
267266
);
268267
inputPaths = (
269-
"${SRCROOT}/Pods/Target Support Files/Pods-iStatusView_Tests/Pods-iStatusView_Tests-frameworks.sh",
268+
"${PODS_ROOT}/Target Support Files/Pods-iStatusView_Tests/Pods-iStatusView_Tests-frameworks.sh",
270269
"${BUILT_PRODUCTS_DIR}/FBSnapshotTestCase/FBSnapshotTestCase.framework",
271270
"${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework",
272271
"${BUILT_PRODUCTS_DIR}/Nimble-Snapshots/Nimble_Snapshots.framework",
273272
"${BUILT_PRODUCTS_DIR}/Quick/Quick.framework",
273+
"${BUILT_PRODUCTS_DIR}/iOSSnapshotTestCase/FBSnapshotTestCase.framework",
274274
);
275275
name = "[CP] Embed Pods Frameworks";
276276
outputPaths = (
@@ -281,22 +281,7 @@
281281
);
282282
runOnlyForDeploymentPostprocessing = 0;
283283
shellPath = /bin/sh;
284-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iStatusView_Tests/Pods-iStatusView_Tests-frameworks.sh\"\n";
285-
showEnvVarsInLog = 0;
286-
};
287-
3DF63B6BCBCF20752BE54A6C /* [CP] Copy Pods Resources */ = {
288-
isa = PBXShellScriptBuildPhase;
289-
buildActionMask = 2147483647;
290-
files = (
291-
);
292-
inputPaths = (
293-
);
294-
name = "[CP] Copy Pods Resources";
295-
outputPaths = (
296-
);
297-
runOnlyForDeploymentPostprocessing = 0;
298-
shellPath = /bin/sh;
299-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iStatusView_Tests/Pods-iStatusView_Tests-resources.sh\"\n";
284+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iStatusView_Tests/Pods-iStatusView_Tests-frameworks.sh\"\n";
300285
showEnvVarsInLog = 0;
301286
};
302287
AD5B29C84E061DD12A1D664A /* [CP] Check Pods Manifest.lock */ = {
@@ -323,7 +308,7 @@
323308
files = (
324309
);
325310
inputPaths = (
326-
"${SRCROOT}/Pods/Target Support Files/Pods-iStatusView_Example/Pods-iStatusView_Example-frameworks.sh",
311+
"${PODS_ROOT}/Target Support Files/Pods-iStatusView_Example/Pods-iStatusView_Example-frameworks.sh",
327312
"${BUILT_PRODUCTS_DIR}/SVProgressHUD/SVProgressHUD.framework",
328313
"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
329314
"${BUILT_PRODUCTS_DIR}/iStatusView/iStatusView.framework",
@@ -336,22 +321,7 @@
336321
);
337322
runOnlyForDeploymentPostprocessing = 0;
338323
shellPath = /bin/sh;
339-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iStatusView_Example/Pods-iStatusView_Example-frameworks.sh\"\n";
340-
showEnvVarsInLog = 0;
341-
};
342-
CF6E7EA8D43993BFF1706CA5 /* [CP] Copy Pods Resources */ = {
343-
isa = PBXShellScriptBuildPhase;
344-
buildActionMask = 2147483647;
345-
files = (
346-
);
347-
inputPaths = (
348-
);
349-
name = "[CP] Copy Pods Resources";
350-
outputPaths = (
351-
);
352-
runOnlyForDeploymentPostprocessing = 0;
353-
shellPath = /bin/sh;
354-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-iStatusView_Example/Pods-iStatusView_Example-resources.sh\"\n";
324+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-iStatusView_Example/Pods-iStatusView_Example-frameworks.sh\"\n";
355325
showEnvVarsInLog = 0;
356326
};
357327
D825647C03C5D1EA3AED744D /* [CP] Check Pods Manifest.lock */ = {
@@ -529,7 +499,7 @@
529499
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
530500
PRODUCT_NAME = "$(TARGET_NAME)";
531501
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
532-
SWIFT_VERSION = 4.0;
502+
SWIFT_VERSION = 4.2;
533503
};
534504
name = Debug;
535505
};
@@ -545,7 +515,7 @@
545515
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
546516
PRODUCT_NAME = "$(TARGET_NAME)";
547517
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
548-
SWIFT_VERSION = 4.0;
518+
SWIFT_VERSION = 4.2;
549519
};
550520
name = Release;
551521
};

Example/iStatusView/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919
let window = UIWindow.init(frame: UIScreen.main.bounds)
2020
self.window = window

Example/iStatusView/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class ViewController: UIViewController {
148148
button.setTitleColor(UIColor.black, for: .normal)
149149
button.layer.cornerRadius = 4.0
150150
button.layer.borderWidth = 1.0
151-
button.contentEdgeInsets = UIEdgeInsetsMake(5, 10, 5, 10)
151+
button.contentEdgeInsets = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10)
152152
button.backgroundColor = UIColor.white
153153
button.addTarget(self, action: #selector(statusViewButtonPressed), for: .touchUpInside)
154154
self.view.addSubview(button)

iStatusView.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |s|
1010
s.name = 'iStatusView'
11-
s.version = '0.3.0'
11+
s.version = '0.3.1'
1212
s.summary = 'iStatusView is a convenient way to show loading and message status in a view.'
1313

1414
# This description is used to generate tags and improve search results.
@@ -31,7 +31,7 @@ When an error has occured, the message can be displayed, and a rety button can b
3131
# s.social_media_url = 'https://twitter.com/<TWITTER_USERNAME>'
3232

3333
s.ios.deployment_target = '9.3'
34-
s.swift_version = '4.1'
34+
s.swift_version = '4.2'
3535

3636
s.source_files = 'iStatusView/Classes/**/*'
3737

iStatusView/Classes/StatusView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ extension StatusViewError: LocalizedError {
281281
self.state = state
282282

283283
if !self.isHidden {
284-
self.superview?.bringSubview(toFront: self)
284+
self.superview?.bringSubviewToFront(self)
285285
}
286286

287287
var visibleViews = [UIView]()
@@ -379,7 +379,7 @@ extension StatusViewError: LocalizedError {
379379
}
380380

381381
if initial == false || animate == false {
382-
UIView.animate(withDuration: 0.32, delay: 0.0, options:UIViewAnimationOptions.curveEaseOut, animations: {
382+
UIView.animate(withDuration: 0.32, delay: 0.0, options:UIView.AnimationOptions.curveEaseOut, animations: {
383383
// Don't animate contents if showing/hiding
384384
if !wasHidden {
385385
self.layoutIfNeeded()

0 commit comments

Comments
 (0)