de class="nohighlight"> <integer>5</integer> 80
			<integer>7</integer>
81 81
		</dict>
82 82
		<key>jsinspector.xcscheme</key>
83 83
		<dict>
84 84
			<key>orderHint</key>
85
			<integer>31</integer>
85
			<integer>34</integer>
86 86
		</dict>
87 87
		<key>privatedata-tvOS.xcscheme</key>
88 88
		<dict>
@ -92,12 +92,12 @@
92 92
		<key>privatedata-tvOS.xcscheme_^#shared#^_</key>
93 93
		<dict>
94 94
			<key>orderHint</key>
95
			<integer>6</integer>
95
			<integer>8</integer>
96 96
		</dict>
97 97
		<key>privatedata.xcscheme</key>
98 98
		<dict>
99 99
			<key>orderHint</key>
100
			<integer>34</integer>
100
			<integer>37</integer>
101 101
		</dict>
102 102
		<key>third-party-tvOS.xcscheme</key>
103 103
		<dict>
@ -107,12 +107,12 @@
107 107
		<key>third-party-tvOS.xcscheme_^#shared#^_</key>
108 108
		<dict>
109 109
			<key>orderHint</key>
110
			<integer>18</integer>
110
			<integer>20</integer>
111 111
		</dict>
112 112
		<key>third-party.xcscheme</key>
113 113
		<dict>
114 114
			<key>orderHint</key>
115
			<integer>32</integer>
115
			<integer>35</integer>
116 116
		</dict>
117 117
		<key>yoga-tvOS.xcscheme</key>
118 118
		<dict>
@ -122,12 +122,12 @@
122 122
		<key>yoga-tvOS.xcscheme_^#shared#^_</key>
123 123
		<dict>
124 124
			<key>orderHint</key>
125
			<integer>19</integer>
125
			<integer>21</integer>
126 126
		</dict>
127 127
		<key>yoga.xcscheme</key>
128 128
		<dict>
129 129
			<key>orderHint</key>
130
			<integer>28</integer>
130
			<integer>31</integer>
131 131
		</dict>
132 132
	</dict>
133 133
	<key>SuppressBuildableAutocreation</key>

BIN
display-center/Res/icon/Default.png


BIN
display-center/Res/icon/Default@2x.png


BIN
display-center/Res/icon/Default~iphone.png


display-center/display-center/SuspendButton/icon_back_suspend@2x.png → display-center/Res/icon/app-back@2x.png


+ 116 - 36
display-center/display-center.xcodeproj/project.pbxproj

@ -9,7 +9,6 @@
9 9
/* Begin PBXBuildFile section */
10 10
		0429A232218046E2003CEE83 /* WadeMobileFuncBundle.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 0429A206218046E2003CEE83 /* WadeMobileFuncBundle.bundle */; };
11 11
		0429A2342180484E003CEE83 /* fontawesome-webfont.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0429A2332180484E003CEE83 /* fontawesome-webfont.ttf */; };
12
		B21A88C221C8DD3700985486 /* icon_back_suspend@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = B21A88C121C8DD3700985486 /* icon_back_suspend@2x.png */; };
13 12
		B247A76C20E0D33B00117A38 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B247A76B20E0D33A00117A38 /* UIKit.framework */; };
14 13
		B247A76E20E0D34100117A38 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B247A76D20E0D34100117A38 /* Foundation.framework */; };
15 14
		B247A77020E0D34700117A38 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B247A76F20E0D34700117A38 /* CoreGraphics.framework */; };
@ -51,10 +50,6 @@
51 50
		B28C9E2121C3A64A0006191A /* IpuCount.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B28C9DF521C3A64A0006191A /* IpuCount.framework */; };
52 51
		B28C9E2221C3A6520006191A /* IpuCount.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = B28C9DF521C3A64A0006191A /* IpuCount.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
53 52
		B2984FF821367D8F0084C507 /* libz.1.1.3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = B2984FF721367D8F0084C507 /* libz.1.1.3.tbd */; };
54
		B2C8BE0321A7E5FA0009FED8 /* IpuSuspendButton.m in Sources */ = {isa = PBXBuildFile; fileRef = B2C8BDD221A7E5FA0009FED8 /* IpuSuspendButton.m */; };
55
		B2C8BE0521A7E5FA0009FED8 /* IpuSuspendEventItem.m in Sources */ = {isa = PBXBuildFile; fileRef = B2C8BDD521A7E5FA0009FED8 /* IpuSuspendEventItem.m */; };
56
		B2C8BE0621A7E5FA0009FED8 /* IpuSuspendMenuView.m in Sources */ = {isa = PBXBuildFile; fileRef = B2C8BDD721A7E5FA0009FED8 /* IpuSuspendMenuView.m */; };
57
		B2C8BE0821A7E94C0009FED8 /* UIButton+SuspendAddition.m in Sources */ = {isa = PBXBuildFile; fileRef = B2C8BE0721A7E94C0009FED8 /* UIButton+SuspendAddition.m */; };
58 53
		B2D573C921369BCE00BFE4A2 /* GLKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2D573C821369BCD00BFE4A2 /* GLKit.framework */; };
59 54
		B2E1A73F211D441700249DB0 /* img.png in Resources */ = {isa = PBXBuildFile; fileRef = B2E1A73C211D441700249DB0 /* img.png */; };
60 55
		B2E1A740211D441700249DB0 /* video.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = B2E1A73D211D441700249DB0 /* video.mp4 */; };
@ -99,6 +94,48 @@
99 94
/* End PBXBuildFile section */
100 95
101 96
/* Begin PBXContainerItemProxy section */
97
		04627EDD2238B48F0083A956 /* PBXContainerItemProxy */ = {
98
			isa = PBXContainerItemProxy;
99
			containerPortal = 04627EAC2238B48E0083A956 /* WadeMobile.xcodeproj */;
100
			proxyType = 2;
101
			remoteGlobalIDString = 614A1CD61B2142130099793B;
102
			remoteInfo = WadeMobile;
103
		};
104
		04627EDF2238B48F0083A956 /* PBXContainerItemProxy */ = {
105
			isa = PBXContainerItemProxy;
106
			containerPortal = 04627EAC2238B48E0083A956 /* WadeMobile.xcodeproj */;
107
			proxyType = 2;
108
			remoteGlobalIDString = 614A1CE11B2142130099793B;
109
			remoteInfo = WadeMobileTests;
110
		};
111
		04627EE12238B48F0083A956 /* PBXContainerItemProxy */ = {
112
			isa = PBXContainerItemProxy;
113
			containerPortal = 04627EAC2238B48E0083A956 /* WadeMobile.xcodeproj */;
114
			proxyType = 2;
115
			remoteGlobalIDString = E2D93A741B89BA2800D1DE7C;
116
			remoteInfo = WadeMobileBundle;
117
		};
118
		04627EE32238B48F0083A956 /* PBXContainerItemProxy */ = {
119
			isa = PBXContainerItemProxy;
120
			containerPortal = 04627EAC2238B48E0083A956 /* WadeMobile.xcodeproj */;
121
			proxyType = 2;
122
			remoteGlobalIDString = 0A791C221FD102C0003CD586;
123
			remoteInfo = WadeMobileTestUnit;
124
		};
125
		04627EEC2238B4A40083A956 /* PBXContainerItemProxy */ = {
126
			isa = PBXContainerItemProxy;
127
			containerPortal = 04627EE52238B4A40083A956 /* WadeMobileFunc.xcodeproj */;
128
			proxyType = 2;
129
			remoteGlobalIDString = E2DE1AD41B42DD9500762141;
130
			remoteInfo = WadeMobileFunc;
131
		};
132
		04627EEE2238B4A40083A956 /* PBXContainerItemProxy */ = {
133
			isa = PBXContainerItemProxy;
134
			containerPortal = 04627EE52238B4A40083A956 /* WadeMobileFunc.xcodeproj */;
135
			proxyType = 2;
136
			remoteGlobalIDString = 0AE1E0841C7EE95900FCCD24;
137
			remoteInfo = WadeMobileFuncTests;
138
		};
102 139
		B25B8FDF21901B0C001A240E /* PBXContainerItemProxy */ = {
103 140
			isa = PBXContainerItemProxy;
104 141
			containerPortal = B25B8FD821901B0C001A240E /* RCTWebSocket.xcodeproj */;
@ -410,7 +447,8 @@
410 447
		0429A206218046E2003CEE83 /* WadeMobileFuncBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = WadeMobileFuncBundle.bundle; path = ../IpuCommon/Frameworks/WadeMobileFuncBundle.bundle; sourceTree = "<group>"; };
411 448
		0429A2332180484E003CEE83 /* fontawesome-webfont.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "fontawesome-webfont.ttf"; path = "../IpuCommon/Frameworks/fontawesome-webfont.ttf"; sourceTree = "<group>"; };
412 449
		0460E86220AA9C1300CCFDA4 /* UserNotifications.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UserNotifications.framework; path = System/Library/Frameworks/UserNotifications.framework; sourceTree = SDKROOT; };
413
		B21A88C121C8DD3700985486 /* icon_back_suspend@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon_back_suspend@2x.png"; sourceTree = "<group>"; };
450
		04627EAC2238B48E0083A956 /* WadeMobile.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WadeMobile.xcodeproj; path = ../../ios/WadeMobile/WadeMobile.xcodeproj; sourceTree = "<group>"; };
451
		04627EE52238B4A40083A956 /* WadeMobileFunc.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WadeMobileFunc.xcodeproj; path = ../WadeMobileFunc/WadeMobileFunc.xcodeproj; sourceTree = "<group>"; };
414 452
		B247A76B20E0D33A00117A38 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
415 453
		B247A76D20E0D34100117A38 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
416 454
		B247A76F20E0D34700117A38 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
@ -449,14 +487,6 @@
449 487
		B25B90B821903F2E001A240E /* ART.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ART.xcodeproj; path = "ReactNative/node_modules/react-native/Libraries/ART/ART.xcodeproj"; sourceTree = "<group>"; };
450 488
		B28C9DF521C3A64A0006191A /* IpuCount.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IpuCount.framework; path = ../IpuCommon/Frameworks/IpuCount.framework; sourceTree = "<group>"; };
451 489
		B2984FF721367D8F0084C507 /* libz.1.1.3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.1.1.3.tbd; path = usr/lib/libz.1.1.3.tbd; sourceTree = SDKROOT; };
452
		B2C8BDD021A7E5FA0009FED8 /* IpuSuspendEventItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IpuSuspendEventItem.h; sourceTree = "<group>"; };
453
		B2C8BDD121A7E5FA0009FED8 /* UIButton+SuspendAddition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+SuspendAddition.h"; sourceTree = "<group>"; };
454
		B2C8BDD221A7E5FA0009FED8 /* IpuSuspendButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IpuSuspendButton.m; sourceTree = "<group>"; };
455
		B2C8BDD421A7E5FA0009FED8 /* IpuSuspendMenuView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IpuSuspendMenuView.h; sourceTree = "<group>"; };
456
		B2C8BDD521A7E5FA0009FED8 /* IpuSuspendEventItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IpuSuspendEventItem.m; sourceTree = "<group>"; };
457
		B2C8BDD621A7E5FA0009FED8 /* IpuSuspendButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IpuSuspendButton.h; sourceTree = "<group>"; };
458
		B2C8BDD721A7E5FA0009FED8 /* IpuSuspendMenuView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IpuSuspendMenuView.m; sourceTree = "<group>"; };
459
		B2C8BE0721A7E94C0009FED8 /* UIButton+SuspendAddition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+SuspendAddition.m"; sourceTree = "<group>"; };
460 490
		B2D573C821369BCD00BFE4A2 /* GLKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLKit.framework; path = System/Library/Frameworks/GLKit.framework; sourceTree = SDKROOT; };
461 491
		B2E1A73C211D441700249DB0 /* img.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = img.png; sourceTree = "<group>"; };
462 492
		B2E1A73D211D441700249DB0 /* video.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = video.mp4; sourceTree = "<group>"; };
@ -590,6 +620,26 @@
590 620
			name = Frameworks;
591 621
			sourceTree = "<group>";
592 622
		};
623
		04627EAD2238B48E0083A956 /* Products */ = {
624
			isa = PBXGroup;
625
			children = (
626
				04627EDE2238B48F0083A956 /* WadeMobile.framework */,
627
				04627EE02238B48F0083A956 /* WadeMobileTests.xctest */,
628
				04627EE22238B48F0083A956 /* WadeMobileBundle.bundle */,
629
				04627EE42238B48F0083A956 /* WadeMobileTestUnit.xctest */,
630
			);
631
			name = Products;
632
			sourceTree = "<group>";
633
		};
634
		04627EE62238B4A40083A956 /* Products */ = {
635
			isa = PBXGroup;
636
			children = (
637
				04627EED2238B4A40083A956 /* WadeMobileFunc.framework */,
638
				04627EEF2238B4A40083A956 /* WadeMobileFuncTests.xctest */,
639
			);
640
			name = Products;
641
			sourceTree = "<group>";
642
		};
593 643
		B254174121A5329B00ABCE93 /* IpuRN */ = {
594 644
			isa = PBXGroup;
595 645
			children = (
@ -733,22 +783,6 @@
733 783
			name = ReactNativeLibs;
734 784
			sourceTree = "<group>";
735 785
		};
736
		B2C8BDCF21A7E5FA0009FED8 /* SuspendButton */ = {
737
			isa = PBXGroup;
738
			children = (
739
				B21A88C121C8DD3700985486 /* icon_back_suspend@2x.png */,
740
				B2C8BDD021A7E5FA0009FED8 /* IpuSuspendEventItem.h */,
741
				B2C8BDD521A7E5FA0009FED8 /* IpuSuspendEventItem.m */,
742
				B2C8BDD121A7E5FA0009FED8 /* UIButton+SuspendAddition.h */,
743
				B2C8BE0721A7E94C0009FED8 /* UIButton+SuspendAddition.m */,
744
				B2C8BDD621A7E5FA0009FED8 /* IpuSuspendButton.h */,
745
				B2C8BDD221A7E5FA0009FED8 /* IpuSuspendButton.m */,
746
				B2C8BDD421A7E5FA0009FED8 /* IpuSuspendMenuView.h */,
747
				B2C8BDD721A7E5FA0009FED8 /* IpuSuspendMenuView.m */,
748
			);
749
			path = SuspendButton;
750
			sourceTree = "<group>";
751
		};
752 786
		B2E1A73B211D441700249DB0 /* ShareRes */ = {
753 787
			isa = PBXGroup;
754 788
			children = (
@ -831,6 +865,8 @@
831 865
		EA8712331ECD8B580045E19A = {
832 866
			isa = PBXGroup;
833 867
			children = (
868
				04627EE52238B4A40083A956 /* WadeMobileFunc.xcodeproj */,
869
				04627EAC2238B48E0083A956 /* WadeMobile.xcodeproj */,
834 870
				B2E563B921E5E07A00B67E21 /* mapapi.bundle */,
835 871
				B2E5637921E4A39E00B67E21 /* BDMapLibs */,
836 872
				B2E563A821E4A39E00B67E21 /* IpuBDMap */,
@ -861,7 +897,6 @@
861 897
		EA87123E1ECD8B580045E19A /* display-center */ = {
862 898
			isa = PBXGroup;
863 899
			children = (
864
				B2C8BDCF21A7E5FA0009FED8 /* SuspendButton */,
865 900
				B2E42E1121118FA7001D5FB8 /* display-center.entitlements */,
866 901
				EA8712421ECD8B580045E19A /* AppDelegate.h */,
867 902
				EA8712431ECD8B580045E19A /* AppDelegate.mm */,
@ -1002,6 +1037,14 @@
1002 1037
					ProductGroup = B2FC4AD62191392D008F7621 /* Products */;
1003 1038
					ProjectRef = B2FC4AD52191392D008F7621 /* RNCamera.xcodeproj */;
1004 1039
				},
1040
				{
1041
					ProductGroup = 04627EAD2238B48E0083A956 /* Products */;
1042
					ProjectRef = 04627EAC2238B48E0083A956 /* WadeMobile.xcodeproj */;
1043
				},
1044
				{
1045
					ProductGroup = 04627EE62238B4A40083A956 /* Products */;
1046
					ProjectRef = 04627EE52238B4A40083A956 /* WadeMobileFunc.xcodeproj */;
1047
				},
1005 1048
			);
1006 1049
			projectRoot = "";
1007 1050
			targets = (
@ -1011,6 +1054,48 @@
1011 1054
/* End PBXProject section */
1012 1055
1013 1056
/* Begin PBXReferenceProxy section */
1057
		04627EDE2238B48F0083A956 /* WadeMobile.framework */ = {
1058
			isa = PBXReferenceProxy;
1059
			fileType = wrapper.framework;
1060
			path = WadeMobile.framework;
1061
			remoteRef = 04627EDD2238B48F0083A956 /* PBXContainerItemProxy */;
1062
			sourceTree = BUILT_PRODUCTS_DIR;
1063
		};
1064
		04627EE02238B48F0083A956 /* WadeMobileTests.xctest */ = {
1065
			isa = PBXReferenceProxy;
1066
			fileType = wrapper.cfbundle;
1067
			path = WadeMobileTests.xctest;
1068
			remoteRef = 04627EDF2238B48F0083A956 /* PBXContainerItemProxy */;
1069
			sourceTree = BUILT_PRODUCTS_DIR;
1070
		};
1071
		04627EE22238B48F0083A956 /* WadeMobileBundle.bundle */ = {
1072
			isa = PBXReferenceProxy;
1073
			fileType = wrapper.cfbundle;
1074
			path = WadeMobileBundle.bundle;
1075
			remoteRef = 04627EE12238B48F0083A956 /* PBXContainerItemProxy */;
1076
			sourceTree = BUILT_PRODUCTS_DIR;
1077
		};
1078
		04627EE42238B48F0083A956 /* WadeMobileTestUnit.xctest */ = {
1079
			isa = PBXReferenceProxy;
1080
			fileType = wrapper.cfbundle;
1081
			path = WadeMobileTestUnit.xctest;
1082
			remoteRef = 04627EE32238B48F0083A956 /* PBXContainerItemProxy */;
1083
			sourceTree = BUILT_PRODUCTS_DIR;
1084
		};
1085
		04627EED2238B4A40083A956 /* WadeMobileFunc.framework */ = {
1086
			isa = PBXReferenceProxy;
1087
			fileType = wrapper.framework;
1088
			path = WadeMobileFunc.framework;
1089
			remoteRef = 04627EEC2238B4A40083A956 /* PBXContainerItemProxy */;
1090
			sourceTree = BUILT_PRODUCTS_DIR;
1091
		};
1092
		04627EEF2238B4A40083A956 /* WadeMobileFuncTests.xctest */ = {
1093
			isa = PBXReferenceProxy;
1094
			fileType = wrapper.cfbundle;
1095
			path = WadeMobileFuncTests.xctest;
1096
			remoteRef = 04627EEE2238B4A40083A956 /* PBXContainerItemProxy */;
1097
			sourceTree = BUILT_PRODUCTS_DIR;
1098
		};
1014 1099
		B25B8FE021901B0C001A240E /* libRCTWebSocket.a */ = {
1015 1100
			isa = PBXReferenceProxy;
1016 1101
			fileType = archive.ar;
@ -1312,7 +1397,6 @@
1312 1397
				EA87124F1ECD8B580045E19A /* LaunchScreen.storyboard in Resources */,
1313 1398
				0429A2342180484E003CEE83 /* fontawesome-webfont.ttf in Resources */,
1314 1399
				B2E1A741211D441700249DB0 /* music.mp3 in Resources */,
1315
				B21A88C221C8DD3700985486 /* icon_back_suspend@2x.png in Resources */,
1316 1400
				B2E1A740211D441700249DB0 /* video.mp4 in Resources */,
1317 1401
				EA87124C1ECD8B580045E19A /* Assets.xcassets in Resources */,
1318 1402
				EA87124A1ECD8B580045E19A /* Main.storyboard in Resources */,
@ -1345,16 +1429,12 @@
1345 1429
			files = (
1346 1430
				B2FACEE921E6E8870023CA6C /* JRSwizzle.m in Sources */,
1347 1431
				EA8712471ECD8B580045E19A /* ViewController.m in Sources */,
1348
				B2C8BE0521A7E5FA0009FED8 /* IpuSuspendEventItem.m in Sources */,
1349 1432
				EA8712441ECD8B580045E19A /* AppDelegate.mm in Sources */,
1350 1433
				EA8712411ECD8B580045E19A /* main.m in Sources */,
1351 1434
				B254176621A54CC400ABCE93 /* IpuRNRegisterUtil.m in Sources */,
1352 1435
				B2FACF2921E73DBF0023CA6C /* IPUBaiduMapViewController.m in Sources */,
1353 1436
				B2E563BC21E5E2FF00B67E21 /* IPUBaiduMapManager.m in Sources */,
1354 1437
				B2FF4F0121D4F33200EAE775 /* IpuRNFinishVCPlugin.m in Sources */,
1355
				B2C8BE0821A7E94C0009FED8 /* UIButton+SuspendAddition.m in Sources */,
1356
				B2C8BE0621A7E5FA0009FED8 /* IpuSuspendMenuView.m in Sources */,
1357
				B2C8BE0321A7E5FA0009FED8 /* IpuSuspendButton.m in Sources */,
1358 1438
				B2FF4F0221D4F33800EAE775 /* PhoneNumber.m in Sources */,
1359 1439
				B2FACEFE21E7311A0023CA6C /* IPUBaiduMapPlugin.m in Sources */,
1360 1440
				B2FACEEC21E6EA8A0023CA6C /* WDAppDelegate+IPUBaiduMapAddition.m in Sources */,

BIN
display-center/display-center.xcodeproj/project.xcworkspace/xcuserdata/mac.xcuserdatad/UserInterfaceState.xcuserstate


+ 32 - 0
display-center/display-center.xcodeproj/xcuserdata/mac.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@ -561,5 +561,37 @@
561 561
            landmarkType = "7">
562 562
         </BreakpointContent>
563 563
      </BreakpointProxy>
564
      <BreakpointProxy
565
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
566
         <BreakpointContent
567
            shouldBeEnabled = "Yes"
568
            ignoreCount = "0"
569
            continueAfterRunningActions = "No"
570
            filePath = "display-center/ViewController.m"
571
            timestampString = "574149683.094046"
572
            startingColumnNumber = "9223372036854775807"
573
            endingColumnNumber = "9223372036854775807"
574
            startingLineNumber = "85"
575
            endingLineNumber = "85"
576
            landmarkName = "-back"
577
            landmarkType = "7">
578
         </BreakpointContent>
579
      </BreakpointProxy>
580
      <BreakpointProxy
581
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
582
         <BreakpointContent
583
            shouldBeEnabled = "Yes"
584
            ignoreCount = "0"
585
            continueAfterRunningActions = "No"
586
            filePath = "display-center/ViewController.m"
587
            timestampString = "574149683.094344"
588
            startingColumnNumber = "9223372036854775807"
589
            endingColumnNumber = "9223372036854775807"
590
            startingLineNumber = "87"
591
            endingLineNumber = "87"
592
            landmarkName = "-back"
593
            landmarkType = "7">
594
         </BreakpointContent>
595
      </BreakpointProxy>
564 596
   </Breakpoints>
565 597
</Bucket>

+ 1 - 1
display-center/display-center.xcodeproj/xcuserdata/mac.xcuserdatad/xcschemes/xcschememanagement.plist

@ -7,7 +7,7 @@
7 7
		<key>display-center.xcscheme</key>
8 8
		<dict>
9 9
			<key>orderHint</key>
10
			<integer>20</integer>
10
			<integer>22</integer>
11 11
		</dict>
12 12
	</dict>
13 13
	<key>SuppressBuildableAutocreation</key>

+ 0 - 39
display-center/display-center/SuspendButton/IpuSuspendButton.h

@ -1,39 +0,0 @@
1
//
2
//  IpuSuspendButton.h
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/8.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import <UIKit/UIKit.h>
10
11
NS_ASSUME_NONNULL_BEGIN
12
13
#define SuspendButtonWH 40
14
#define MenuButtonWH 30
15
#define Padding 5
16
17
#define MenuButtonMax 6
18
#define TextFontSize 12
19
20
#define MenuRadio 60
21
22
#define ScreenWidth  CGRectGetWidth([UIScreen mainScreen].bounds)
23
#define ScreenHeight CGRectGetHeight([UIScreen mainScreen].bounds)
24
25
@class IpuSuspendEventItem;
26
27
@interface IpuSuspendButton : UIButton
28
29
+ (instancetype)sharedButton;
30
31
- (void)addEventItem:(IpuSuspendEventItem *)item;
32
33
- (void)addEventItems:(NSArray <IpuSuspendEventItem *> *)items;
34
35
- (void)performAnimation:(void (^)(void))completion;
36
37
@end
38
39
NS_ASSUME_NONNULL_END

+ 0 - 201
display-center/display-center/SuspendButton/IpuSuspendButton.m

@ -1,201 +0,0 @@
1
//
2
//  IpuSuspendButton.m
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/8.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import "IpuSuspendButton.h"
10
11
#import "IpuSuspendMenuView.h"
12
#import "IpuSuspendEventItem.h"
13
14
@interface IpuSuspendButton ()
15
16
@property (nonatomic, strong) NSMutableArray <IpuSuspendEventItem *> *eventItems;
17
18
@property (nonatomic, strong) IpuSuspendMenuView *menuView;
19
20
@end
21
22
@implementation IpuSuspendButton
23
24
static IpuSuspendButton *sharedButton;
25
26
- (NSMutableArray<IpuSuspendEventItem *> *)eventItems {
27
    if (!_eventItems) {
28
        _eventItems = [NSMutableArray arrayWithCapacity:6];
29
    }
30
    return _eventItems;
31
}
32
33
- (IpuSuspendMenuView *)menuView {
34
    if (!_menuView) {
35
        _menuView = [[IpuSuspendMenuView alloc] initWithFrame:[UIScreen mainScreen].bounds
36
                                                        items:self.eventItems.copy
37
                                                       center:self.center];
38
    }
39
    return _menuView;
40
}
41
42
+ (instancetype)sharedButton {
43
    static dispatch_once_t onceToken;
44
    dispatch_once(&onceToken, ^{
45
        // 默认为靠左居中
46
        sharedButton = [[self alloc] initWithFrame:CGRectMake(Padding, CGRectGetHeight([UIScreen mainScreen].bounds) - 2 * SuspendButtonWH, SuspendButtonWH, SuspendButtonWH)];
47
        sharedButton.backgroundColor = [UIColor colorWithWhite:.2 alpha:1.0];
48
        sharedButton.layer.cornerRadius = SuspendButtonWH/2;
49
    });
50
    return sharedButton;
51
}
52
53
- (instancetype)initWithFrame:(CGRect)frame {
54
    if (self = [super initWithFrame:frame]) {
55
        [self setImage:[UIImage imageNamed:@"icon_back_suspend"] forState:UIControlStateNormal];
56
        [self addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
57
        
58
        // 添加拖动手势
59
        UIPanGestureRecognizer *panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panAction:)];
60
        [self addGestureRecognizer:panGesture];
61
    }
62
    return self;
63
}
64
65
- (void)addEventItem:(IpuSuspendEventItem *)item {
66
    NSParameterAssert(self.eventItems.count < MenuButtonMax);
67
    [self.eventItems addObject:item];
68
}
69
70
- (void)addEventItems:(NSArray <IpuSuspendEventItem *> *)items {
71
    NSParameterAssert(self.eventItems.count < MenuButtonMax && (self.eventItems.count + items.count) < MenuButtonMax);
72
    
73
    [self.eventItems addObjectsFromArray:items];
74
}
75
76
- (void)buttonClicked:(IpuSuspendButton *)button {
77
    if (!self.eventItems || !self.eventItems.count) {
78
        NSLog(@"无更多功能!");
79
        return;
80
    }
81
    
82
    if (self.eventItems.count == 1) {
83
        // 单个功能
84
        IpuSuspendEventItem *item = self.eventItems.firstObject;
85
        
86
        IMP imp = [item.target methodForSelector:item.action];
87
        void (*func)(id, SEL) = (void *)imp;
88
        func(item.target, item.action);
89
        return;
90
    }
91
    
92
    // 多个功能
93
    
94
    // 加入弹性动画
95
    [self performAnimation:^{
96
        if (CGRectGetMinX(self.frame) == Padding) {
97
            [self.menuView show:self.center postion:IpuSuspendButtonPositionLeft];
98
        } else if (CGRectGetMaxX(self.frame) == ScreenWidth - Padding) {
99
            [self.menuView show:self.center postion:IpuSuspendButtonPositionRight];
100
        } else if (CGRectGetMinY(self.frame) == Padding) {
101
            [self.menuView show:self.center postion:IpuSuspendButtonPositionTop];
102
        } else if (CGRectGetMaxY(self.frame) == ScreenHeight - Padding) {
103
            [self.menuView show:self.center postion:IpuSuspendButtonPositionBottom];
104
        }
105
    }];
106
}
107
108
- (void)performAnimation:(void (^)(void))completion {
109
    [UIView animateWithDuration:0.2 animations:^{
110
        CGRect rect = self.frame;
111
        CGPoint center = self.center;
112
        rect.size.width = rect.size.width/2;
113
        rect.size.height = rect.size.height/2;
114
        
115
        self.frame = rect;
116
        self.center = center;
117
        self.layer.cornerRadius = CGRectGetWidth(self.frame)/2;
118
    } completion:^(BOOL finished) {
119
        if (finished) {
120
            [UIView animateWithDuration:1
121
                                  delay:0.5
122
                 usingSpringWithDamping:0.3
123
                  initialSpringVelocity:0.6
124
                                options:UIViewAnimationOptionCurveEaseInOut
125
                             animations:^{
126
                                 [UIView animateWithDuration:0.5 animations:^{
127
                                     CGRect rect = self.frame;
128
                                     CGPoint center = self.center;
129
                                     rect.size.width = rect.size.width * 2;
130
                                     rect.size.height = rect.size.height * 2;
131
                                     
132
                                     self.frame = rect;
133
                                     self.center = center;
134
                                     self.layer.cornerRadius = CGRectGetWidth(self.frame)/2;
135
                                 }];
136
                             } completion:^(BOOL finished) {
137
                                 if (finished && completion) {
138
                                     completion();
139
                                 }
140
                             }];
141
        }
142
    }];
143
}
144
145
- (void)panAction:(UIPanGestureRecognizer *)recognizer {
146
    if (recognizer.state == UIGestureRecognizerStateChanged) {
147
        CGPoint translationPoint = [recognizer translationInView:self];
148
        CGPoint center = recognizer.view.center;
149
        recognizer.view.center = CGPointMake(center.x + translationPoint.x, center.y + translationPoint.y);
150
        [recognizer setTranslation:CGPointZero inView:self];
151
        
152
        return;
153
    }
154
    
155
    
156
    if (recognizer.state != UIGestureRecognizerStateEnded) {
157
        return;
158
    }
159
    
160
    CGRect rect = self.frame;
161
    
162
    {   // 调整按钮至屏幕内
163
        rect.origin.x = CGRectGetMinX(rect) > 0 ? rect.origin.x : 0;
164
        rect.origin.x = CGRectGetMaxX(rect) < ScreenWidth ? rect.origin.x : (ScreenWidth - CGRectGetWidth(self.frame));
165
        
166
        rect.origin.y = CGRectGetMinY(rect) > 0 ? rect.origin.y : 0;
167
        rect.origin.y = CGRectGetMaxY(rect) < ScreenHeight ? rect.origin.y : (ScreenHeight - CGRectGetHeight(self.frame));
168
    }
169
    
170
    CGPoint buttonCenter = self.center;
171
    
172
    // 距离左上右下的距离
173
    CGFloat distanceLeft = buttonCenter.x;
174
    CGFloat distanceTop = buttonCenter.y;
175
    CGFloat distanceRight = ScreenWidth - buttonCenter.x;
176
    CGFloat disatanceBottom = ScreenHeight - buttonCenter.y;
177
    
178
    NSArray *array = [NSArray arrayWithObjects:@(distanceLeft), @(distanceTop), @(distanceRight), @(disatanceBottom), nil];
179
    CGFloat min =[[array valueForKeyPath:@"@min.floatValue"] floatValue];
180
    
181
    // 动画时间
182
    NSTimeInterval duration = 0.5 * (min/ScreenHeight);
183
    
184
    if (min == distanceLeft) {
185
        rect.origin.x = Padding;
186
    } else if (min == distanceTop) {
187
        rect.origin.y = Padding;
188
    } else if (min == distanceRight) {
189
        rect.origin.x = ScreenWidth - CGRectGetWidth(self.frame) - Padding;
190
    } else {
191
        rect.origin.y = ScreenHeight - CGRectGetHeight(self.frame) - Padding;
192
    }
193
    
194
    [UIView animateWithDuration:duration animations:^{
195
        self.frame = rect;
196
    } completion:^(BOOL finished) {
197
        [self.menuView updateButtonsCenter:buttonCenter];
198
    }];
199
}
200
201
@end

+ 0 - 30
display-center/display-center/SuspendButton/IpuSuspendEventItem.h

@ -1,30 +0,0 @@
1
//
2
//  IpuSuspendEventItem.h
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/8.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import <Foundation/Foundation.h>
10
11
NS_ASSUME_NONNULL_BEGIN
12
13
@interface IpuSuspendEventItem : NSObject
14
15
@property (nonatomic, copy, readonly) NSString *imageName;
16
17
@property (nonatomic, copy, readonly) NSString *title;
18
19
@property (nonatomic, strong, readonly) id target;
20
21
@property (nonatomic, assign, readonly) SEL action;
22
23
+ (IpuSuspendEventItem *)suspendEventItemWithImageName:(NSString *)imageName
24
                                                 title:(NSString *)title
25
                                                target:(id)target
26
                                                action:(SEL)action;
27
28
@end
29
30
NS_ASSUME_NONNULL_END

+ 0 - 37
display-center/display-center/SuspendButton/IpuSuspendEventItem.m

@ -1,37 +0,0 @@
1
//
2
//  IpuSuspendEventItem.m
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/8.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import "IpuSuspendEventItem.h"
10
11
@interface IpuSuspendEventItem ()
12
13
@property (nonatomic, copy) NSString *imageName;
14
15
@property (nonatomic, copy) NSString *title;
16
17
@property (nonatomic, strong) id target;
18
19
@property (nonatomic, assign) SEL action;
20
21
@end
22
23
@implementation IpuSuspendEventItem
24
25
+ (IpuSuspendEventItem *)suspendEventItemWithImageName:(NSString *)imageName
26
                                                 title:(NSString *)title
27
                                                target:(id)target
28
                                                action:(SEL)action {
29
    IpuSuspendEventItem *item = [[IpuSuspendEventItem alloc] init];
30
    item.imageName = imageName;
31
    item.title = title;
32
    item.target = target;
33
    item.action = action;
34
    return item;
35
}
36
37
@end

+ 0 - 34
display-center/display-center/SuspendButton/IpuSuspendMenuView.h

@ -1,34 +0,0 @@
1
//
2
//  IpuSuspendMenuView.h
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/9.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import <UIKit/UIKit.h>
10
11
NS_ASSUME_NONNULL_BEGIN
12
13
@class IpuSuspendEventItem;
14
15
typedef NS_ENUM(NSInteger, IpuSuspendButtonPosition) {
16
    IpuSuspendButtonPositionLeft = 0,
17
    IpuSuspendButtonPositionTop,
18
    IpuSuspendButtonPositionRight,
19
    IpuSuspendButtonPositionBottom
20
};
21
22
@interface IpuSuspendMenuView : UIView
23
24
- (instancetype)initWithFrame:(CGRect)frame
25
                        items:(NSArray <IpuSuspendEventItem *>*)items
26
                       center:(CGPoint)center;
27
28
- (void)show:(CGPoint)center postion:(IpuSuspendButtonPosition)postion;
29
30
- (void)updateButtonsCenter:(CGPoint)center;
31
32
@end
33
34
NS_ASSUME_NONNULL_END

+ 0 - 330
display-center/display-center/SuspendButton/IpuSuspendMenuView.m

@ -1,330 +0,0 @@
1
//
2
//  IpuSuspendMenuView.m
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/9.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import "IpuSuspendMenuView.h"
10
11
#import "IpuSuspendEventItem.h"
12
#import "IpuSuspendButton.h"
13
14
@interface IpuSuspendMenuView ()
15
16
@property (nonatomic, strong) NSArray <IpuSuspendEventItem *> *items;
17
18
@property (nonatomic, assign) CGPoint position;
19
20
@end
21
22
@implementation IpuSuspendMenuView
23
24
- (instancetype)initWithFrame:(CGRect)frame
25
                        items:(NSArray <IpuSuspendEventItem *> *)items
26
                       center:(CGPoint)center {
27
    if (self = [super initWithFrame:frame]) {
28
        self.frame = frame;
29
        self.items = items;
30
        self.position = center;
31
        self.backgroundColor = [UIColor colorWithWhite:.9 alpha:.2];
32
        UITapGestureRecognizer *tapG = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap:)];
33
        [self addGestureRecognizer:tapG];
34
        
35
        [self setupButtons:items center:center];
36
    }
37
    return self;
38
}
39
40
- (void)setupButtons:(NSArray <IpuSuspendEventItem *> *)items center:(CGPoint)center {
41
    NSMutableArray *buttons = [NSMutableArray arrayWithCapacity:items.count];
42
    
43
    for (int i = 0; i < items.count; i++) {
44
        IpuSuspendEventItem *item = items[i];
45
        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
46
        button.tag = i + 1000;
47
        
48
        UIImage *image = [UIImage imageNamed:item.imageName];
49
        if (image) {
50
            [button setImage:image forState:UIControlStateNormal];
51
        } else if (item.title && item.title.length > 0){
52
            [button setTitle:item.title forState:UIControlStateNormal];
53
            button.titleLabel.font = [UIFont systemFontOfSize:TextFontSize];
54
        } else {
55
            button.backgroundColor = [UIColor redColor];
56
        }
57
        
58
        button.frame = CGRectMake(0, 0, 1, 1);
59
        button.center = center;
60
        [button addTarget:self action:@selector(menuButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
61
        [buttons addObject:button];
62
        
63
        [self addSubview:button];
64
    }
65
}
66
67
- (void)show:(CGPoint)center postion:(IpuSuspendButtonPosition)postion {
68
    self.position = center;
69
    switch (postion) {
70
        case IpuSuspendButtonPositionLeft:
71
            [self showAtLeft:center];
72
            break;
73
            
74
        case IpuSuspendButtonPositionTop:
75
            [self showAtTop:center];
76
            break;
77
            
78
        case IpuSuspendButtonPositionRight:
79
            [self showAtRight:center];
80
            break;
81
            
82
        case IpuSuspendButtonPositionBottom:
83
            [self showAtBottom:center];
84
            break;
85
            
86
        default:
87
            break;
88
    }
89
    
90
    
91
    id <UIApplicationDelegate> application = [UIApplication sharedApplication].delegate;
92
    UIWindow *window = application.window;
93
    [window addSubview:self];
94
}
95
96
- (void)showAtLeft:(CGPoint)center {
97
    if (center.y < MenuRadio + MenuButtonWH/2) {
98
        // 左上角靠左,90°-180°扇形菜单
99
        CGFloat distanceTop = center.y - MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
100
        // 校正半径
101
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenHeight - distanceTop)/ScreenHeight;
102
        
103
        // 角度
104
        CGFloat angle = acosf(distanceTop/reviseRadio);
105
        // 补角
106
        CGFloat supplementaryAngle = M_PI - angle;
107
        
108
        for (int i = 0; i < self.items.count; i++) {
109
            UIButton *button = [self viewWithTag:i + 1000];
110
            CGFloat centerX = center.x + reviseRadio * sinf(angle + i * supplementaryAngle/(self.items.count - 1));
111
            CGFloat centerY = center.y - reviseRadio * cosf(angle + i * supplementaryAngle/(self.items.count - 1));
112
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
113
        }
114
    } else if (center.y > ScreenHeight - MenuRadio - MenuButtonWH/2) {
115
        // 左下角靠左,90°-180°扇形菜单
116
        CGFloat distanceBottom = ScreenHeight - center.y - MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
117
        // 校正半径
118
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenHeight - distanceBottom)/ScreenHeight;
119
        // 角度
120
        CGFloat angle = acosf(distanceBottom/reviseRadio);
121
        // 补角
122
        CGFloat supplementaryAngle = M_PI - angle;
123
        
124
        for (int i = 0; i < self.items.count; i++) {
125
            UIButton *button = [self viewWithTag:i + 1000];
126
            CGFloat centerX = center.x + reviseRadio * sinf(i * supplementaryAngle/(self.items.count - 1));
127
            CGFloat centerY = center.y - reviseRadio * cosf(i * supplementaryAngle/(self.items.count - 1));
128
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
129
        }
130
    } else {
131
        // 左边,半圆形菜单
132
        for (int i = 0; i < self.items.count; i++) {
133
            UIButton *button = [self viewWithTag:i + 1000];
134
            CGFloat centerX = center.x + MenuRadio * sinf(i * M_PI/(self.items.count - 1));
135
            CGFloat centerY = center.y - MenuRadio * cosf(i * M_PI/(self.items.count - 1));
136
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
137
        }
138
    }
139
}
140
141
- (void)showAtTop:(CGPoint)center {
142
    if (center.x < MenuRadio + MenuButtonWH/2) {
143
        // 左上角靠顶,90°-180°扇形菜单
144
        CGFloat distanceLeft = center.x - MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
145
        // 校正半径
146
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenWidth - distanceLeft)/ScreenWidth;
147
        // 角度
148
        CGFloat angle = acosf(distanceLeft/reviseRadio);
149
        // 补角
150
        CGFloat supplementaryAngle = M_PI - angle;
151
        
152
        for (int i = 0; i < self.items.count; i++) {
153
            UIButton *button = [self viewWithTag:i + 1000];
154
            CGFloat centerX = center.x - reviseRadio * cosf(angle + i * supplementaryAngle/(self.items.count - 1));
155
            CGFloat centerY = center.y + reviseRadio * sinf(angle + i * supplementaryAngle/(self.items.count - 1));
156
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
157
        }
158
    } else if (center.x > ScreenWidth - MenuRadio - MenuButtonWH/2) {
159
        // 右上角靠定,90°-180°扇形菜单
160
        CGFloat distanceRight = ScreenWidth - center.x -  MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
161
        // 校正半径
162
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenWidth - distanceRight)/ScreenWidth;
163
        // 角度
164
        CGFloat angle = acosf(distanceRight/reviseRadio);
165
        // 补角
166
        CGFloat supplementaryAngle = M_PI - angle;
167
        
168
        for (int i = 0; i < self.items.count; i++) {
169
            UIButton *button = [self viewWithTag:i + 1000];
170
            CGFloat centerX = center.x - reviseRadio * cosf(i * supplementaryAngle/(self.items.count - 1));
171
            CGFloat centerY = center.y + reviseRadio * sinf(i * supplementaryAngle/(self.items.count - 1));
172
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
173
        }
174
    } else {
175
        // 顶部,半圆形菜单
176
        for (int i = 0; i < self.items.count; i++) {
177
            UIButton *button =[self viewWithTag:i + 1000];
178
            CGFloat centerX = center.x - MenuRadio * cosf(i * M_PI/(self.items.count - 1));
179
            CGFloat centerY = center.y + MenuRadio * sinf(i * M_PI/(self.items.count - 1));
180
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
181
        }
182
    }
183
}
184
185
- (void)showAtRight:(CGPoint)center {
186
    if (center.y < MenuRadio + MenuButtonWH/2) {
187
        // 右上角靠右,90°-180°扇形菜单
188
        CGFloat distanceTop = center.y - MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
189
        // 校正半径
190
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenHeight - distanceTop)/ScreenHeight;
191
        // 角度
192
        CGFloat angle = acosf(distanceTop/reviseRadio);
193
        // 补角
194
        CGFloat supplementaryAngle = M_PI - angle;
195
        
196
        for (int i = 0; i < self.items.count; i++) {
197
            UIButton *button = [self viewWithTag:i + 1000];
198
            CGFloat centerX = center.x - reviseRadio * sinf(angle + i * supplementaryAngle/(self.items.count - 1));
199
            CGFloat centerY = center.y - reviseRadio * cosf(angle + i * supplementaryAngle/(self.items.count - 1));
200
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
201
        }
202
    } else if (center.y > ScreenHeight - MenuRadio - MenuButtonWH/2) {
203
        // 右下角靠右,90°-180°扇形菜单
204
        CGFloat distanceBottom = ScreenHeight - center.y - MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
205
        // 校正半径
206
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenHeight - distanceBottom)/ScreenHeight;
207
        // 角度
208
        CGFloat angle = acosf(distanceBottom/reviseRadio);
209
        // 补角
210
        CGFloat supplementaryAngle = M_PI - angle;
211
        
212
        for (int i = 0; i < self.items.count; i++) {
213
            UIButton *button = [self viewWithTag:i + 1000];
214
            CGFloat centerX = center.x - reviseRadio * sinf(i * supplementaryAngle/(self.items.count - 1));
215
            CGFloat centerY = center.y - reviseRadio * cosf(i * supplementaryAngle/(self.items.count - 1));
216
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
217
        }
218
    } else {
219
        // 右边,半圆形菜单
220
        for (int i = 0; i < self.items.count; i++) {
221
            UIButton *button = [self viewWithTag:i + 1000];
222
            CGFloat centerX = center.x - MenuRadio * sinf(i * M_PI/(self.items.count - 1));
223
            CGFloat centerY = center.y - MenuRadio * cosf(i * M_PI/(self.items.count - 1));
224
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
225
        }
226
    }
227
}
228
229
- (void)showAtBottom:(CGPoint)center {
230
    if (center.x < MenuRadio + MenuButtonWH/2) {
231
        // 左下角靠底,90°-180°扇形菜单
232
        CGFloat distanceLeft = center.x - MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
233
        // 校正半径
234
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenWidth - distanceLeft)/ScreenWidth;
235
        // 角度
236
        CGFloat angle = acosf(distanceLeft/reviseRadio);
237
        // 补角
238
        CGFloat supplementaryAngle = M_PI - angle;
239
        
240
        for (int i = 0; i < self.items.count; i++) {
241
            UIButton *button = [self viewWithTag:i + 1000];
242
            CGFloat centerX = center.x - reviseRadio * cosf(angle + i * supplementaryAngle/(self.items.count - 1));
243
            CGFloat centerY = center.y - reviseRadio * sinf(angle + i * supplementaryAngle/(self.items.count - 1));
244
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
245
        }
246
    } else if (center.x > ScreenWidth - MenuRadio - MenuButtonWH/2) {
247
        // 右下角靠底,90°-180°扇形菜单
248
        CGFloat distanceRight = ScreenWidth - center.x - MenuButtonWH/2 - (SuspendButtonWH - MenuButtonWH)/2;
249
        // 校正半径
250
        CGFloat reviseRadio = 2 * MenuRadio * (ScreenWidth - distanceRight)/ScreenWidth;
251
        // 角度
252
        CGFloat angle = acosf(distanceRight/reviseRadio);
253
        // 补角
254
        CGFloat supplementaryAngle = M_PI - angle;
255
        
256
        for (int i = 0; i < self.items.count; i++) {
257
            UIButton *button = [self viewWithTag:i + 1000];
258
            CGFloat centerX = center.x - reviseRadio * cosf(i * supplementaryAngle/(self.items.count - 1));
259
            CGFloat centerY = center.y - reviseRadio * sinf(i * supplementaryAngle/(self.items.count - 1));
260
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
261
        }
262
    } else {
263
        // 底部,半圆形菜单
264
        for (int i = 0; i < self.items.count; i++) {
265
            UIButton *button = [self viewWithTag:i + 1000];
266
            CGFloat centerX = center.x - MenuRadio * cosf(i * M_PI/(self.items.count - 1));
267
            CGFloat centerY = center.y - MenuRadio * sinf(i * M_PI/(self.items.count - 1));
268
            [self showAnimation:button destination:CGPointMake(centerX, centerY) index:i];
269
        }
270
    }
271
}
272
273
- (void)showAnimation:(UIButton *)button
274
          destination:(CGPoint)position
275
                index:(int)index {
276
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.05 * index * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
277
        [UIView animateWithDuration:0.1 animations:^{
278
            button.frame = CGRectMake(0, 0, MenuButtonWH, MenuButtonWH);
279
            button.center = position;
280
        }];
281
    });
282
}
283
284
- (void)hide {
285
    dispatch_async(dispatch_get_main_queue(), ^{
286
        [[IpuSuspendButton sharedButton] performAnimation:^{
287
            
288
        }];
289
        for (int i = 0; i < self.items.count; i++) {
290
            UIButton *button = [self viewWithTag:i + 1000];
291
            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * i * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
292
                [UIView animateWithDuration:0.1 animations:^{
293
                    button.frame = CGRectMake(0, 0, 1, 1);
294
                    button.center = self.position;
295
                } completion:^(BOOL finished) {
296
                    if (finished && i == self.items.count - 1) {
297
                        [self removeFromSuperview];
298
                    }
299
                }];
300
            });
301
        }
302
    });
303
}
304
305
- (void)updateButtonsCenter:(CGPoint)center {
306
    dispatch_async(dispatch_get_main_queue(), ^{
307
        for (int i = 0; i < self.items.count; i++) {
308
            UIButton *button = [self viewWithTag:i + 1000];
309
            button.center = center;
310
        }
311
    });
312
}
313
314
- (void)tap:(UITapGestureRecognizer *)tapG {
315
    [self hide];
316
}
317
318
- (void)menuButtonClicked:(UIButton *)button {
319
    [self hide];
320
    
321
    IpuSuspendEventItem *item = self.items[button.tag - 1000];
322
    
323
    id obj = item.target;
324
    SEL action = item.action;
325
    IMP imp = [obj methodForSelector:action];
326
    void (*func)(id, SEL) = (void *)imp;
327
    func(obj, action);
328
}
329
330
@end

+ 0 - 21
display-center/display-center/SuspendButton/UIButton+SuspendAddition.h

@ -1,21 +0,0 @@
1
//
2
//  UIButton+SuspendAddition.h
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/9.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import <UIKit/UIKit.h>
10
11
NS_ASSUME_NONNULL_BEGIN
12
13
@class IpuSuspendEventItem;
14
15
@interface UIButton (SuspendAddition)
16
17
@property (nonatomic, strong) IpuSuspendEventItem *eventItem;
18
19
@end
20
21
NS_ASSUME_NONNULL_END

+ 0 - 26
display-center/display-center/SuspendButton/UIButton+SuspendAddition.m

@ -1,26 +0,0 @@
1
//
2
//  UIButton+SuspendAddition.m
3
//  ShareDemo
4
//
5
//  Created by 秋林 on 2018/10/9.
6
//  Copyright © 2018 Asiainfo. All rights reserved.
7
//
8
9
#import "UIButton+SuspendAddition.h"
10
11
#import <objc/runtime.h>
12
13
static char *EventItemKey = "EventItemKey";
14
15
@implementation UIButton (SuspendAddition)
16
17
- (void)setEventItem:(IpuSuspendEventItem *)eventItem {
18
    objc_setAssociatedObject(self, EventItemKey, eventItem, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
19
}
20
21
- (IpuSuspendEventItem *)eventItem {
22
    return objc_getAssociatedObject(self, EventItemKey);
23
}
24
25
26
@end

+ 8 - 16
display-center/display-center/ViewController.m

@ -12,16 +12,14 @@
12 12
#import <React/RCTBridge.h>
13 13
14 14
#import <IpuRNKit/IpuRNManager.h>
15
16
#import "IpuSuspendButton.h"
17
#import "IpuSuspendEventItem.h"
15
#import <WadeMobile/IPUDragButton.h>
18 16
19 17
#import <IpuRNKit/IpuRNViewControllerUtil.h>
20 18
#import <IpuRNKit/IpuRNBaseViewController.h>
21 19
22 20
@interface ViewController ()
23 21
24
@property (nonatomic, strong) IpuSuspendButton *button;
22
@property(nonatomic,strong)IPUDragButton *dragButton;
25 23
26 24
@end
27 25
@ -30,26 +28,20 @@
30 28
- (void)viewDidLoad {
31 29
    [super viewDidLoad];
32 30
    
33
    IpuSuspendButton *button = [IpuSuspendButton sharedButton];
34
    self.button = button;
35
    [[UIApplication sharedApplication].delegate.window addSubview:button];
36
    IpuSuspendEventItem *item = [IpuSuspendEventItem suspendEventItemWithImageName:@"1"
37
                                                                             title:@""
38
                                                                            target:self
39
                                                                            action:@selector(back)];
40
    [button addEventItem:item];
31
    self.dragButton = [IPUDragButton sharedButton];
32
    [self.dragButton addTarget:self action:@selector(back) forControlEvents:UIControlEventTouchUpInside];
33
    [self.view addSubview:self.dragButton];
41 34
    
42 35
    //    [IpuRNManager updateRNResource];
43
    
44
    
45 36
}
46 37
47 38
- (void)viewDidAppear:(BOOL)animated {
48 39
    [super viewDidAppear:animated];
49
    
50
    [[UIApplication sharedApplication].delegate.window bringSubviewToFront:self.button];
51 40
}
52 41
42
/*
43
 悬浮按钮返回事件
44
 */
53 45
- (void)back {
54 46
    UIViewController *viewController = [IpuRNViewControllerUtil getCurrentViewController];
55 47
    

android-share - Nuosi Git Service

ipu的trunk版的android工程和服务端工程。

liuyf23 4b2cbbef0e @修复:冲突处理 2 years ago
..
app 4b2cbbef0e @修复:冲突处理 2 years ago
gradle fba78db9f2 超级客户端使用IPU框架4.0 3 years ago
build.gradle fba78db9f2 超级客户端使用IPU框架4.0 3 years ago
config.gradle fba78db9f2 超级客户端使用IPU框架4.0 3 years ago
gradle.properties fba78db9f2 超级客户端使用IPU框架4.0 3 years ago
local.properties 3b751fd7a7 迁出ipu-mobile-ui,ipu-plugin-basic工程;迁入keep-live,show-client,show-server,ipu-sdk-demo,ipu-push-test,super-client工程; 3 years ago
settings.gradle fba78db9f2 超级客户端使用IPU框架4.0 3 years ago