Skip to content

Commit 78699c0

Browse files
author
Jasper
committed
增加 progress bar
1 parent 56e1bb2 commit 78699c0

22 files changed

+2039
-51
lines changed

CYUtilProjectSwift/CYUtilProjectSwift/CYUtilProjectSwift.xcodeproj/project.pbxproj

Lines changed: 94 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,21 @@
1414
61091D681CDAF8E4008B7EA3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 61091D661CDAF8E4008B7EA3 /* LaunchScreen.storyboard */; };
1515
61091D721CDAFCDA008B7EA3 /* ImageDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61091D711CDAFCDA008B7EA3 /* ImageDownloader.swift */; };
1616
A306D5631CE330A8008341F3 /* CYAlertViewAction.swift in Sources */ = {isa = PBXBuildFile; fileRef = A306D5621CE330A8008341F3 /* CYAlertViewAction.swift */; };
17+
A30EA3D21CFED40F006FEF23 /* CYAudioPlayUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A30EA3D11CFED40F006FEF23 /* CYAudioPlayUtils.swift */; };
18+
A30EA3D41CFEE023006FEF23 /* CYAudioRecordUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A30EA3D31CFEE023006FEF23 /* CYAudioRecordUtils.swift */; };
1719
A33913CE1CF3EE4400C8C147 /* Dictionary+CYUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A33913CD1CF3EE4400C8C147 /* Dictionary+CYUtils.swift */; };
1820
A33913D11CF4236800C8C147 /* CYJSONUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A33913D01CF4236800C8C147 /* CYJSONUtils.swift */; };
1921
A33913D31CF4282700C8C147 /* Array+CYUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A33913D21CF4282700C8C147 /* Array+CYUtils.swift */; };
22+
A33E4B3B1D069B0C001B0AB1 /* CYJSLocalRequestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A33E4B3A1D069B0C001B0AB1 /* CYJSLocalRequestUtils.swift */; };
23+
A33E4B3D1D06ABDC001B0AB1 /* CYJSCommonActionRequestUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A33E4B3C1D06ABDC001B0AB1 /* CYJSCommonActionRequestUtils.swift */; };
24+
A345C5FC1DEBDE2F0094AF5A /* CYBaseProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A345C5FB1DEBDE2F0094AF5A /* CYBaseProgressBar.swift */; };
25+
A38580201DEFCFA800FF989F /* CYLineProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A385801F1DEFCFA800FF989F /* CYLineProgressBar.swift */; };
26+
A38580221DEFD1E900FF989F /* CYArcProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A38580211DEFD1E900FF989F /* CYArcProgressBar.swift */; };
27+
A38580241DEFF6E100FF989F /* CYCycleProgressBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A38580231DEFF6E100FF989F /* CYCycleProgressBar.swift */; };
28+
A3CCAF311D17A56000A40969 /* CYJSJSONParametersSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3CCAF301D17A56000A40969 /* CYJSJSONParametersSerialization.swift */; };
29+
A3CCAF331D17A57900A40969 /* CYJSParametersSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3CCAF321D17A57900A40969 /* CYJSParametersSerialization.swift */; };
30+
A3CCAF351D17A58900A40969 /* CYJSHTTPParametersSerialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3CCAF341D17A58900A40969 /* CYJSHTTPParametersSerialization.swift */; };
31+
A3CCAF371D17D6EE00A40969 /* CYAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3CCAF361D17D6EE00A40969 /* CYAlertView.swift */; };
2032
A3E2530A1CFD976F002F8E18 /* ObjectiveCTestObject.m in Sources */ = {isa = PBXBuildFile; fileRef = A3E253091CFD976F002F8E18 /* ObjectiveCTestObject.m */; };
2133
/* End PBXBuildFile section */
2234

@@ -30,9 +42,21 @@
3042
61091D691CDAF8E4008B7EA3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3143
61091D711CDAFCDA008B7EA3 /* ImageDownloader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageDownloader.swift; sourceTree = "<group>"; };
3244
A306D5621CE330A8008341F3 /* CYAlertViewAction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYAlertViewAction.swift; sourceTree = "<group>"; };
45+
A30EA3D11CFED40F006FEF23 /* CYAudioPlayUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYAudioPlayUtils.swift; sourceTree = "<group>"; };
46+
A30EA3D31CFEE023006FEF23 /* CYAudioRecordUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYAudioRecordUtils.swift; sourceTree = "<group>"; };
3347
A33913CD1CF3EE4400C8C147 /* Dictionary+CYUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Dictionary+CYUtils.swift"; sourceTree = "<group>"; };
3448
A33913D01CF4236800C8C147 /* CYJSONUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYJSONUtils.swift; sourceTree = "<group>"; };
3549
A33913D21CF4282700C8C147 /* Array+CYUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Array+CYUtils.swift"; sourceTree = "<group>"; };
50+
A33E4B3A1D069B0C001B0AB1 /* CYJSLocalRequestUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYJSLocalRequestUtils.swift; sourceTree = "<group>"; };
51+
A33E4B3C1D06ABDC001B0AB1 /* CYJSCommonActionRequestUtils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYJSCommonActionRequestUtils.swift; sourceTree = "<group>"; };
52+
A345C5FB1DEBDE2F0094AF5A /* CYBaseProgressBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYBaseProgressBar.swift; sourceTree = "<group>"; };
53+
A385801F1DEFCFA800FF989F /* CYLineProgressBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYLineProgressBar.swift; sourceTree = "<group>"; };
54+
A38580211DEFD1E900FF989F /* CYArcProgressBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYArcProgressBar.swift; sourceTree = "<group>"; };
55+
A38580231DEFF6E100FF989F /* CYCycleProgressBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYCycleProgressBar.swift; sourceTree = "<group>"; };
56+
A3CCAF301D17A56000A40969 /* CYJSJSONParametersSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYJSJSONParametersSerialization.swift; sourceTree = "<group>"; };
57+
A3CCAF321D17A57900A40969 /* CYJSParametersSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYJSParametersSerialization.swift; sourceTree = "<group>"; };
58+
A3CCAF341D17A58900A40969 /* CYJSHTTPParametersSerialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYJSHTTPParametersSerialization.swift; sourceTree = "<group>"; };
59+
A3CCAF361D17D6EE00A40969 /* CYAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CYAlertView.swift; sourceTree = "<group>"; };
3660
A3E253071CFD976F002F8E18 /* CYUtilProjectSwift-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "CYUtilProjectSwift-Bridging-Header.h"; sourceTree = "<group>"; };
3761
A3E253081CFD976F002F8E18 /* ObjectiveCTestObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjectiveCTestObject.h; sourceTree = "<group>"; };
3862
A3E253091CFD976F002F8E18 /* ObjectiveCTestObject.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjectiveCTestObject.m; sourceTree = "<group>"; };
@@ -85,6 +109,9 @@
85109
61091D6F1CDAFCB0008B7EA3 /* CYUtils */ = {
86110
isa = PBXGroup;
87111
children = (
112+
A345C5F81DEBDE0A0094AF5A /* CYProgressUtils */,
113+
A33E4B391D069A9C001B0AB1 /* CYWebViewUtils */,
114+
A30EA3D01CFED3F9006FEF23 /* CYAudioUtils */,
88115
A33913CF1CF4235400C8C147 /* CYJSONUtils */,
89116
A33913CC1CF3EE0700C8C147 /* CYFoundationUtils */,
90117
A306D5611CE33096008341F3 /* CYAlertView */,
@@ -105,10 +132,20 @@
105132
isa = PBXGroup;
106133
children = (
107134
A306D5621CE330A8008341F3 /* CYAlertViewAction.swift */,
135+
A3CCAF361D17D6EE00A40969 /* CYAlertView.swift */,
108136
);
109137
path = CYAlertView;
110138
sourceTree = "<group>";
111139
};
140+
A30EA3D01CFED3F9006FEF23 /* CYAudioUtils */ = {
141+
isa = PBXGroup;
142+
children = (
143+
A30EA3D11CFED40F006FEF23 /* CYAudioPlayUtils.swift */,
144+
A30EA3D31CFEE023006FEF23 /* CYAudioRecordUtils.swift */,
145+
);
146+
path = CYAudioUtils;
147+
sourceTree = "<group>";
148+
};
112149
A33913CC1CF3EE0700C8C147 /* CYFoundationUtils */ = {
113150
isa = PBXGroup;
114151
children = (
@@ -126,6 +163,37 @@
126163
path = CYJSONUtils;
127164
sourceTree = "<group>";
128165
};
166+
A33E4B391D069A9C001B0AB1 /* CYWebViewUtils */ = {
167+
isa = PBXGroup;
168+
children = (
169+
A3CCAF2F1D17A56000A40969 /* CYJSParametersSerialization */,
170+
A33E4B3A1D069B0C001B0AB1 /* CYJSLocalRequestUtils.swift */,
171+
A33E4B3C1D06ABDC001B0AB1 /* CYJSCommonActionRequestUtils.swift */,
172+
);
173+
path = CYWebViewUtils;
174+
sourceTree = "<group>";
175+
};
176+
A345C5F81DEBDE0A0094AF5A /* CYProgressUtils */ = {
177+
isa = PBXGroup;
178+
children = (
179+
A345C5FB1DEBDE2F0094AF5A /* CYBaseProgressBar.swift */,
180+
A385801F1DEFCFA800FF989F /* CYLineProgressBar.swift */,
181+
A38580231DEFF6E100FF989F /* CYCycleProgressBar.swift */,
182+
A38580211DEFD1E900FF989F /* CYArcProgressBar.swift */,
183+
);
184+
path = CYProgressUtils;
185+
sourceTree = "<group>";
186+
};
187+
A3CCAF2F1D17A56000A40969 /* CYJSParametersSerialization */ = {
188+
isa = PBXGroup;
189+
children = (
190+
A3CCAF321D17A57900A40969 /* CYJSParametersSerialization.swift */,
191+
A3CCAF341D17A58900A40969 /* CYJSHTTPParametersSerialization.swift */,
192+
A3CCAF301D17A56000A40969 /* CYJSJSONParametersSerialization.swift */,
193+
);
194+
path = CYJSParametersSerialization;
195+
sourceTree = "<group>";
196+
};
129197
/* End PBXGroup section */
130198

131199
/* Begin PBXNativeTarget section */
@@ -153,11 +221,13 @@
153221
isa = PBXProject;
154222
attributes = {
155223
LastSwiftUpdateCheck = 0730;
156-
LastUpgradeCheck = 0730;
224+
LastUpgradeCheck = 0810;
157225
ORGANIZATIONNAME = Jasper;
158226
TargetAttributes = {
159227
61091D591CDAF8E4008B7EA3 = {
160228
CreatedOnToolsVersion = 7.3;
229+
DevelopmentTeam = BQN58WSC57;
230+
LastSwiftMigration = 0810;
161231
};
162232
};
163233
};
@@ -197,14 +267,26 @@
197267
isa = PBXSourcesBuildPhase;
198268
buildActionMask = 2147483647;
199269
files = (
270+
A30EA3D21CFED40F006FEF23 /* CYAudioPlayUtils.swift in Sources */,
271+
A345C5FC1DEBDE2F0094AF5A /* CYBaseProgressBar.swift in Sources */,
272+
A33E4B3B1D069B0C001B0AB1 /* CYJSLocalRequestUtils.swift in Sources */,
200273
61091D601CDAF8E4008B7EA3 /* ViewController.swift in Sources */,
274+
A38580221DEFD1E900FF989F /* CYArcProgressBar.swift in Sources */,
275+
A30EA3D41CFEE023006FEF23 /* CYAudioRecordUtils.swift in Sources */,
276+
A38580241DEFF6E100FF989F /* CYCycleProgressBar.swift in Sources */,
277+
A3CCAF311D17A56000A40969 /* CYJSJSONParametersSerialization.swift in Sources */,
201278
A33913D11CF4236800C8C147 /* CYJSONUtils.swift in Sources */,
202279
61091D721CDAFCDA008B7EA3 /* ImageDownloader.swift in Sources */,
280+
A3CCAF331D17A57900A40969 /* CYJSParametersSerialization.swift in Sources */,
203281
61091D5E1CDAF8E4008B7EA3 /* AppDelegate.swift in Sources */,
204282
A306D5631CE330A8008341F3 /* CYAlertViewAction.swift in Sources */,
283+
A38580201DEFCFA800FF989F /* CYLineProgressBar.swift in Sources */,
284+
A3CCAF351D17A58900A40969 /* CYJSHTTPParametersSerialization.swift in Sources */,
285+
A3CCAF371D17D6EE00A40969 /* CYAlertView.swift in Sources */,
205286
A33913D31CF4282700C8C147 /* Array+CYUtils.swift in Sources */,
206287
A3E2530A1CFD976F002F8E18 /* ObjectiveCTestObject.m in Sources */,
207288
A33913CE1CF3EE4400C8C147 /* Dictionary+CYUtils.swift in Sources */,
289+
A33E4B3D1D06ABDC001B0AB1 /* CYJSCommonActionRequestUtils.swift in Sources */,
208290
);
209291
runOnlyForDeploymentPostprocessing = 0;
210292
};
@@ -244,8 +326,10 @@
244326
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
245327
CLANG_WARN_EMPTY_BODY = YES;
246328
CLANG_WARN_ENUM_CONVERSION = YES;
329+
CLANG_WARN_INFINITE_RECURSION = YES;
247330
CLANG_WARN_INT_CONVERSION = YES;
248331
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
332+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
249333
CLANG_WARN_UNREACHABLE_CODE = YES;
250334
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
251335
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -290,8 +374,10 @@
290374
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
291375
CLANG_WARN_EMPTY_BODY = YES;
292376
CLANG_WARN_ENUM_CONVERSION = YES;
377+
CLANG_WARN_INFINITE_RECURSION = YES;
293378
CLANG_WARN_INT_CONVERSION = YES;
294379
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
380+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
295381
CLANG_WARN_UNREACHABLE_CODE = YES;
296382
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
297383
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -310,6 +396,7 @@
310396
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
311397
MTL_ENABLE_DEBUG_INFO = NO;
312398
SDKROOT = iphoneos;
399+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
313400
TARGETED_DEVICE_FAMILY = "1,2";
314401
VALIDATE_PRODUCT = YES;
315402
};
@@ -320,13 +407,16 @@
320407
buildSettings = {
321408
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
322409
CLANG_ENABLE_MODULES = YES;
410+
CODE_SIGN_IDENTITY = "iPhone Developer";
411+
DEVELOPMENT_TEAM = BQN58WSC57;
323412
INFOPLIST_FILE = CYUtilProjectSwift/Info.plist;
324413
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
325414
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
326415
PRODUCT_BUNDLE_IDENTIFIER = com.Jasper.CYUtilProjectSwift;
327416
PRODUCT_NAME = "$(TARGET_NAME)";
328417
SWIFT_OBJC_BRIDGING_HEADER = "CYUtilProjectSwift/CYUtilProjectSwift-Bridging-Header.h";
329418
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
419+
SWIFT_VERSION = 3.0;
330420
};
331421
name = Debug;
332422
};
@@ -335,12 +425,15 @@
335425
buildSettings = {
336426
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
337427
CLANG_ENABLE_MODULES = YES;
428+
CODE_SIGN_IDENTITY = "iPhone Distribution";
429+
DEVELOPMENT_TEAM = BQN58WSC57;
338430
INFOPLIST_FILE = CYUtilProjectSwift/Info.plist;
339431
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
340432
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
341433
PRODUCT_BUNDLE_IDENTIFIER = com.Jasper.CYUtilProjectSwift;
342434
PRODUCT_NAME = "$(TARGET_NAME)";
343435
SWIFT_OBJC_BRIDGING_HEADER = "CYUtilProjectSwift/CYUtilProjectSwift-Bridging-Header.h";
436+
SWIFT_VERSION = 3.0;
344437
};
345438
name = Release;
346439
};

CYUtilProjectSwift/CYUtilProjectSwift/CYUtilProjectSwift/AppDelegate.swift

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,31 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
19+
1920
return true
2021
}
2122

22-
func applicationWillResignActive(application: UIApplication) {
23+
func applicationWillResignActive(_ application: UIApplication) {
2324
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
2425
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
2526
}
2627

27-
func applicationDidEnterBackground(application: UIApplication) {
28+
func applicationDidEnterBackground(_ application: UIApplication) {
2829
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
2930
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3031
}
3132

32-
func applicationWillEnterForeground(application: UIApplication) {
33+
func applicationWillEnterForeground(_ application: UIApplication) {
3334
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
3435
}
3536

36-
func applicationDidBecomeActive(application: UIApplication) {
37+
func applicationDidBecomeActive(_ application: UIApplication) {
3738
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
3839
}
3940

40-
func applicationWillTerminate(application: UIApplication) {
41+
func applicationWillTerminate(_ application: UIApplication) {
4142
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4243
}
4344

CYUtilProjectSwift/CYUtilProjectSwift/CYUtilProjectSwift/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
"idiom" : "ipad",
6060
"size" : "76x76",
6161
"scale" : "2x"
62+
},
63+
{
64+
"idiom" : "ipad",
65+
"size" : "83.5x83.5",
66+
"scale" : "2x"
6267
}
6368
],
6469
"info" : {

0 commit comments

Comments
 (0)