Skip to content

Commit adeeac5

Browse files
Updated for Xcode 9.3.1
1 parent 58ffd57 commit adeeac5

6 files changed

Lines changed: 42 additions & 46 deletions

File tree

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0
1+
4.1

LinearProgressView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'LinearProgressView'
3-
s.version = '2.0.0'
3+
s.version = '2.0.1'
44
s.summary = 'A simple linear progress bar.'
55
s.homepage = 'https://github.com/BiAtoms/LinearProgressView'
66
s.license = { :type => 'MIT', :file => 'LICENSE' }

LinearProgressView.xcodeproj/project.pbxproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
9DC6CAF41E9E14770080A14B /* Project object */ = {
9494
isa = PBXProject;
9595
attributes = {
96-
LastUpgradeCheck = 0900;
96+
LastUpgradeCheck = 0930;
9797
ORGANIZATIONNAME = BiAtoms;
9898
TargetAttributes = {
9999
9DC6CAFC1E9E14770080A14B = {
@@ -156,13 +156,15 @@
156156
CLANG_WARN_BOOL_CONVERSION = YES;
157157
CLANG_WARN_COMMA = YES;
158158
CLANG_WARN_CONSTANT_CONVERSION = YES;
159+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
159160
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
160161
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
161162
CLANG_WARN_EMPTY_BODY = YES;
162163
CLANG_WARN_ENUM_CONVERSION = YES;
163164
CLANG_WARN_INFINITE_RECURSION = YES;
164165
CLANG_WARN_INT_CONVERSION = YES;
165166
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
167+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
166168
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
167169
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
168170
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -216,13 +218,15 @@
216218
CLANG_WARN_BOOL_CONVERSION = YES;
217219
CLANG_WARN_COMMA = YES;
218220
CLANG_WARN_CONSTANT_CONVERSION = YES;
221+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
219222
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
220223
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
221224
CLANG_WARN_EMPTY_BODY = YES;
222225
CLANG_WARN_ENUM_CONVERSION = YES;
223226
CLANG_WARN_INFINITE_RECURSION = YES;
224227
CLANG_WARN_INT_CONVERSION = YES;
225228
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
229+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
226230
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
227231
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
228232
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;

LinearProgressViewExample/LinearProgressViewExample.xcodeproj/project.pbxproj

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,33 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
2EB4E308E052953EAA5FC1B8 /* Pods_LinearProgressViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0812C4A39D5A81A0A6A4FABC /* Pods_LinearProgressViewExample.framework */; };
1110
9DC6CB171E9E16B50080A14B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC6CB161E9E16B50080A14B /* AppDelegate.swift */; };
1211
9DC6CB191E9E16B50080A14B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DC6CB181E9E16B50080A14B /* ViewController.swift */; };
1312
9DC6CB1C1E9E16B50080A14B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9DC6CB1A1E9E16B50080A14B /* Main.storyboard */; };
1413
9DC6CB1E1E9E16B50080A14B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 9DC6CB1D1E9E16B50080A14B /* Assets.xcassets */; };
1514
9DC6CB211E9E16B50080A14B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9DC6CB1F1E9E16B50080A14B /* LaunchScreen.storyboard */; };
15+
F2038CCD3EA9D9B8A05E78DA /* Pods_LinearProgressViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3C1817E3A66C390997A92DB9 /* Pods_LinearProgressViewExample.framework */; };
1616
/* End PBXBuildFile section */
1717

1818
/* Begin PBXFileReference section */
19-
0812C4A39D5A81A0A6A4FABC /* Pods_LinearProgressViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LinearProgressViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
20-
6D83F8C34273C5FE9DF6E55A /* Pods-LinearProgressViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LinearProgressViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample.release.xcconfig"; sourceTree = "<group>"; };
21-
90E97F7539C297AD8D258A10 /* Pods-LinearProgressViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LinearProgressViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample.debug.xcconfig"; sourceTree = "<group>"; };
19+
3C1817E3A66C390997A92DB9 /* Pods_LinearProgressViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LinearProgressViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; };
20+
8F5D8708709E65BC2FE435FA /* Pods-LinearProgressViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LinearProgressViewExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample.release.xcconfig"; sourceTree = "<group>"; };
2221
9DC6CB131E9E16B50080A14B /* LinearProgressViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LinearProgressViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
2322
9DC6CB161E9E16B50080A14B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
2423
9DC6CB181E9E16B50080A14B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
2524
9DC6CB1B1E9E16B50080A14B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
2625
9DC6CB1D1E9E16B50080A14B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2726
9DC6CB201E9E16B50080A14B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
2827
9DC6CB221E9E16B50080A14B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
28+
D58B94D02A68DA2A4B553379 /* Pods-LinearProgressViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LinearProgressViewExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample.debug.xcconfig"; sourceTree = "<group>"; };
2929
/* End PBXFileReference section */
3030

3131
/* Begin PBXFrameworksBuildPhase section */
3232
9DC6CB101E9E16B50080A14B /* Frameworks */ = {
3333
isa = PBXFrameworksBuildPhase;
3434
buildActionMask = 2147483647;
3535
files = (
36-
2EB4E308E052953EAA5FC1B8 /* Pods_LinearProgressViewExample.framework in Frameworks */,
36+
F2038CCD3EA9D9B8A05E78DA /* Pods_LinearProgressViewExample.framework in Frameworks */,
3737
);
3838
runOnlyForDeploymentPostprocessing = 0;
3939
};
@@ -45,8 +45,8 @@
4545
children = (
4646
9DC6CB151E9E16B50080A14B /* LinearProgressViewExample */,
4747
9DC6CB141E9E16B50080A14B /* Products */,
48-
F92FBDF411A348848C23970D /* Pods */,
49-
AC74892BF310969DE0AD29E5 /* Frameworks */,
48+
A6148D91D2E709A0320F924D /* Pods */,
49+
DAE206766BBC5B85D439E67E /* Frameworks */,
5050
);
5151
sourceTree = "<group>";
5252
};
@@ -71,21 +71,21 @@
7171
path = LinearProgressViewExample;
7272
sourceTree = "<group>";
7373
};
74-
AC74892BF310969DE0AD29E5 /* Frameworks */ = {
74+
A6148D91D2E709A0320F924D /* Pods */ = {
7575
isa = PBXGroup;
7676
children = (
77-
0812C4A39D5A81A0A6A4FABC /* Pods_LinearProgressViewExample.framework */,
77+
D58B94D02A68DA2A4B553379 /* Pods-LinearProgressViewExample.debug.xcconfig */,
78+
8F5D8708709E65BC2FE435FA /* Pods-LinearProgressViewExample.release.xcconfig */,
7879
);
79-
name = Frameworks;
80+
name = Pods;
8081
sourceTree = "<group>";
8182
};
82-
F92FBDF411A348848C23970D /* Pods */ = {
83+
DAE206766BBC5B85D439E67E /* Frameworks */ = {
8384
isa = PBXGroup;
8485
children = (
85-
90E97F7539C297AD8D258A10 /* Pods-LinearProgressViewExample.debug.xcconfig */,
86-
6D83F8C34273C5FE9DF6E55A /* Pods-LinearProgressViewExample.release.xcconfig */,
86+
3C1817E3A66C390997A92DB9 /* Pods_LinearProgressViewExample.framework */,
8787
);
88-
name = Pods;
88+
name = Frameworks;
8989
sourceTree = "<group>";
9090
};
9191
/* End PBXGroup section */
@@ -95,12 +95,11 @@
9595
isa = PBXNativeTarget;
9696
buildConfigurationList = 9DC6CB251E9E16B50080A14B /* Build configuration list for PBXNativeTarget "LinearProgressViewExample" */;
9797
buildPhases = (
98-
73AEE6EE277FDA991483863F /* [CP] Check Pods Manifest.lock */,
98+
A7CB08701D6AF4161461D1E7 /* [CP] Check Pods Manifest.lock */,
9999
9DC6CB0F1E9E16B50080A14B /* Sources */,
100100
9DC6CB101E9E16B50080A14B /* Frameworks */,
101101
9DC6CB111E9E16B50080A14B /* Resources */,
102-
60952EF85F6A1894E3E94166 /* [CP] Embed Pods Frameworks */,
103-
D5AF4A87FB6230DFF3D9DDFA /* [CP] Copy Pods Resources */,
102+
46DB8322077D7E9F876D5B98 /* [CP] Embed Pods Frameworks */,
104103
);
105104
buildRules = (
106105
);
@@ -118,7 +117,7 @@
118117
isa = PBXProject;
119118
attributes = {
120119
LastSwiftUpdateCheck = 0810;
121-
LastUpgradeCheck = 0900;
120+
LastUpgradeCheck = 0930;
122121
ORGANIZATIONNAME = BiAtoms;
123122
TargetAttributes = {
124123
9DC6CB121E9E16B50080A14B = {
@@ -160,7 +159,7 @@
160159
/* End PBXResourcesBuildPhase section */
161160

162161
/* Begin PBXShellScriptBuildPhase section */
163-
60952EF85F6A1894E3E94166 /* [CP] Embed Pods Frameworks */ = {
162+
46DB8322077D7E9F876D5B98 /* [CP] Embed Pods Frameworks */ = {
164163
isa = PBXShellScriptBuildPhase;
165164
buildActionMask = 2147483647;
166165
files = (
@@ -178,7 +177,7 @@
178177
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample-frameworks.sh\"\n";
179178
showEnvVarsInLog = 0;
180179
};
181-
73AEE6EE277FDA991483863F /* [CP] Check Pods Manifest.lock */ = {
180+
A7CB08701D6AF4161461D1E7 /* [CP] Check Pods Manifest.lock */ = {
182181
isa = PBXShellScriptBuildPhase;
183182
buildActionMask = 2147483647;
184183
files = (
@@ -196,21 +195,6 @@
196195
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
197196
showEnvVarsInLog = 0;
198197
};
199-
D5AF4A87FB6230DFF3D9DDFA /* [CP] Copy Pods Resources */ = {
200-
isa = PBXShellScriptBuildPhase;
201-
buildActionMask = 2147483647;
202-
files = (
203-
);
204-
inputPaths = (
205-
);
206-
name = "[CP] Copy Pods Resources";
207-
outputPaths = (
208-
);
209-
runOnlyForDeploymentPostprocessing = 0;
210-
shellPath = /bin/sh;
211-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LinearProgressViewExample/Pods-LinearProgressViewExample-resources.sh\"\n";
212-
showEnvVarsInLog = 0;
213-
};
214198
/* End PBXShellScriptBuildPhase section */
215199

216200
/* Begin PBXSourcesBuildPhase section */
@@ -258,13 +242,15 @@
258242
CLANG_WARN_BOOL_CONVERSION = YES;
259243
CLANG_WARN_COMMA = YES;
260244
CLANG_WARN_CONSTANT_CONVERSION = YES;
245+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
261246
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
262247
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
263248
CLANG_WARN_EMPTY_BODY = YES;
264249
CLANG_WARN_ENUM_CONVERSION = YES;
265250
CLANG_WARN_INFINITE_RECURSION = YES;
266251
CLANG_WARN_INT_CONVERSION = YES;
267252
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
253+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
268254
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
269255
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
270256
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -315,13 +301,15 @@
315301
CLANG_WARN_BOOL_CONVERSION = YES;
316302
CLANG_WARN_COMMA = YES;
317303
CLANG_WARN_CONSTANT_CONVERSION = YES;
304+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
318305
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
319306
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
320307
CLANG_WARN_EMPTY_BODY = YES;
321308
CLANG_WARN_ENUM_CONVERSION = YES;
322309
CLANG_WARN_INFINITE_RECURSION = YES;
323310
CLANG_WARN_INT_CONVERSION = YES;
324311
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
312+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
325313
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
326314
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
327315
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -354,7 +342,7 @@
354342
};
355343
9DC6CB261E9E16B50080A14B /* Debug */ = {
356344
isa = XCBuildConfiguration;
357-
baseConfigurationReference = 90E97F7539C297AD8D258A10 /* Pods-LinearProgressViewExample.debug.xcconfig */;
345+
baseConfigurationReference = D58B94D02A68DA2A4B553379 /* Pods-LinearProgressViewExample.debug.xcconfig */;
358346
buildSettings = {
359347
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
360348
INFOPLIST_FILE = LinearProgressViewExample/Info.plist;
@@ -368,7 +356,7 @@
368356
};
369357
9DC6CB271E9E16B50080A14B /* Release */ = {
370358
isa = XCBuildConfiguration;
371-
baseConfigurationReference = 6D83F8C34273C5FE9DF6E55A /* Pods-LinearProgressViewExample.release.xcconfig */;
359+
baseConfigurationReference = 8F5D8708709E65BC2FE435FA /* Pods-LinearProgressViewExample.release.xcconfig */;
372360
buildSettings = {
373361
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
374362
INFOPLIST_FILE = LinearProgressViewExample/Info.plist;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

Source/LinearProgressView.swift

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import UIKit
1212
open class LinearProgressView: UIView {
1313

1414
private let trackView = UIView()
15-
private lazy var trackViewWidthConstraint: NSLayoutConstraint = { return NSLayoutConstraint(item: self.trackView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 0) }()
15+
private lazy var trackViewWidthConstraint: NSLayoutConstraint = { NSLayoutConstraint(item: self.trackView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1.0, constant: 0) }()
1616

1717
@IBInspectable
1818
open var barColor: UIColor = .gray {
@@ -74,10 +74,6 @@ open class LinearProgressView: UIView {
7474

7575
open var animationDuration: TimeInterval = 0.25
7676

77-
convenience init() {
78-
self.init(frame: .zero)
79-
}
80-
8177
override init(frame: CGRect) {
8278
super.init(frame: frame)
8379
prepare()
@@ -114,7 +110,7 @@ open class LinearProgressView: UIView {
114110
override open func layoutSubviews() {
115111
super.layoutSubviews()
116112

117-
let maxWidth: CGFloat = max(self.frame.width - barInset * 2, 0) //prevent from becoming negative
113+
let maxWidth: CGFloat = max(self.frame.width - barInset * 2, 0) // prevent from becoming negative
118114
let calculatedWidth: CGFloat = maximumValue - minimumValue != 0 ? CGFloat((progress - minimumValue) / (maximumValue - minimumValue)) * maxWidth : 0
119115
trackViewWidthConstraint.constant = calculatedWidth
120116
if isCornersRounded {

0 commit comments

Comments
 (0)