Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Commit 40dfb10

Browse files
Luis PadronLuis Padron
authored andcommitted
update example project to 1.1.1
1 parent 039286e commit 40dfb10

File tree

10 files changed

+211
-117
lines changed

10 files changed

+211
-117
lines changed

Example/Example.xcodeproj/project.pbxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@
257257
CLANG_WARN_INFINITE_RECURSION = YES;
258258
CLANG_WARN_INT_CONVERSION = YES;
259259
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
260+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
260261
CLANG_WARN_SUSPICIOUS_MOVES = YES;
261262
CLANG_WARN_UNREACHABLE_CODE = YES;
262263
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -307,6 +308,7 @@
307308
CLANG_WARN_INFINITE_RECURSION = YES;
308309
CLANG_WARN_INT_CONVERSION = YES;
309310
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
311+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
310312
CLANG_WARN_SUSPICIOUS_MOVES = YES;
311313
CLANG_WARN_UNREACHABLE_CODE = YES;
312314
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -336,6 +338,7 @@
336338
isa = XCBuildConfiguration;
337339
baseConfigurationReference = 8B2376CF61EB42685EE8039A /* Pods-Example.debug.xcconfig */;
338340
buildSettings = {
341+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
339342
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
340343
DEVELOPMENT_TEAM = 4FNMZ7SN42;
341344
INFOPLIST_FILE = Example/Info.plist;
@@ -350,6 +353,7 @@
350353
isa = XCBuildConfiguration;
351354
baseConfigurationReference = 82A3863291A912C5EB8F44D1 /* Pods-Example.release.xcconfig */;
352355
buildSettings = {
356+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
353357
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
354358
DEVELOPMENT_TEAM = 4FNMZ7SN42;
355359
INFOPLIST_FILE = Example/Info.plist;

Example/Example/ViewController.swift

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

99
import UIKit
1010
import UICircularProgressRing
11-
12-
class ViewController: UIViewController {
11+
// If you'd prefer to use a delegate then you can implement it and override func finishedUpdatingProgressFor(_ ring: UICircularProgressRingView)
12+
class ViewController: UIViewController, UICircularProgressRingDelegate {
1313

1414

1515
@IBOutlet weak var ring1: UICircularProgressRingView!
@@ -19,11 +19,16 @@ class ViewController: UIViewController {
1919
override func viewDidLoad() {
2020
super.viewDidLoad()
2121
// Customize some properties
22+
2223
ring1.animationStyle = kCAMediaTimingFunctionLinear
2324
ring1.fontSize = 100
2425
ring2.fontColor = UIColor.gray
2526
ring3.maxValue = 100
2627

28+
// Set the delegate
29+
ring1.delegate = self
30+
ring2.delegate = self
31+
2732
}
2833

2934
// Button clicked, animate them views
@@ -34,11 +39,8 @@ class ViewController: UIViewController {
3439
animationDuration when set to 0 causes view to not be animated.
3540
Optionally you can also supply a completion handler
3641
*/
37-
ring1.setProgress(value: 99, animationDuration: 5) {
38-
// When done setting to 99, go back to 0
39-
print("Ring 1 finished")
40-
self.ring1.setProgress(value: 0, animationDuration: 2, completion: nil)
41-
}
42+
43+
ring1.setProgress(value: 99, animationDuration: 5, completion: nil)
4244

4345
ring2.setProgress(value: 56, animationDuration: 2) {
4446
// Increase it more, and customize some properties
@@ -59,5 +61,13 @@ class ViewController: UIViewController {
5961

6062
}
6163

64+
func finishedUpdatingProgressFor(_ ring: UICircularProgressRingView) {
65+
if ring === ring1 {
66+
print("From delegate: Ring 1 finished")
67+
} else if ring === ring2 {
68+
print("From delegate: Ring 2 finished")
69+
}
70+
}
71+
6272
}
6373

Example/Podfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ target 'Example' do
88
# Pods for Example
99
pod 'UICircularProgressRing'
1010
end
11+
12+
post_install do |installer|
13+
installer.pods_project.targets.each do |target|
14+
target.build_configurations.each do |configuration|
15+
configuration.build_settings['SWIFT_VERSION'] = "3.0"
16+
end
17+
end
18+
end

Example/Podfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
PODS:
2-
- UICircularProgressRing (1.0.0)
2+
- UICircularProgressRing (1.1.1)
33

44
DEPENDENCIES:
55
- UICircularProgressRing
66

77
SPEC CHECKSUMS:
8-
UICircularProgressRing: b27e5b410d5794ceac2b20f39e704a8437638780
8+
UICircularProgressRing: c37697577b2f07841fa901ad162959f6f5530204
99

10-
PODFILE CHECKSUM: 1d97334167c5158e172614d245a9054c88858825
10+
PODFILE CHECKSUM: bff4735b1f3d9f2f90f144e8cc121cf8af67e40b
1111

1212
COCOAPODS: 1.1.0.rc.2

Example/Pods/Manifest.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)