Commit aa722845b908ed9516f3d16692261e2382f5e02f
Exists in
newLive
Merge branch 'newLive' of http://git.shunzhi.net/iosgroup/newlive into newLive
# Conflicts: # YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj # YouerLiveVideo/YouerLiveVideo.xcodeproj/project.xcworkspace/xcuserdata/jun.xcuserdatad/UserInterfaceState.xcuserstate
Showing
17 changed files
with
2193 additions
and
24 deletions
Show diff stats
YouerLiveVideo/YouerLiveVideo.xcodeproj/project.pbxproj
@@ -15,6 +15,7 @@ | @@ -15,6 +15,7 @@ | ||
15 | 5904FC531ECA8BB500E631FF /* MicroCourse.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5904FC521ECA8BB500E631FF /* MicroCourse.storyboard */; }; | 15 | 5904FC531ECA8BB500E631FF /* MicroCourse.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5904FC521ECA8BB500E631FF /* MicroCourse.storyboard */; }; |
16 | 5904FC551ECA8BCB00E631FF /* HomePage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5904FC541ECA8BCB00E631FF /* HomePage.storyboard */; }; | 16 | 5904FC551ECA8BCB00E631FF /* HomePage.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5904FC541ECA8BCB00E631FF /* HomePage.storyboard */; }; |
17 | 5904FC611ECA930D00E631FF /* MViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5904FC601ECA930D00E631FF /* MViewController.swift */; }; | 17 | 5904FC611ECA930D00E631FF /* MViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5904FC601ECA930D00E631FF /* MViewController.swift */; }; |
18 | + 595071031ED02C140056E078 /* ExcellentTVViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 595071021ED02C140056E078 /* ExcellentTVViewController.swift */; }; | ||
18 | 5960263B1DD94D3100C6B5E8 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5960263A1DD94D3100C6B5E8 /* libsqlite3.tbd */; }; | 19 | 5960263B1DD94D3100C6B5E8 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5960263A1DD94D3100C6B5E8 /* libsqlite3.tbd */; }; |
19 | 5960263D1DD94D5E00C6B5E8 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5960263C1DD94D5E00C6B5E8 /* libc++.tbd */; }; | 20 | 5960263D1DD94D5E00C6B5E8 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5960263C1DD94D5E00C6B5E8 /* libc++.tbd */; }; |
20 | 5960263F1DD94D7D00C6B5E8 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5960263E1DD94D7D00C6B5E8 /* ImageIO.framework */; }; | 21 | 5960263F1DD94D7D00C6B5E8 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5960263E1DD94D7D00C6B5E8 /* ImageIO.framework */; }; |
@@ -24,6 +25,10 @@ | @@ -24,6 +25,10 @@ | ||
24 | 596026501DDD469200C6B5E8 /* RiverRunCommentManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5960264C1DDD469200C6B5E8 /* RiverRunCommentManager.m */; }; | 25 | 596026501DDD469200C6B5E8 /* RiverRunCommentManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 5960264C1DDD469200C6B5E8 /* RiverRunCommentManager.m */; }; |
25 | 596026511DDD469200C6B5E8 /* RiverRunCommentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 5960264E1DDD469200C6B5E8 /* RiverRunCommentUtil.m */; }; | 26 | 596026511DDD469200C6B5E8 /* RiverRunCommentUtil.m in Sources */ = {isa = PBXBuildFile; fileRef = 5960264E1DDD469200C6B5E8 /* RiverRunCommentUtil.m */; }; |
26 | 597185B51ECA990C00D7F478 /* Resource.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 597185B41ECA990C00D7F478 /* Resource.storyboard */; }; | 27 | 597185B51ECA990C00D7F478 /* Resource.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 597185B41ECA990C00D7F478 /* Resource.storyboard */; }; |
28 | + 598939491ED3CFD8005DA462 /* UserEditViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 598939481ED3CFD8005DA462 /* UserEditViewController.swift */; }; | ||
29 | + 5989394B1ED3CFF4005DA462 /* AppSettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5989394A1ED3CFF4005DA462 /* AppSettingViewController.swift */; }; | ||
30 | + 5989394D1ED4016D005DA462 /* HistoryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5989394C1ED4016D005DA462 /* HistoryViewController.swift */; }; | ||
31 | + 598939501ED41C44005DA462 /* ChangePassWordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5989394F1ED41C44005DA462 /* ChangePassWordViewController.swift */; }; | ||
27 | 598A0E531E51941300273AB8 /* libNIMSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E4D1E51941300273AB8 /* libNIMSDK.a */; }; | 32 | 598A0E531E51941300273AB8 /* libNIMSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E4D1E51941300273AB8 /* libNIMSDK.a */; }; |
28 | 598A0E541E51941300273AB8 /* libaacplus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E4F1E51941300273AB8 /* libaacplus.a */; }; | 33 | 598A0E541E51941300273AB8 /* libaacplus.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E4F1E51941300273AB8 /* libaacplus.a */; }; |
29 | 598A0E551E51941300273AB8 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E501E51941300273AB8 /* libcrypto.a */; }; | 34 | 598A0E551E51941300273AB8 /* libcrypto.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 598A0E501E51941300273AB8 /* libcrypto.a */; }; |
@@ -49,6 +54,7 @@ | @@ -49,6 +54,7 @@ | ||
49 | 59AE3DF91ECE8A90003E2C62 /* pinyin.c in Sources */ = {isa = PBXBuildFile; fileRef = 59AE3DF71ECE8A90003E2C62 /* pinyin.c */; }; | 54 | 59AE3DF91ECE8A90003E2C62 /* pinyin.c in Sources */ = {isa = PBXBuildFile; fileRef = 59AE3DF71ECE8A90003E2C62 /* pinyin.c */; }; |
50 | 59AE3DFB1ECECD7D003E2C62 /* LiveInforViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59AE3DFA1ECECD7D003E2C62 /* LiveInforViewController.swift */; }; | 55 | 59AE3DFB1ECECD7D003E2C62 /* LiveInforViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59AE3DFA1ECECD7D003E2C62 /* LiveInforViewController.swift */; }; |
51 | 59AE3DFD1ECED5B1003E2C62 /* MoivePlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59AE3DFC1ECED5B1003E2C62 /* MoivePlayerViewController.swift */; }; | 56 | 59AE3DFD1ECED5B1003E2C62 /* MoivePlayerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59AE3DFC1ECED5B1003E2C62 /* MoivePlayerViewController.swift */; }; |
57 | + 59AE3DFF1ECFDAFD003E2C62 /* TVStationChannelViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59AE3DFE1ECFDAFD003E2C62 /* TVStationChannelViewController.swift */; }; | ||
52 | 59BA13251E25CF2B00540DE0 /* AliyunPlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59BA13241E25CF2B00540DE0 /* AliyunPlayerSDK.framework */; }; | 58 | 59BA13251E25CF2B00540DE0 /* AliyunPlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 59BA13241E25CF2B00540DE0 /* AliyunPlayerSDK.framework */; }; |
53 | 59BA13271E25CF4B00540DE0 /* AliyunPlayerSDK.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 59BA13241E25CF2B00540DE0 /* AliyunPlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; | 59 | 59BA13271E25CF4B00540DE0 /* AliyunPlayerSDK.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 59BA13241E25CF2B00540DE0 /* AliyunPlayerSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; |
54 | 59BA13311E25D1C000540DE0 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 59BA13301E25D1C000540DE0 /* Reachability.m */; }; | 60 | 59BA13311E25D1C000540DE0 /* Reachability.m in Sources */ = {isa = PBXBuildFile; fileRef = 59BA13301E25D1C000540DE0 /* Reachability.m */; }; |
@@ -227,6 +233,7 @@ | @@ -227,6 +233,7 @@ | ||
227 | 5904FC521ECA8BB500E631FF /* MicroCourse.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MicroCourse.storyboard; sourceTree = "<group>"; }; | 233 | 5904FC521ECA8BB500E631FF /* MicroCourse.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = MicroCourse.storyboard; sourceTree = "<group>"; }; |
228 | 5904FC541ECA8BCB00E631FF /* HomePage.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = HomePage.storyboard; sourceTree = "<group>"; }; | 234 | 5904FC541ECA8BCB00E631FF /* HomePage.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = HomePage.storyboard; sourceTree = "<group>"; }; |
229 | 5904FC601ECA930D00E631FF /* MViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MViewController.swift; sourceTree = "<group>"; }; | 235 | 5904FC601ECA930D00E631FF /* MViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MViewController.swift; sourceTree = "<group>"; }; |
236 | + 595071021ED02C140056E078 /* ExcellentTVViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExcellentTVViewController.swift; sourceTree = "<group>"; }; | ||
230 | 5960263A1DD94D3100C6B5E8 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; | 237 | 5960263A1DD94D3100C6B5E8 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; |
231 | 5960263C1DD94D5E00C6B5E8 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; | 238 | 5960263C1DD94D5E00C6B5E8 /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; }; |
232 | 5960263E1DD94D7D00C6B5E8 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; | 239 | 5960263E1DD94D7D00C6B5E8 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; |
@@ -239,6 +246,10 @@ | @@ -239,6 +246,10 @@ | ||
239 | 5960264D1DDD469200C6B5E8 /* RiverRunCommentUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RiverRunCommentUtil.h; sourceTree = "<group>"; }; | 246 | 5960264D1DDD469200C6B5E8 /* RiverRunCommentUtil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RiverRunCommentUtil.h; sourceTree = "<group>"; }; |
240 | 5960264E1DDD469200C6B5E8 /* RiverRunCommentUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RiverRunCommentUtil.m; sourceTree = "<group>"; }; | 247 | 5960264E1DDD469200C6B5E8 /* RiverRunCommentUtil.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RiverRunCommentUtil.m; sourceTree = "<group>"; }; |
241 | 597185B41ECA990C00D7F478 /* Resource.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Resource.storyboard; sourceTree = "<group>"; }; | 248 | 597185B41ECA990C00D7F478 /* Resource.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Resource.storyboard; sourceTree = "<group>"; }; |
249 | + 598939481ED3CFD8005DA462 /* UserEditViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserEditViewController.swift; sourceTree = "<group>"; }; | ||
250 | + 5989394A1ED3CFF4005DA462 /* AppSettingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppSettingViewController.swift; sourceTree = "<group>"; }; | ||
251 | + 5989394C1ED4016D005DA462 /* HistoryViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HistoryViewController.swift; sourceTree = "<group>"; }; | ||
252 | + 5989394F1ED41C44005DA462 /* ChangePassWordViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChangePassWordViewController.swift; sourceTree = "<group>"; }; | ||
242 | 598A0E121E51941300273AB8 /* NIMChatroom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroom.h; sourceTree = "<group>"; }; | 253 | 598A0E121E51941300273AB8 /* NIMChatroom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroom.h; sourceTree = "<group>"; }; |
243 | 598A0E131E51941300273AB8 /* NIMChatroomEnterRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroomEnterRequest.h; sourceTree = "<group>"; }; | 254 | 598A0E131E51941300273AB8 /* NIMChatroomEnterRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroomEnterRequest.h; sourceTree = "<group>"; }; |
244 | 598A0E141E51941300273AB8 /* NIMChatroomMember.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroomMember.h; sourceTree = "<group>"; }; | 255 | 598A0E141E51941300273AB8 /* NIMChatroomMember.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMChatroomMember.h; sourceTree = "<group>"; }; |
@@ -341,6 +352,7 @@ | @@ -341,6 +352,7 @@ | ||
341 | 59AE3DF81ECE8A90003E2C62 /* pinyin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pinyin.h; sourceTree = "<group>"; }; | 352 | 59AE3DF81ECE8A90003E2C62 /* pinyin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pinyin.h; sourceTree = "<group>"; }; |
342 | 59AE3DFA1ECECD7D003E2C62 /* LiveInforViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveInforViewController.swift; sourceTree = "<group>"; }; | 353 | 59AE3DFA1ECECD7D003E2C62 /* LiveInforViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LiveInforViewController.swift; sourceTree = "<group>"; }; |
343 | 59AE3DFC1ECED5B1003E2C62 /* MoivePlayerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoivePlayerViewController.swift; sourceTree = "<group>"; }; | 354 | 59AE3DFC1ECED5B1003E2C62 /* MoivePlayerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoivePlayerViewController.swift; sourceTree = "<group>"; }; |
355 | + 59AE3DFE1ECFDAFD003E2C62 /* TVStationChannelViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TVStationChannelViewController.swift; sourceTree = "<group>"; }; | ||
344 | 59BA13241E25CF2B00540DE0 /* AliyunPlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AliyunPlayerSDK.framework; path = YouerLiveVideo/lib/AliyunPlayerSDK.framework; sourceTree = "<group>"; }; | 356 | 59BA13241E25CF2B00540DE0 /* AliyunPlayerSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AliyunPlayerSDK.framework; path = YouerLiveVideo/lib/AliyunPlayerSDK.framework; sourceTree = "<group>"; }; |
345 | 59BA132F1E25D1C000540DE0 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; }; | 357 | 59BA132F1E25D1C000540DE0 /* Reachability.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Reachability.h; sourceTree = "<group>"; }; |
346 | 59BA13301E25D1C000540DE0 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; }; | 358 | 59BA13301E25D1C000540DE0 /* Reachability.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Reachability.m; sourceTree = "<group>"; }; |
@@ -647,6 +659,8 @@ | @@ -647,6 +659,8 @@ | ||
647 | 5904FC4A1ECA8B8C00E631FF /* TVStation.storyboard */, | 659 | 5904FC4A1ECA8B8C00E631FF /* TVStation.storyboard */, |
648 | 59C25B481ECAD643009FF276 /* MoreTVStationViewController.swift */, | 660 | 59C25B481ECAD643009FF276 /* MoreTVStationViewController.swift */, |
649 | 59C25B4A1ECAD84C009FF276 /* TVStationInforViewController.swift */, | 661 | 59C25B4A1ECAD84C009FF276 /* TVStationInforViewController.swift */, |
662 | + 59AE3DFE1ECFDAFD003E2C62 /* TVStationChannelViewController.swift */, | ||
663 | + 595071021ED02C140056E078 /* ExcellentTVViewController.swift */, | ||
650 | ); | 664 | ); |
651 | path = TVStation; | 665 | path = TVStation; |
652 | sourceTree = "<group>"; | 666 | sourceTree = "<group>"; |
@@ -677,6 +691,14 @@ | @@ -677,6 +691,14 @@ | ||
677 | path = lib/DanmakuLib; | 691 | path = lib/DanmakuLib; |
678 | sourceTree = "<group>"; | 692 | sourceTree = "<group>"; |
679 | }; | 693 | }; |
694 | + 5989394E1ED41C31005DA462 /* Setting */ = { | ||
695 | + isa = PBXGroup; | ||
696 | + children = ( | ||
697 | + 5989394F1ED41C44005DA462 /* ChangePassWordViewController.swift */, | ||
698 | + ); | ||
699 | + path = Setting; | ||
700 | + sourceTree = "<group>"; | ||
701 | + }; | ||
680 | 598A0E0F1E51941300273AB8 /* SDK */ = { | 702 | 598A0E0F1E51941300273AB8 /* SDK */ = { |
681 | isa = PBXGroup; | 703 | isa = PBXGroup; |
682 | children = ( | 704 | children = ( |
@@ -1189,6 +1211,10 @@ | @@ -1189,6 +1211,10 @@ | ||
1189 | children = ( | 1211 | children = ( |
1190 | BFBB83D91ECC445D008B404B /* User.storyboard */, | 1212 | BFBB83D91ECC445D008B404B /* User.storyboard */, |
1191 | BFBB83E21ECC445D008B404B /* UserViewController.swift */, | 1213 | BFBB83E21ECC445D008B404B /* UserViewController.swift */, |
1214 | + 598939481ED3CFD8005DA462 /* UserEditViewController.swift */, | ||
1215 | + 5989394A1ED3CFF4005DA462 /* AppSettingViewController.swift */, | ||
1216 | + 5989394C1ED4016D005DA462 /* HistoryViewController.swift */, | ||
1217 | + 5989394E1ED41C31005DA462 /* Setting */, | ||
1192 | BFBB83DA1ECC445D008B404B /* UserCenter */, | 1218 | BFBB83DA1ECC445D008B404B /* UserCenter */, |
1193 | ); | 1219 | ); |
1194 | path = User; | 1220 | path = User; |
@@ -1493,6 +1519,7 @@ | @@ -1493,6 +1519,7 @@ | ||
1493 | BF7B75991E305A6D0011D5C7 /* MJRefreshFooter.m in Sources */, | 1519 | BF7B75991E305A6D0011D5C7 /* MJRefreshFooter.m in Sources */, |
1494 | 59F801571DD2C7AE000A78B0 /* YouerLiveVideo.xcdatamodeld in Sources */, | 1520 | 59F801571DD2C7AE000A78B0 /* YouerLiveVideo.xcdatamodeld in Sources */, |
1495 | BF7722F91ED3C3E900226D44 /* FilterView.swift in Sources */, | 1521 | BF7722F91ED3C3E900226D44 /* FilterView.swift in Sources */, |
1522 | + 595071031ED02C140056E078 /* ExcellentTVViewController.swift in Sources */, | ||
1496 | 59BA13311E25D1C000540DE0 /* Reachability.m in Sources */, | 1523 | 59BA13311E25D1C000540DE0 /* Reachability.m in Sources */, |
1497 | BFBB83EB1ECC445D008B404B /* UserViewController.swift in Sources */, | 1524 | BFBB83EB1ECC445D008B404B /* UserViewController.swift in Sources */, |
1498 | 5904FC4E1ECA8B8C00E631FF /* ResourceViewController.swift in Sources */, | 1525 | 5904FC4E1ECA8B8C00E631FF /* ResourceViewController.swift in Sources */, |
@@ -1520,13 +1547,16 @@ | @@ -1520,13 +1547,16 @@ | ||
1520 | BF7B759C1E305A6D0011D5C7 /* MJRefreshAutoNormalFooter.m in Sources */, | 1547 | BF7B759C1E305A6D0011D5C7 /* MJRefreshAutoNormalFooter.m in Sources */, |
1521 | 5904FC4F1ECA8B8C00E631FF /* SearchTVStationListViewController.swift in Sources */, | 1548 | 5904FC4F1ECA8B8C00E631FF /* SearchTVStationListViewController.swift in Sources */, |
1522 | BFC076781E3445F3008BAC79 /* DownLoad.swift in Sources */, | 1549 | BFC076781E3445F3008BAC79 /* DownLoad.swift in Sources */, |
1550 | + 59AE3DFF1ECFDAFD003E2C62 /* TVStationChannelViewController.swift in Sources */, | ||
1523 | BF25DFE71DDAA36A003EC0C1 /* MultipartFormData.swift in Sources */, | 1551 | BF25DFE71DDAA36A003EC0C1 /* MultipartFormData.swift in Sources */, |
1552 | + 5989394D1ED4016D005DA462 /* HistoryViewController.swift in Sources */, | ||
1524 | BF25DFF71DDAA36A003EC0C1 /* MKAnnotationView+WebCache.m in Sources */, | 1553 | BF25DFF71DDAA36A003EC0C1 /* MKAnnotationView+WebCache.m in Sources */, |
1525 | BF25DFFB1DDAA36A003EC0C1 /* SDImageCacheConfig.m in Sources */, | 1554 | BF25DFFB1DDAA36A003EC0C1 /* SDImageCacheConfig.m in Sources */, |
1526 | 5904FC4D1ECA8B8C00E631FF /* MicroCourseViewController.swift in Sources */, | 1555 | 5904FC4D1ECA8B8C00E631FF /* MicroCourseViewController.swift in Sources */, |
1527 | BFBB83E61ECC445D008B404B /* LoginViewController.swift in Sources */, | 1556 | BFBB83E61ECC445D008B404B /* LoginViewController.swift in Sources */, |
1528 | BF25DFE21DDAA36A003EC0C1 /* AFError.swift in Sources */, | 1557 | BF25DFE21DDAA36A003EC0C1 /* AFError.swift in Sources */, |
1529 | BF25DFEF1DDAA36A003EC0C1 /* ServerTrustPolicy.swift in Sources */, | 1558 | BF25DFEF1DDAA36A003EC0C1 /* ServerTrustPolicy.swift in Sources */, |
1559 | + 598939491ED3CFD8005DA462 /* UserEditViewController.swift in Sources */, | ||
1530 | BF25E0061DDAA36A003EC0C1 /* UIImageView+HighlightedWebCache.m in Sources */, | 1560 | BF25E0061DDAA36A003EC0C1 /* UIImageView+HighlightedWebCache.m in Sources */, |
1531 | BF25DFE41DDAA36A003EC0C1 /* DispatchQueue+Alamofire.swift in Sources */, | 1561 | BF25DFE41DDAA36A003EC0C1 /* DispatchQueue+Alamofire.swift in Sources */, |
1532 | BF25DFE81DDAA36A003EC0C1 /* NetworkReachabilityManager.swift in Sources */, | 1562 | BF25DFE81DDAA36A003EC0C1 /* NetworkReachabilityManager.swift in Sources */, |
@@ -1542,6 +1572,8 @@ | @@ -1542,6 +1572,8 @@ | ||
1542 | BF25DFF81DDAA36A003EC0C1 /* NSData+ImageContentType.m in Sources */, | 1572 | BF25DFF81DDAA36A003EC0C1 /* NSData+ImageContentType.m in Sources */, |
1543 | BF25E0151DDAAF73003EC0C1 /* SVIndefiniteAnimatedView.m in Sources */, | 1573 | BF25E0151DDAAF73003EC0C1 /* SVIndefiniteAnimatedView.m in Sources */, |
1544 | BFF5F4921DD5B7CA00D33B89 /* SwiftyJSON.swift in Sources */, | 1574 | BFF5F4921DD5B7CA00D33B89 /* SwiftyJSON.swift in Sources */, |
1575 | + 5989394B1ED3CFF4005DA462 /* AppSettingViewController.swift in Sources */, | ||
1576 | + 598939501ED41C44005DA462 /* ChangePassWordViewController.swift in Sources */, | ||
1545 | BF682F1E1ECE8772007632CA /* MainHomeTableViewController.swift in Sources */, | 1577 | BF682F1E1ECE8772007632CA /* MainHomeTableViewController.swift in Sources */, |
1546 | BF7B75A91E305A6D0011D5C7 /* UIView+MJExtension.m in Sources */, | 1578 | BF7B75A91E305A6D0011D5C7 /* UIView+MJExtension.m in Sources */, |
1547 | BF25DFEE1DDAA36A003EC0C1 /* Result.swift in Sources */, | 1579 | BF25DFEE1DDAA36A003EC0C1 /* Result.swift in Sources */, |
YouerLiveVideo/YouerLiveVideo.xcodeproj/xcuserdata/Manger.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -186,12 +186,12 @@ | @@ -186,12 +186,12 @@ | ||
186 | ignoreCount = "0" | 186 | ignoreCount = "0" |
187 | continueAfterRunningActions = "No" | 187 | continueAfterRunningActions = "No" |
188 | filePath = "YouerLiveVideo/controllers/TVStation/TVStationViewController.swift" | 188 | filePath = "YouerLiveVideo/controllers/TVStation/TVStationViewController.swift" |
189 | - timestampString = "516614269.896305" | 189 | + timestampString = "516957417.700522" |
190 | startingColumnNumber = "9223372036854775807" | 190 | startingColumnNumber = "9223372036854775807" |
191 | endingColumnNumber = "9223372036854775807" | 191 | endingColumnNumber = "9223372036854775807" |
192 | - startingLineNumber = "60" | ||
193 | - endingLineNumber = "60" | ||
194 | - landmarkName = "tableView(_:viewForHeaderInSection:)" | 192 | + startingLineNumber = "61" |
193 | + endingLineNumber = "61" | ||
194 | + landmarkName = "getDataList()" | ||
195 | landmarkType = "7"> | 195 | landmarkType = "7"> |
196 | </BreakpointContent> | 196 | </BreakpointContent> |
197 | </BreakpointProxy> | 197 | </BreakpointProxy> |
@@ -201,13 +201,13 @@ | @@ -201,13 +201,13 @@ | ||
201 | shouldBeEnabled = "Yes" | 201 | shouldBeEnabled = "Yes" |
202 | ignoreCount = "0" | 202 | ignoreCount = "0" |
203 | continueAfterRunningActions = "No" | 203 | continueAfterRunningActions = "No" |
204 | - filePath = "YouerLiveVideo/controllers/TVStation/TVStationViewController.swift" | ||
205 | - timestampString = "516616602.588152" | 204 | + filePath = "YouerLiveVideo/controllers/MViewController.swift" |
205 | + timestampString = "516618727.367999" | ||
206 | startingColumnNumber = "9223372036854775807" | 206 | startingColumnNumber = "9223372036854775807" |
207 | endingColumnNumber = "9223372036854775807" | 207 | endingColumnNumber = "9223372036854775807" |
208 | - startingLineNumber = "21" | ||
209 | - endingLineNumber = "21" | ||
210 | - landmarkName = "pushToSeachViewController()" | 208 | + startingLineNumber = "41" |
209 | + endingLineNumber = "41" | ||
210 | + landmarkName = "setupOneChildViewController(_:image:selectedImage:controller:isAddNVC:)" | ||
211 | landmarkType = "7"> | 211 | landmarkType = "7"> |
212 | </BreakpointContent> | 212 | </BreakpointContent> |
213 | </BreakpointProxy> | 213 | </BreakpointProxy> |
@@ -217,13 +217,61 @@ | @@ -217,13 +217,61 @@ | ||
217 | shouldBeEnabled = "Yes" | 217 | shouldBeEnabled = "Yes" |
218 | ignoreCount = "0" | 218 | ignoreCount = "0" |
219 | continueAfterRunningActions = "No" | 219 | continueAfterRunningActions = "No" |
220 | - filePath = "YouerLiveVideo/controllers/MViewController.swift" | ||
221 | - timestampString = "516618727.367999" | 220 | + filePath = "YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift" |
221 | + timestampString = "517137841.643491" | ||
222 | startingColumnNumber = "9223372036854775807" | 222 | startingColumnNumber = "9223372036854775807" |
223 | endingColumnNumber = "9223372036854775807" | 223 | endingColumnNumber = "9223372036854775807" |
224 | - startingLineNumber = "41" | ||
225 | - endingLineNumber = "41" | ||
226 | - landmarkName = "setupOneChildViewController(_:image:selectedImage:controller:isAddNVC:)" | 224 | + startingLineNumber = "230" |
225 | + endingLineNumber = "230" | ||
226 | + landmarkName = "awakeFromNib()" | ||
227 | + landmarkType = "7"> | ||
228 | + <Locations> | ||
229 | + <Location | ||
230 | + shouldBeEnabled = "Yes" | ||
231 | + ignoreCount = "0" | ||
232 | + continueAfterRunningActions = "No" | ||
233 | + symbolName = "YouerLiveVideo.ExcellentTVViewCell.awakeFromNib () -> ()" | ||
234 | + moduleName = "YouerLiveVideo" | ||
235 | + usesParentBreakpointCondition = "Yes" | ||
236 | + urlString = "file:///Users/Manger/Desktop/NewLive/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift" | ||
237 | + timestampString = "517137869.875423" | ||
238 | + startingColumnNumber = "9223372036854775807" | ||
239 | + endingColumnNumber = "9223372036854775807" | ||
240 | + startingLineNumber = "230" | ||
241 | + endingLineNumber = "230" | ||
242 | + offsetFromSymbolStart = "15"> | ||
243 | + </Location> | ||
244 | + <Location | ||
245 | + shouldBeEnabled = "Yes" | ||
246 | + ignoreCount = "0" | ||
247 | + continueAfterRunningActions = "No" | ||
248 | + symbolName = "YouerLiveVideo.ExcellentTVViewCell.(awakeFromNib () -> ()).(closure #1)" | ||
249 | + moduleName = "YouerLiveVideo" | ||
250 | + usesParentBreakpointCondition = "Yes" | ||
251 | + urlString = "file:///Users/Manger/Desktop/NewLive/YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift" | ||
252 | + timestampString = "517137869.877211" | ||
253 | + startingColumnNumber = "9223372036854775807" | ||
254 | + endingColumnNumber = "9223372036854775807" | ||
255 | + startingLineNumber = "231" | ||
256 | + endingLineNumber = "231" | ||
257 | + offsetFromSymbolStart = "62"> | ||
258 | + </Location> | ||
259 | + </Locations> | ||
260 | + </BreakpointContent> | ||
261 | + </BreakpointProxy> | ||
262 | + <BreakpointProxy | ||
263 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
264 | + <BreakpointContent | ||
265 | + shouldBeEnabled = "Yes" | ||
266 | + ignoreCount = "0" | ||
267 | + continueAfterRunningActions = "No" | ||
268 | + filePath = "YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift" | ||
269 | + timestampString = "517137851.595827" | ||
270 | + startingColumnNumber = "9223372036854775807" | ||
271 | + endingColumnNumber = "9223372036854775807" | ||
272 | + startingLineNumber = "206" | ||
273 | + endingLineNumber = "206" | ||
274 | + landmarkName = "collectionView(_:cellForItemAt:)" | ||
227 | landmarkType = "7"> | 275 | landmarkType = "7"> |
228 | </BreakpointContent> | 276 | </BreakpointContent> |
229 | </BreakpointProxy> | 277 | </BreakpointProxy> |
YouerLiveVideo/YouerLiveVideo.xcodeproj/xcuserdata/jun.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -2,4 +2,22 @@ | @@ -2,4 +2,22 @@ | ||
2 | <Bucket | 2 | <Bucket |
3 | type = "1" | 3 | type = "1" |
4 | version = "2.0"> | 4 | version = "2.0"> |
5 | + <Breakpoints> | ||
6 | + <BreakpointProxy | ||
7 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
8 | + <BreakpointContent | ||
9 | + shouldBeEnabled = "Yes" | ||
10 | + ignoreCount = "0" | ||
11 | + continueAfterRunningActions = "No" | ||
12 | + filePath = "YouerLiveVideo/controllers/User/UserCenter/RegisterViewController.swift" | ||
13 | + timestampString = "516767766.610948" | ||
14 | + startingColumnNumber = "9223372036854775807" | ||
15 | + endingColumnNumber = "9223372036854775807" | ||
16 | + startingLineNumber = "85" | ||
17 | + endingLineNumber = "85" | ||
18 | + landmarkName = "registerBtnAction(_:)" | ||
19 | + landmarkType = "7"> | ||
20 | + </BreakpointContent> | ||
21 | + </BreakpointProxy> | ||
22 | + </Breakpoints> | ||
5 | </Bucket> | 23 | </Bucket> |
YouerLiveVideo/YouerLiveVideo/Assets.xcassets/arrow.imageset/Contents.json
0 → 100644
@@ -0,0 +1,21 @@ | @@ -0,0 +1,21 @@ | ||
1 | +{ | ||
2 | + "images" : [ | ||
3 | + { | ||
4 | + "idiom" : "universal", | ||
5 | + "scale" : "1x" | ||
6 | + }, | ||
7 | + { | ||
8 | + "idiom" : "universal", | ||
9 | + "filename" : "收拢.png", | ||
10 | + "scale" : "2x" | ||
11 | + }, | ||
12 | + { | ||
13 | + "idiom" : "universal", | ||
14 | + "scale" : "3x" | ||
15 | + } | ||
16 | + ], | ||
17 | + "info" : { | ||
18 | + "version" : 1, | ||
19 | + "author" : "xcode" | ||
20 | + } | ||
21 | +} | ||
0 | \ No newline at end of file | 22 | \ No newline at end of file |
3.05 KB
YouerLiveVideo/YouerLiveVideo/Base.lproj/Main.storyboard
1 | -<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | -<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="15G1217" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="fhe-aI-EYq"> | 1 | +<?xml version="1.0" encoding="UTF-8"?> |
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16A323" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="fhe-aI-EYq"> | ||
3 | <device id="retina4_7" orientation="portrait"> | 3 | <device id="retina4_7" orientation="portrait"> |
4 | <adaptation id="fullscreen"/> | 4 | <adaptation id="fullscreen"/> |
5 | </device> | 5 | </device> |
@@ -823,13 +823,124 @@ | @@ -823,13 +823,124 @@ | ||
823 | <view key="view" contentMode="scaleToFill" id="gTL-Bi-K7K"> | 823 | <view key="view" contentMode="scaleToFill" id="gTL-Bi-K7K"> |
824 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | 824 | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
825 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 825 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
826 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | 826 | + <subviews> |
827 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="CFz-Ro-N17"> | ||
828 | + <rect key="frame" x="0.0" y="184" width="375" height="434"/> | ||
829 | + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
830 | + <prototypes> | ||
831 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="cell" id="dJF-O6-zOW" customClass="UserCenterHistoryCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
832 | + <rect key="frame" x="0.0" y="28" width="375" height="44"/> | ||
833 | + <autoresizingMask key="autoresizingMask"/> | ||
834 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dJF-O6-zOW" id="3wg-qZ-Ccm"> | ||
835 | + <rect key="frame" x="0.0" y="0.0" width="375" height="44"/> | ||
836 | + <autoresizingMask key="autoresizingMask"/> | ||
837 | + <subviews> | ||
838 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rfw-U6-vsh"> | ||
839 | + <rect key="frame" x="40" y="11" width="42" height="21"/> | ||
840 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
841 | + <nil key="textColor"/> | ||
842 | + <nil key="highlightedColor"/> | ||
843 | + </label> | ||
844 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZcI-ei-CRK"> | ||
845 | + <rect key="frame" x="40" y="43" width="319" height="1"/> | ||
846 | + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
847 | + <constraints> | ||
848 | + <constraint firstAttribute="height" constant="1" id="x7b-Er-eeL"/> | ||
849 | + </constraints> | ||
850 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
851 | + <nil key="textColor"/> | ||
852 | + <nil key="highlightedColor"/> | ||
853 | + </label> | ||
854 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="arrow" translatesAutoresizingMaskIntoConstraints="NO" id="95T-hp-hYn"> | ||
855 | + <rect key="frame" x="350" y="14.5" width="9" height="15"/> | ||
856 | + <constraints> | ||
857 | + <constraint firstAttribute="width" secondItem="95T-hp-hYn" secondAttribute="height" multiplier="3:5" id="DmD-vc-Zm5"/> | ||
858 | + <constraint firstAttribute="height" constant="15" id="N6u-lf-nHQ"/> | ||
859 | + </constraints> | ||
860 | + </imageView> | ||
861 | + </subviews> | ||
862 | + <constraints> | ||
863 | + <constraint firstItem="ZcI-ei-CRK" firstAttribute="leading" secondItem="Rfw-U6-vsh" secondAttribute="leading" id="Nzi-ts-Hez"/> | ||
864 | + <constraint firstAttribute="trailing" secondItem="ZcI-ei-CRK" secondAttribute="trailing" constant="16" id="d70-H8-SxF"/> | ||
865 | + <constraint firstItem="95T-hp-hYn" firstAttribute="centerY" secondItem="3wg-qZ-Ccm" secondAttribute="centerY" id="reE-Cq-jwx"/> | ||
866 | + <constraint firstItem="Rfw-U6-vsh" firstAttribute="leading" secondItem="3wg-qZ-Ccm" secondAttribute="leading" constant="40" id="sXN-8Z-QZq"/> | ||
867 | + <constraint firstAttribute="trailing" secondItem="95T-hp-hYn" secondAttribute="trailing" constant="16" id="wJE-Ch-hxD"/> | ||
868 | + <constraint firstItem="Rfw-U6-vsh" firstAttribute="centerY" secondItem="3wg-qZ-Ccm" secondAttribute="centerY" id="z32-br-U2n"/> | ||
869 | + <constraint firstAttribute="bottom" secondItem="ZcI-ei-CRK" secondAttribute="bottom" id="zAy-lk-L8V"/> | ||
870 | + </constraints> | ||
871 | + </tableViewCellContentView> | ||
872 | + <connections> | ||
873 | + <outlet property="titleName" destination="Rfw-U6-vsh" id="Dkz-aT-h6h"/> | ||
874 | + </connections> | ||
875 | + </tableViewCell> | ||
876 | + </prototypes> | ||
877 | + <connections> | ||
878 | + <outlet property="dataSource" destination="BZx-0y-T5Q" id="UvW-WJ-LpD"/> | ||
879 | + <outlet property="delegate" destination="BZx-0y-T5Q" id="r0G-v1-ycw"/> | ||
880 | + </connections> | ||
881 | + </tableView> | ||
882 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bvl-OP-Mho"> | ||
883 | + <rect key="frame" x="0.0" y="79" width="375" height="90"/> | ||
884 | + <subviews> | ||
885 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="defphoto.png" translatesAutoresizingMaskIntoConstraints="NO" id="brI-5l-hmz"> | ||
886 | + <rect key="frame" x="16" y="20" width="47" height="50"/> | ||
887 | + <constraints> | ||
888 | + <constraint firstAttribute="height" constant="50" id="VpN-jf-Kgx"/> | ||
889 | + <constraint firstAttribute="width" secondItem="brI-5l-hmz" secondAttribute="height" multiplier="17:18" id="lia-o4-ohd"/> | ||
890 | + </constraints> | ||
891 | + </imageView> | ||
892 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nqw-kl-w72"> | ||
893 | + <rect key="frame" x="79" y="35" width="42" height="21"/> | ||
894 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
895 | + <nil key="textColor"/> | ||
896 | + <nil key="highlightedColor"/> | ||
897 | + </label> | ||
898 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="yK0-QJ-bRM"> | ||
899 | + <rect key="frame" x="337" y="30" width="30" height="30"/> | ||
900 | + <constraints> | ||
901 | + <constraint firstAttribute="width" secondItem="yK0-QJ-bRM" secondAttribute="height" multiplier="1:1" id="3YU-P4-ctC"/> | ||
902 | + <constraint firstAttribute="height" constant="30" id="HhD-eg-tVW"/> | ||
903 | + </constraints> | ||
904 | + <state key="normal" image="arrow"/> | ||
905 | + <connections> | ||
906 | + <action selector="userEditClcik:" destination="BZx-0y-T5Q" eventType="touchUpInside" id="KOe-u4-Y7x"/> | ||
907 | + </connections> | ||
908 | + </button> | ||
909 | + </subviews> | ||
910 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
911 | + <constraints> | ||
912 | + <constraint firstItem="yK0-QJ-bRM" firstAttribute="centerY" secondItem="bvl-OP-Mho" secondAttribute="centerY" id="8rD-kC-wG0"/> | ||
913 | + <constraint firstAttribute="height" constant="90" id="OgG-Ww-2w0"/> | ||
914 | + <constraint firstItem="brI-5l-hmz" firstAttribute="centerY" secondItem="bvl-OP-Mho" secondAttribute="centerY" id="YFV-yt-DAA"/> | ||
915 | + <constraint firstAttribute="trailing" secondItem="yK0-QJ-bRM" secondAttribute="trailing" constant="8" id="hGo-7T-muV"/> | ||
916 | + <constraint firstItem="Nqw-kl-w72" firstAttribute="centerY" secondItem="bvl-OP-Mho" secondAttribute="centerY" id="lw6-Jl-KC5"/> | ||
917 | + <constraint firstItem="Nqw-kl-w72" firstAttribute="leading" secondItem="brI-5l-hmz" secondAttribute="trailing" constant="16" id="unR-ks-0nT"/> | ||
918 | + <constraint firstItem="yK0-QJ-bRM" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="Nqw-kl-w72" secondAttribute="trailing" constant="8" id="vhw-0q-WYU"/> | ||
919 | + <constraint firstItem="brI-5l-hmz" firstAttribute="leading" secondItem="bvl-OP-Mho" secondAttribute="leading" constant="16" id="xXW-xf-5Ra"/> | ||
920 | + </constraints> | ||
921 | + </view> | ||
922 | + </subviews> | ||
923 | + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
924 | + <constraints> | ||
925 | + <constraint firstAttribute="trailing" secondItem="bvl-OP-Mho" secondAttribute="trailing" id="98d-su-BYc"/> | ||
926 | + <constraint firstItem="CFz-Ro-N17" firstAttribute="top" secondItem="bvl-OP-Mho" secondAttribute="bottom" constant="15" id="Bio-5s-xo1"/> | ||
927 | + <constraint firstItem="bvl-OP-Mho" firstAttribute="leading" secondItem="gTL-Bi-K7K" secondAttribute="leading" id="FNR-Mg-Bk7"/> | ||
928 | + <constraint firstAttribute="trailing" secondItem="CFz-Ro-N17" secondAttribute="trailing" id="G3m-0A-QJE"/> | ||
929 | + <constraint firstItem="04n-Q1-RCL" firstAttribute="top" secondItem="CFz-Ro-N17" secondAttribute="bottom" id="L1W-bl-RTD"/> | ||
930 | + <constraint firstItem="CFz-Ro-N17" firstAttribute="leading" secondItem="gTL-Bi-K7K" secondAttribute="leading" id="NYQ-VV-dtX"/> | ||
931 | + <constraint firstItem="bvl-OP-Mho" firstAttribute="top" secondItem="Kng-4W-y6v" secondAttribute="bottom" constant="15" id="Ylp-Rg-JJV"/> | ||
932 | + </constraints> | ||
827 | </view> | 933 | </view> |
828 | <navigationItem key="navigationItem" title="用户" id="KBV-ql-Taf"/> | 934 | <navigationItem key="navigationItem" title="用户" id="KBV-ql-Taf"/> |
935 | + <connections> | ||
936 | + <outlet property="historyList" destination="CFz-Ro-N17" id="XkV-zV-Rj9"/> | ||
937 | + <outlet property="userName" destination="Nqw-kl-w72" id="3HY-fb-c91"/> | ||
938 | + <outlet property="userPhoto" destination="brI-5l-hmz" id="XG3-nG-OZG"/> | ||
939 | + </connections> | ||
829 | </viewController> | 940 | </viewController> |
830 | <placeholder placeholderIdentifier="IBFirstResponder" id="yJD-YG-4bQ" userLabel="First Responder" sceneMemberID="firstResponder"/> | 941 | <placeholder placeholderIdentifier="IBFirstResponder" id="yJD-YG-4bQ" userLabel="First Responder" sceneMemberID="firstResponder"/> |
831 | </objects> | 942 | </objects> |
832 | - <point key="canvasLocation" x="1206" y="2113"/> | 943 | + <point key="canvasLocation" x="1205.5999999999999" y="2112.5937031484259"/> |
833 | </scene> | 944 | </scene> |
834 | <!--用户--> | 945 | <!--用户--> |
835 | <scene sceneID="LVY-SG-ceP"> | 946 | <scene sceneID="LVY-SG-ceP"> |
@@ -1182,7 +1293,7 @@ | @@ -1182,7 +1293,7 @@ | ||
1182 | <rect key="frame" x="0.0" y="28" width="375" height="178"/> | 1293 | <rect key="frame" x="0.0" y="28" width="375" height="178"/> |
1183 | <autoresizingMask key="autoresizingMask"/> | 1294 | <autoresizingMask key="autoresizingMask"/> |
1184 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8PR-k0-hwX" id="Bb0-oI-ccB"> | 1295 | <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="8PR-k0-hwX" id="Bb0-oI-ccB"> |
1185 | - <rect key="frame" x="0.0" y="0.0" width="375" height="178"/> | 1296 | + <rect key="frame" x="0.0" y="0.0" width="375" height="177"/> |
1186 | <autoresizingMask key="autoresizingMask"/> | 1297 | <autoresizingMask key="autoresizingMask"/> |
1187 | <subviews> | 1298 | <subviews> |
1188 | <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="m0I-jk-Iru"> | 1299 | <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="m0I-jk-Iru"> |
@@ -1518,7 +1629,7 @@ | @@ -1518,7 +1629,7 @@ | ||
1518 | </scene> | 1629 | </scene> |
1519 | </scenes> | 1630 | </scenes> |
1520 | <resources> | 1631 | <resources> |
1521 | - <image name="arrow" width="33" height="33"/> | 1632 | + <image name="arrow" width="7" height="12"/> |
1522 | <image name="default" width="375" height="167"/> | 1633 | <image name="default" width="375" height="167"/> |
1523 | <image name="default_userRoom" width="19" height="17"/> | 1634 | <image name="default_userRoom" width="19" height="17"/> |
1524 | <image name="defphoto.png" width="256" height="256"/> | 1635 | <image name="defphoto.png" width="256" height="256"/> |
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/ExcellentTVViewController.swift
0 → 100644
@@ -0,0 +1,318 @@ | @@ -0,0 +1,318 @@ | ||
1 | +// | ||
2 | +// ExcellentTVViewController.swift | ||
3 | +// YouerLiveVideo | ||
4 | +// | ||
5 | +// Created by 左丞 on 2017/5/20. | ||
6 | +// Copyright © 2017年 左丞. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +import UIKit | ||
10 | +import AVKit | ||
11 | +class ExcellentTVViewController: UIViewController { | ||
12 | + | ||
13 | + @IBOutlet weak var AllTitleView: UIView! | ||
14 | + var isForbidScrollDelegate:Bool = true | ||
15 | + var startOffsetX:CGFloat = 0 | ||
16 | + var TVStationScrollView:UIScrollView!//第一排目录 | ||
17 | + @IBOutlet weak var lunboView: UIView! | ||
18 | + @IBOutlet weak var TVStationClass: UIView! | ||
19 | + @IBOutlet weak var collectionView: UICollectionView! | ||
20 | + var TVStationClasses:[TVSubjectInfor] = [] | ||
21 | + var titleSelectBtn:Int = 0 | ||
22 | + var classSelectBtn:Int = 0 | ||
23 | + override func viewDidLoad() { | ||
24 | + super.viewDidLoad() | ||
25 | + AppDelegate.instance().httpServer.getTelevisionStationCatagory(parameters: nil) { (str, error) in | ||
26 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | ||
27 | + for item in json.contentData().arrayValue{ | ||
28 | + self.TVStationClasses.append(TVSubjectInfor(json: item)) | ||
29 | + } | ||
30 | + self.creatTVStationClassScrollView() | ||
31 | + self.collectionView.reloadData() | ||
32 | + }, failHandler: { (error) in | ||
33 | + | ||
34 | + }) | ||
35 | + } | ||
36 | + // Do any additional setup after loading the view. | ||
37 | + } | ||
38 | + | ||
39 | + override func didReceiveMemoryWarning() { | ||
40 | + super.didReceiveMemoryWarning() | ||
41 | + // Dispose of any resources that can be recreated. | ||
42 | + } | ||
43 | + | ||
44 | + func creatTVStationClassScrollView(){ | ||
45 | + TVStationScrollView = UIScrollView(frame: CGRect(origin: CGPointZero, size: TVStationClass.frame.size)) | ||
46 | + TVStationScrollView.showsHorizontalScrollIndicator = false | ||
47 | + TVStationScrollView.showsVerticalScrollIndicator = false | ||
48 | + TVStationScrollView.bounces = false | ||
49 | + var x:CGFloat = 0 | ||
50 | + for (index,item) in TVStationClasses.enumerated() { | ||
51 | + let TVStationClassScrollView = UIScrollView(frame: CGRect(origin: CGPointZero, size: AllTitleView.frame.size)) | ||
52 | + | ||
53 | + let btn = UIButton(frame: CGRect(x: 0, y: 0, width: 100, height: TVStationClass.frame.size.height)) | ||
54 | + btn.backgroundColor = UIColor.white | ||
55 | + btn.setTitleColor(UIColor.black, for: .normal) | ||
56 | + btn.setTitle(item.name, for: .normal) | ||
57 | + btn.sizeToFit() | ||
58 | + if index != 0{ | ||
59 | + x = TVStationScrollView.viewWithTag(200+index-1)!.frame.maxX | ||
60 | + TVStationClassScrollView.isHidden = true | ||
61 | + }else{ | ||
62 | + x = 0 | ||
63 | + TVStationClassScrollView.isHidden = false | ||
64 | + btn.backgroundColor = UIColor.blue | ||
65 | + btn.setTitleColor(UIColor.white, for: .normal) | ||
66 | + | ||
67 | + } | ||
68 | + btn.frame.origin.x = x | ||
69 | + btn.frame.size = CGSize(width: btn.frame.size.width+20, height: TVStationClass.frame.size.height) | ||
70 | + btn.tag = 200+index | ||
71 | + TVStationScrollView.contentSize = CGSize(width: btn.frame.maxX, height: 0) | ||
72 | + btn.addTarget(self, action: #selector(ExcellentTVViewController.TVStationBtnClick(btn:)), for: .touchUpInside) | ||
73 | + TVStationScrollView.addSubview(btn) | ||
74 | + | ||
75 | + TVStationClassScrollView.showsHorizontalScrollIndicator = false | ||
76 | + TVStationClassScrollView.showsVerticalScrollIndicator = false | ||
77 | + TVStationClassScrollView.bounces = false | ||
78 | + TVStationClassScrollView.tag = 2000+index | ||
79 | + for (ind,it) in item.ch.enumerated() { | ||
80 | + let button = UIButton(frame: CGRect(x: 0, y: 0, width: 100, height: TVStationClass.frame.size.height)) | ||
81 | + button.backgroundColor = UIColor.white | ||
82 | + button.setTitleColor(UIColor.black, for: .normal) | ||
83 | + button.setTitle(it.name, for: .normal) | ||
84 | + button.sizeToFit() | ||
85 | + if ind != 0{ | ||
86 | + x = TVStationClassScrollView.viewWithTag(1000+index*100+ind-1)!.frame.maxX | ||
87 | + }else{ | ||
88 | + x = 0 | ||
89 | + button.backgroundColor = UIColor.blue | ||
90 | + button.setTitleColor(UIColor.white, for: .normal) | ||
91 | + } | ||
92 | + button.frame.origin.x = x | ||
93 | + button.frame.size = CGSize(width: button.frame.size.width+20, height: TVStationClass.frame.size.height) | ||
94 | + button.tag = 1000+index*100+ind | ||
95 | + TVStationClassScrollView.contentSize = CGSize(width: button.frame.maxX, height: 0) | ||
96 | + button.addTarget(self, action: #selector(ExcellentTVViewController.TVStationClassBtnClick(btn:)), for: .touchUpInside) | ||
97 | + TVStationClassScrollView.addSubview(button) | ||
98 | + } | ||
99 | + TVStationClass.addSubview(TVStationClassScrollView) | ||
100 | + } | ||
101 | + AllTitleView.addSubview(TVStationScrollView) | ||
102 | + } | ||
103 | + | ||
104 | + func TVStationBtnClick(btn:UIButton){ | ||
105 | + titleSelectBtn = btn.tag%10 | ||
106 | + classSelectBtn = 0 | ||
107 | + for i in 0..<TVStationClasses.count{ | ||
108 | + let item = AllTitleView.viewWithTag(200+i) as! UIButton | ||
109 | + item.backgroundColor = UIColor.white | ||
110 | + item.setTitleColor(UIColor.black, for: .normal) | ||
111 | + TVStationClass.viewWithTag(2000+i)?.isHidden = true | ||
112 | + } | ||
113 | + btn.setTitleColor(UIColor.white, for: .normal) | ||
114 | + btn.backgroundColor = UIColor.blue | ||
115 | + TVStationClass.viewWithTag(2000+btn.tag%10)?.isHidden = false | ||
116 | + collectionView.reloadData() | ||
117 | + } | ||
118 | + | ||
119 | + func TVStationClassBtnClick(btn:UIButton){ | ||
120 | + classSelectBtn = btn.tag%10 | ||
121 | + let index = btn.tag%1000/100 | ||
122 | + isForbidScrollDelegate = true | ||
123 | + collectionView.scrollToItem(at: IndexPath(item: classSelectBtn, section: 0), at: .centeredHorizontally, animated: false) | ||
124 | + for i in 0..<TVStationClasses[index].ch.count{ | ||
125 | + let item = TVStationClass.viewWithTag(2000+titleSelectBtn)!.viewWithTag(1000+100*index+i) as! UIButton | ||
126 | + item.backgroundColor = UIColor.white | ||
127 | + item.setTitleColor(UIColor.black, for: .normal) | ||
128 | + } | ||
129 | + btn.setTitleColor(UIColor.white, for: .normal) | ||
130 | + btn.backgroundColor = UIColor.blue | ||
131 | + } | ||
132 | + | ||
133 | + /* | ||
134 | + // MARK: - Navigation | ||
135 | + | ||
136 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
137 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
138 | + // Get the new view controller using segue.destinationViewController. | ||
139 | + // Pass the selected object to the new view controller. | ||
140 | + } | ||
141 | + */ | ||
142 | + | ||
143 | +} | ||
144 | + | ||
145 | + | ||
146 | +//下方的所有电视节目所在的collcetionView | ||
147 | +extension ExcellentTVViewController:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ | ||
148 | + func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { | ||
149 | + startOffsetX = scrollView.contentOffset.x | ||
150 | + isForbidScrollDelegate = false | ||
151 | + } | ||
152 | + | ||
153 | + func scrollViewDidScroll(_ scrollView: UIScrollView) { | ||
154 | + if isForbidScrollDelegate { return } | ||
155 | + NSLog("\(scrollView.contentOffset.x)") | ||
156 | + var btn:UIButton! | ||
157 | + var num:CGFloat! | ||
158 | + let btnIndex = scrollView.contentOffset.x/getScreenWidth() | ||
159 | + let view = TVStationClass.viewWithTag(2000+titleSelectBtn)! as! UIScrollView | ||
160 | + if view.contentSize.width > getScreenWidth(){ | ||
161 | + if scrollView.contentOffset.x > startOffsetX{ | ||
162 | + if scrollView.contentOffset.x - startOffsetX == getScreenWidth(){ | ||
163 | + num = btnIndex | ||
164 | + }else{ | ||
165 | + num = btnIndex+1 | ||
166 | + } | ||
167 | + if Int(num) >= TVStationClasses[titleSelectBtn].ch.count { | ||
168 | + return | ||
169 | + } | ||
170 | + btn = view.viewWithTag(1000+100*titleSelectBtn+Int(num))! as! UIButton | ||
171 | + let TVStationContentOffset = btn.frame.origin.x+btn.frame.width/2 | ||
172 | + if TVStationContentOffset < view.contentSize.width-getScreenWidth()/2 && TVStationContentOffset >= getScreenWidth()/2{ | ||
173 | + view.contentOffset.x = TVStationContentOffset - getScreenWidth()/2 | ||
174 | + } | ||
175 | + if TVStationContentOffset >= view.contentSize.width-getScreenWidth()/2{ | ||
176 | + view.contentOffset.x = view.contentSize.width-getScreenWidth() | ||
177 | + } | ||
178 | + } | ||
179 | + else{ | ||
180 | + let num = btnIndex | ||
181 | + if num < 0{ | ||
182 | + return | ||
183 | + } | ||
184 | + btn = view.viewWithTag(1000+100*titleSelectBtn+Int(num))! as! UIButton | ||
185 | + let TVStationContentOffset = btn.frame.origin.x+btn.frame.width/2 | ||
186 | + if TVStationContentOffset < view.contentSize.width-getScreenWidth()/2 && TVStationContentOffset >= getScreenWidth()/2{ | ||
187 | + view.contentOffset.x = TVStationContentOffset-getScreenWidth()/2 | ||
188 | + } | ||
189 | + if TVStationContentOffset < getScreenWidth()/2{ | ||
190 | + view.contentOffset.x = 0 | ||
191 | + } | ||
192 | + } | ||
193 | + }else{ | ||
194 | + btn = view.viewWithTag(1000+100*titleSelectBtn+Int(btnIndex))! as! UIButton | ||
195 | + } | ||
196 | + for i in 0..<TVStationClasses[titleSelectBtn].ch.count{ | ||
197 | + let item = view.viewWithTag(i+1000+100*titleSelectBtn) as! UIButton | ||
198 | + item.backgroundColor = UIColor.white | ||
199 | + item.setTitleColor(UIColor.black, for: .normal) | ||
200 | + } | ||
201 | + btn.setTitleColor(UIColor.white, for: .normal) | ||
202 | + btn.backgroundColor = UIColor.blue | ||
203 | + } | ||
204 | + | ||
205 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
206 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! ExcellentTVViewCell | ||
207 | + cell.superNacigation = self.navigationController | ||
208 | + AppDelegate.instance().httpServer.postExcellentProgram(parameters: ["f_TelevisionId":TVStationClasses[titleSelectBtn].ch[classSelectBtn].id as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in | ||
209 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | ||
210 | + for item in json.contentData()["resultData"].arrayValue{ | ||
211 | + cell.datatSet.append(TVStationSubject(json: item)) | ||
212 | + } | ||
213 | + cell.inforCollectionView.reloadData() | ||
214 | + }, failHandler: { (error) in | ||
215 | + | ||
216 | + }) | ||
217 | + } | ||
218 | + return cell | ||
219 | + } | ||
220 | + | ||
221 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
222 | + if TVStationClasses.count > 0{ | ||
223 | + return TVStationClasses[titleSelectBtn].ch.count | ||
224 | + } | ||
225 | + return 0 | ||
226 | + } | ||
227 | + | ||
228 | + | ||
229 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | ||
230 | + return CGSize(width: getScreenWidth(), height: collectionView.frame.size.height) | ||
231 | + | ||
232 | + } | ||
233 | +} | ||
234 | + | ||
235 | +//单项选项中的CollectionView | ||
236 | +class ExcellentTVViewCell: UICollectionViewCell,UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ | ||
237 | + var f_TelevisionId:String! | ||
238 | + @IBOutlet weak var inforCollectionView: UICollectionView! | ||
239 | + var datatSet:[TVStationSubject] = [] | ||
240 | + var superNacigation:UINavigationController! | ||
241 | + | ||
242 | + | ||
243 | + override func awakeFromNib() { | ||
244 | + super.awakeFromNib() | ||
245 | + } | ||
246 | + | ||
247 | + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
248 | + | ||
249 | + } | ||
250 | + | ||
251 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
252 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell1", for: indexPath) as! ExcellentTVInforViewCell | ||
253 | + let item = datatSet[indexPath.row] | ||
254 | + cell.model = item | ||
255 | + cell.superNavigation = superNacigation | ||
256 | + return cell | ||
257 | + } | ||
258 | + | ||
259 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
260 | + return datatSet.count | ||
261 | + } | ||
262 | + | ||
263 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | ||
264 | + return CGSize(width: (getScreenWidth()-30)/2, height: 200) | ||
265 | + } | ||
266 | + | ||
267 | + | ||
268 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { | ||
269 | + return UIEdgeInsetsMake(10, 10, 10, 10) | ||
270 | + } | ||
271 | + | ||
272 | +} | ||
273 | + | ||
274 | +class ExcellentTVInforViewCell: UICollectionViewCell{ | ||
275 | + | ||
276 | + @IBOutlet weak var tvStationLogo: UIImageView! | ||
277 | + @IBOutlet weak var subjectType: UILabel! | ||
278 | + @IBOutlet weak var playCount: UILabel! | ||
279 | + var superNavigation:UINavigationController! | ||
280 | + var model:TVStationSubject? { | ||
281 | + didSet{ | ||
282 | + self.tvStationLogo.sd_setImage(with: URL(string: model!.f_Img), placeholderImage: #imageLiteral(resourceName: "placeholder")) | ||
283 | + self.playCount.text = "播放次数:" + "\(model!.f_Pv!)" | ||
284 | + self.subjectType.text = model!.f_Title | ||
285 | + } | ||
286 | + | ||
287 | + } | ||
288 | + | ||
289 | + @IBAction func playBtnClick(_ sender: UIButton) { | ||
290 | + AppDelegate.instance().httpServer.addHistoryView(parameters: ["f_ViewType":self.model!.f_ResourceType as AnyObject,"f_ViewId":self.model!.f_Id as AnyObject,"f_ViewName":self.model!.f_Title as AnyObject]) { (str, error) in | ||
291 | + if JSON.fromString(jsonString: str)?["status"].intValue == 1{ | ||
292 | + | ||
293 | + } | ||
294 | + } | ||
295 | + let url = URL(string:self.model!.f_ResourceUrl) | ||
296 | + let player = AVPlayerViewController() | ||
297 | + player.player = AVPlayer(url: url!) | ||
298 | + player.videoGravity = AVLayerVideoGravityResizeAspect | ||
299 | + superNavigation.present(player, animated: true, completion: nil) | ||
300 | + } | ||
301 | +} | ||
302 | + | ||
303 | +class TVSubjectInfor{ | ||
304 | + var id:String! | ||
305 | + var name:String! | ||
306 | + var text:String! | ||
307 | + var open:Bool! | ||
308 | + var ch:[TVSubjectInfor]=[] | ||
309 | + init(json:JSON){ | ||
310 | + id = json["id"].stringValue | ||
311 | + name = json["name"].stringValue | ||
312 | + text = json["text"].stringValue | ||
313 | + name = json["name"].stringValue | ||
314 | + for item in json["children"].arrayValue { | ||
315 | + ch.append(TVSubjectInfor(json: item)) | ||
316 | + } | ||
317 | + } | ||
318 | +} |
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStation.storyboard
@@ -85,6 +85,189 @@ | @@ -85,6 +85,189 @@ | ||
85 | </objects> | 85 | </objects> |
86 | <point key="canvasLocation" x="-570.39999999999998" y="126.38680659670166"/> | 86 | <point key="canvasLocation" x="-570.39999999999998" y="126.38680659670166"/> |
87 | </scene> | 87 | </scene> |
88 | + <!--ExcellentTV View Controller--> | ||
89 | + <scene sceneID="l6m-g1-3BP"> | ||
90 | + <objects> | ||
91 | + <viewController storyboardIdentifier="ExcellentTVViewControllerVC" id="b8W-aX-LnV" customClass="ExcellentTVViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | ||
92 | + <layoutGuides> | ||
93 | + <viewControllerLayoutGuide type="top" id="4i9-Tx-rg9"/> | ||
94 | + <viewControllerLayoutGuide type="bottom" id="lho-df-W25"/> | ||
95 | + </layoutGuides> | ||
96 | + <view key="view" contentMode="scaleToFill" id="Gv8-KK-Axo"> | ||
97 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
98 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
99 | + <subviews> | ||
100 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mhl-sd-KB9"> | ||
101 | + <rect key="frame" x="0.0" y="64" width="375" height="157"/> | ||
102 | + <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/> | ||
103 | + <constraints> | ||
104 | + <constraint firstAttribute="height" constant="157" id="UZ0-MV-VXA"/> | ||
105 | + </constraints> | ||
106 | + </view> | ||
107 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="89T-Tx-OBE"> | ||
108 | + <rect key="frame" x="0.0" y="272" width="375" height="51"/> | ||
109 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
110 | + <constraints> | ||
111 | + <constraint firstAttribute="height" constant="51" id="Y6f-tb-9yg"/> | ||
112 | + </constraints> | ||
113 | + </view> | ||
114 | + <searchBar contentMode="redraw" placeholder="搜索" translatesAutoresizingMaskIntoConstraints="NO" id="zGg-HQ-hQ6"> | ||
115 | + <rect key="frame" x="0.0" y="20" width="375" height="44"/> | ||
116 | + <textInputTraits key="textInputTraits"/> | ||
117 | + </searchBar> | ||
118 | + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="98q-Zu-qPj"> | ||
119 | + <rect key="frame" x="0.0" y="323" width="375" height="344"/> | ||
120 | + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
121 | + <collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="Y8d-tF-Eyu"> | ||
122 | + <size key="itemSize" width="376" height="392"/> | ||
123 | + <size key="headerReferenceSize" width="0.0" height="0.0"/> | ||
124 | + <size key="footerReferenceSize" width="0.0" height="0.0"/> | ||
125 | + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
126 | + </collectionViewFlowLayout> | ||
127 | + <cells> | ||
128 | + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell" id="fGR-8c-fGE" customClass="ExcellentTVViewCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
129 | + <rect key="frame" x="0.0" y="-24" width="376" height="392"/> | ||
130 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
131 | + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
132 | + <rect key="frame" x="0.0" y="0.0" width="376" height="392"/> | ||
133 | + <autoresizingMask key="autoresizingMask"/> | ||
134 | + <subviews> | ||
135 | + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="r6p-zi-d85"> | ||
136 | + <rect key="frame" x="0.0" y="0.0" width="376" height="392"/> | ||
137 | + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
138 | + <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="cgF-Y1-nnf"> | ||
139 | + <size key="itemSize" width="170" height="262"/> | ||
140 | + <size key="headerReferenceSize" width="0.0" height="0.0"/> | ||
141 | + <size key="footerReferenceSize" width="0.0" height="0.0"/> | ||
142 | + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
143 | + </collectionViewFlowLayout> | ||
144 | + <cells> | ||
145 | + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell1" id="E1U-aK-U8z" customClass="ExcellentTVInforViewCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
146 | + <rect key="frame" x="0.0" y="0.0" width="170" height="262"/> | ||
147 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
148 | + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
149 | + <rect key="frame" x="0.0" y="0.0" width="170" height="262"/> | ||
150 | + <autoresizingMask key="autoresizingMask"/> | ||
151 | + <subviews> | ||
152 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="fcz-OQ-94m"> | ||
153 | + <rect key="frame" x="0.0" y="0.0" width="170" height="134.5"/> | ||
154 | + <constraints> | ||
155 | + <constraint firstAttribute="width" secondItem="fcz-OQ-94m" secondAttribute="height" multiplier="81:64" id="BM3-Lc-rwo"/> | ||
156 | + </constraints> | ||
157 | + </imageView> | ||
158 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v40-tv-azp"> | ||
159 | + <rect key="frame" x="0.0" y="134.5" width="170" height="127.5"/> | ||
160 | + <subviews> | ||
161 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VsV-Bf-hCY"> | ||
162 | + <rect key="frame" x="8" y="8" width="42" height="20.5"/> | ||
163 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
164 | + <nil key="textColor"/> | ||
165 | + <nil key="highlightedColor"/> | ||
166 | + </label> | ||
167 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9MF-Zt-fqc"> | ||
168 | + <rect key="frame" x="8" y="98.5" width="42" height="21"/> | ||
169 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
170 | + <nil key="textColor"/> | ||
171 | + <nil key="highlightedColor"/> | ||
172 | + </label> | ||
173 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="R2I-qS-V0B"> | ||
174 | + <rect key="frame" x="116" y="49" width="46" height="30"/> | ||
175 | + <state key="normal" title="Button"/> | ||
176 | + <connections> | ||
177 | + <action selector="playBtnClick:" destination="E1U-aK-U8z" eventType="touchUpInside" id="uuk-j5-fzl"/> | ||
178 | + </connections> | ||
179 | + </button> | ||
180 | + </subviews> | ||
181 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
182 | + <constraints> | ||
183 | + <constraint firstItem="9MF-Zt-fqc" firstAttribute="leading" secondItem="v40-tv-azp" secondAttribute="leading" constant="8" id="2Kr-Vk-cl8"/> | ||
184 | + <constraint firstAttribute="bottom" secondItem="9MF-Zt-fqc" secondAttribute="bottom" constant="8" id="Per-3M-nJ4"/> | ||
185 | + <constraint firstAttribute="trailing" secondItem="R2I-qS-V0B" secondAttribute="trailing" constant="8" id="asC-Mg-7ac"/> | ||
186 | + <constraint firstItem="VsV-Bf-hCY" firstAttribute="leading" secondItem="v40-tv-azp" secondAttribute="leading" constant="8" id="trW-Yh-6Yt"/> | ||
187 | + <constraint firstItem="R2I-qS-V0B" firstAttribute="centerY" secondItem="v40-tv-azp" secondAttribute="centerY" id="ybv-GH-Lkg"/> | ||
188 | + <constraint firstItem="VsV-Bf-hCY" firstAttribute="top" secondItem="v40-tv-azp" secondAttribute="top" constant="8" id="zLU-CS-C8S"/> | ||
189 | + </constraints> | ||
190 | + </view> | ||
191 | + </subviews> | ||
192 | + </view> | ||
193 | + <constraints> | ||
194 | + <constraint firstItem="v40-tv-azp" firstAttribute="top" secondItem="fcz-OQ-94m" secondAttribute="bottom" id="IHm-KI-Mgh"/> | ||
195 | + <constraint firstAttribute="trailing" secondItem="fcz-OQ-94m" secondAttribute="trailing" id="YNR-ad-G4t"/> | ||
196 | + <constraint firstItem="fcz-OQ-94m" firstAttribute="leading" secondItem="E1U-aK-U8z" secondAttribute="leading" id="dFl-og-rZ7"/> | ||
197 | + <constraint firstAttribute="trailing" secondItem="v40-tv-azp" secondAttribute="trailing" id="gRV-Qv-d29"/> | ||
198 | + <constraint firstItem="fcz-OQ-94m" firstAttribute="top" secondItem="E1U-aK-U8z" secondAttribute="top" id="roE-zo-bkK"/> | ||
199 | + <constraint firstAttribute="bottom" secondItem="v40-tv-azp" secondAttribute="bottom" id="sT9-jY-pdA"/> | ||
200 | + <constraint firstItem="v40-tv-azp" firstAttribute="leading" secondItem="E1U-aK-U8z" secondAttribute="leading" id="tdS-jP-AdZ"/> | ||
201 | + </constraints> | ||
202 | + <connections> | ||
203 | + <outlet property="playCount" destination="9MF-Zt-fqc" id="iHW-0H-dJW"/> | ||
204 | + <outlet property="subjectType" destination="VsV-Bf-hCY" id="jBF-p7-4zm"/> | ||
205 | + <outlet property="tvStationLogo" destination="fcz-OQ-94m" id="aJ8-f4-qoh"/> | ||
206 | + </connections> | ||
207 | + </collectionViewCell> | ||
208 | + </cells> | ||
209 | + <connections> | ||
210 | + <outlet property="dataSource" destination="fGR-8c-fGE" id="u36-wA-CKH"/> | ||
211 | + <outlet property="delegate" destination="fGR-8c-fGE" id="IBZ-Vo-3of"/> | ||
212 | + </connections> | ||
213 | + </collectionView> | ||
214 | + </subviews> | ||
215 | + </view> | ||
216 | + <constraints> | ||
217 | + <constraint firstItem="r6p-zi-d85" firstAttribute="leading" secondItem="fGR-8c-fGE" secondAttribute="leading" id="XnS-Y3-JXe"/> | ||
218 | + <constraint firstAttribute="bottom" secondItem="r6p-zi-d85" secondAttribute="bottom" id="Zyh-g8-MW7"/> | ||
219 | + <constraint firstAttribute="trailing" secondItem="r6p-zi-d85" secondAttribute="trailing" id="dK8-ok-Snv"/> | ||
220 | + <constraint firstItem="r6p-zi-d85" firstAttribute="top" secondItem="fGR-8c-fGE" secondAttribute="top" id="iDI-iF-maj"/> | ||
221 | + </constraints> | ||
222 | + <connections> | ||
223 | + <outlet property="inforCollectionView" destination="r6p-zi-d85" id="XvH-nv-OHv"/> | ||
224 | + </connections> | ||
225 | + </collectionViewCell> | ||
226 | + </cells> | ||
227 | + <connections> | ||
228 | + <outlet property="dataSource" destination="b8W-aX-LnV" id="CCT-nv-YZq"/> | ||
229 | + <outlet property="delegate" destination="b8W-aX-LnV" id="1Cr-xP-bzP"/> | ||
230 | + </connections> | ||
231 | + </collectionView> | ||
232 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IdI-17-KVq"> | ||
233 | + <rect key="frame" x="0.0" y="221" width="375" height="51"/> | ||
234 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
235 | + <constraints> | ||
236 | + <constraint firstAttribute="height" constant="51" id="unU-1q-P1u"/> | ||
237 | + </constraints> | ||
238 | + </view> | ||
239 | + </subviews> | ||
240 | + <color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/> | ||
241 | + <constraints> | ||
242 | + <constraint firstItem="zGg-HQ-hQ6" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="08r-BK-AYj"/> | ||
243 | + <constraint firstAttribute="trailing" secondItem="IdI-17-KVq" secondAttribute="trailing" id="5vb-9d-uXn"/> | ||
244 | + <constraint firstItem="IdI-17-KVq" firstAttribute="top" secondItem="Mhl-sd-KB9" secondAttribute="bottom" id="7rQ-6N-24t"/> | ||
245 | + <constraint firstAttribute="trailing" secondItem="98q-Zu-qPj" secondAttribute="trailing" id="9fs-x7-fIS"/> | ||
246 | + <constraint firstItem="IdI-17-KVq" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="F2C-pE-qYZ"/> | ||
247 | + <constraint firstItem="zGg-HQ-hQ6" firstAttribute="top" secondItem="4i9-Tx-rg9" secondAttribute="bottom" id="J68-Pn-0Bu"/> | ||
248 | + <constraint firstAttribute="trailing" secondItem="Mhl-sd-KB9" secondAttribute="trailing" id="Lt7-n0-tWt"/> | ||
249 | + <constraint firstItem="lho-df-W25" firstAttribute="top" secondItem="98q-Zu-qPj" secondAttribute="bottom" id="MIT-SW-TOS"/> | ||
250 | + <constraint firstItem="89T-Tx-OBE" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="NED-o8-Gz5"/> | ||
251 | + <constraint firstItem="89T-Tx-OBE" firstAttribute="top" secondItem="IdI-17-KVq" secondAttribute="bottom" id="Pc7-DI-fyn"/> | ||
252 | + <constraint firstAttribute="trailing" secondItem="zGg-HQ-hQ6" secondAttribute="trailing" id="WPf-27-9bg"/> | ||
253 | + <constraint firstItem="Mhl-sd-KB9" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="anA-G9-sCy"/> | ||
254 | + <constraint firstItem="98q-Zu-qPj" firstAttribute="leading" secondItem="Gv8-KK-Axo" secondAttribute="leading" id="coP-ED-djd"/> | ||
255 | + <constraint firstAttribute="trailing" secondItem="89T-Tx-OBE" secondAttribute="trailing" id="d3u-hS-Fv0"/> | ||
256 | + <constraint firstItem="98q-Zu-qPj" firstAttribute="top" secondItem="89T-Tx-OBE" secondAttribute="bottom" id="vDI-ni-7Iu"/> | ||
257 | + <constraint firstItem="Mhl-sd-KB9" firstAttribute="top" secondItem="zGg-HQ-hQ6" secondAttribute="bottom" id="zJx-8Q-hdK"/> | ||
258 | + </constraints> | ||
259 | + </view> | ||
260 | + <connections> | ||
261 | + <outlet property="AllTitleView" destination="IdI-17-KVq" id="q4z-D9-yZi"/> | ||
262 | + <outlet property="TVStationClass" destination="89T-Tx-OBE" id="ru3-Dy-X1Z"/> | ||
263 | + <outlet property="collectionView" destination="98q-Zu-qPj" id="0J9-bV-tnM"/> | ||
264 | + <outlet property="lunboView" destination="Mhl-sd-KB9" id="R0Q-io-hip"/> | ||
265 | + </connections> | ||
266 | + </viewController> | ||
267 | + <placeholder placeholderIdentifier="IBFirstResponder" id="KWc-cP-YUd" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
268 | + </objects> | ||
269 | + <point key="canvasLocation" x="-572" y="785.75712143928047"/> | ||
270 | + </scene> | ||
88 | <!--SearchTV Station List View Controller--> | 271 | <!--SearchTV Station List View Controller--> |
89 | <scene sceneID="FC9-ii-4gV"> | 272 | <scene sceneID="FC9-ii-4gV"> |
90 | <objects> | 273 | <objects> |
@@ -408,5 +591,127 @@ | @@ -408,5 +591,127 @@ | ||
408 | </objects> | 591 | </objects> |
409 | <point key="canvasLocation" x="799.20000000000005" y="129.98500749625188"/> | 592 | <point key="canvasLocation" x="799.20000000000005" y="129.98500749625188"/> |
410 | </scene> | 593 | </scene> |
594 | + <!--Station Channel View Controller--> | ||
595 | + <scene sceneID="9jT-qD-wyU"> | ||
596 | + <objects> | ||
597 | + <viewController storyboardIdentifier="TVStationChannelViewControllerVC" id="CLL-z0-29E" customClass="TVStationChannelViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | ||
598 | + <layoutGuides> | ||
599 | + <viewControllerLayoutGuide type="top" id="Lr1-Rk-hqR"/> | ||
600 | + <viewControllerLayoutGuide type="bottom" id="PET-wp-1k0"/> | ||
601 | + </layoutGuides> | ||
602 | + <view key="view" contentMode="scaleToFill" id="1fP-l5-4K3"> | ||
603 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
604 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
605 | + <subviews> | ||
606 | + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="EVv-oR-qoV"> | ||
607 | + <rect key="frame" x="0.0" y="20" width="375" height="647"/> | ||
608 | + <color key="backgroundColor" red="0.89713114500000002" green="0.89431768659999999" blue="0.90413767099999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
609 | + <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="nT1-EI-DzL"> | ||
610 | + <size key="itemSize" width="160" height="176"/> | ||
611 | + <size key="headerReferenceSize" width="50" height="50"/> | ||
612 | + <size key="footerReferenceSize" width="0.0" height="0.0"/> | ||
613 | + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
614 | + </collectionViewFlowLayout> | ||
615 | + <cells> | ||
616 | + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell" id="XS8-dM-fSF" customClass="TVStationChannelCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
617 | + <rect key="frame" x="0.0" y="50" width="160" height="176"/> | ||
618 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
619 | + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
620 | + <rect key="frame" x="0.0" y="0.0" width="160" height="176"/> | ||
621 | + <autoresizingMask key="autoresizingMask"/> | ||
622 | + <subviews> | ||
623 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1ZJ-ao-hBx"> | ||
624 | + <rect key="frame" x="0.0" y="0.0" width="160" height="120"/> | ||
625 | + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
626 | + </imageView> | ||
627 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EE2-Y8-SP4"> | ||
628 | + <rect key="frame" x="59" y="139" width="42" height="21"/> | ||
629 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
630 | + <nil key="textColor"/> | ||
631 | + <nil key="highlightedColor"/> | ||
632 | + </label> | ||
633 | + </subviews> | ||
634 | + </view> | ||
635 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||
636 | + <constraints> | ||
637 | + <constraint firstAttribute="bottom" secondItem="EE2-Y8-SP4" secondAttribute="bottom" constant="16" id="6w0-JP-ybD"/> | ||
638 | + <constraint firstItem="1ZJ-ao-hBx" firstAttribute="leading" secondItem="XS8-dM-fSF" secondAttribute="leading" id="Fdm-sT-5np"/> | ||
639 | + <constraint firstItem="1ZJ-ao-hBx" firstAttribute="top" secondItem="XS8-dM-fSF" secondAttribute="top" id="HmI-98-WDB"/> | ||
640 | + <constraint firstItem="EE2-Y8-SP4" firstAttribute="top" secondItem="1ZJ-ao-hBx" secondAttribute="bottom" constant="19" id="KZ9-YD-2dJ"/> | ||
641 | + <constraint firstItem="EE2-Y8-SP4" firstAttribute="centerX" secondItem="XS8-dM-fSF" secondAttribute="centerX" id="nFb-gE-ru0"/> | ||
642 | + <constraint firstAttribute="trailing" secondItem="1ZJ-ao-hBx" secondAttribute="trailing" id="p1m-WJ-Z3K"/> | ||
643 | + </constraints> | ||
644 | + <connections> | ||
645 | + <outlet property="tvStationLogo" destination="1ZJ-ao-hBx" id="1NC-ds-qqX"/> | ||
646 | + <outlet property="tvStationName" destination="EE2-Y8-SP4" id="lSz-1S-YnW"/> | ||
647 | + </connections> | ||
648 | + </collectionViewCell> | ||
649 | + </cells> | ||
650 | + <collectionReusableView key="sectionHeaderView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="HeaderView" id="Jdh-dY-FAu" customClass="TVStationChannelHeaderView" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
651 | + <rect key="frame" x="0.0" y="0.0" width="375" height="50"/> | ||
652 | + <autoresizingMask key="autoresizingMask"/> | ||
653 | + <subviews> | ||
654 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8TH-3g-UsI"> | ||
655 | + <rect key="frame" x="8" y="7" width="35" height="35"/> | ||
656 | + <constraints> | ||
657 | + <constraint firstAttribute="height" constant="35" id="5yj-bt-Jn8"/> | ||
658 | + <constraint firstAttribute="width" secondItem="8TH-3g-UsI" secondAttribute="height" multiplier="1:1" id="Kxf-yE-A3T"/> | ||
659 | + </constraints> | ||
660 | + </imageView> | ||
661 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yem-uG-4a8"> | ||
662 | + <rect key="frame" x="51" y="14" width="42" height="21"/> | ||
663 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
664 | + <nil key="textColor"/> | ||
665 | + <nil key="highlightedColor"/> | ||
666 | + </label> | ||
667 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HPj-Yv-YzO"> | ||
668 | + <rect key="frame" x="337" y="10" width="30" height="30"/> | ||
669 | + <constraints> | ||
670 | + <constraint firstAttribute="height" constant="30" id="tPQ-hz-bM8"/> | ||
671 | + <constraint firstAttribute="width" constant="30" id="weL-na-eER"/> | ||
672 | + </constraints> | ||
673 | + <state key="normal" image="arrow"/> | ||
674 | + </button> | ||
675 | + </subviews> | ||
676 | + <constraints> | ||
677 | + <constraint firstItem="yem-uG-4a8" firstAttribute="leading" secondItem="8TH-3g-UsI" secondAttribute="trailing" constant="8" id="3hn-Wo-NOT"/> | ||
678 | + <constraint firstItem="HPj-Yv-YzO" firstAttribute="centerY" secondItem="Jdh-dY-FAu" secondAttribute="centerY" id="HS5-Sr-TvH"/> | ||
679 | + <constraint firstAttribute="trailing" secondItem="HPj-Yv-YzO" secondAttribute="trailing" constant="8" id="Ih6-EB-p7N"/> | ||
680 | + <constraint firstItem="yem-uG-4a8" firstAttribute="centerY" secondItem="Jdh-dY-FAu" secondAttribute="centerY" id="Xvl-o7-bO2"/> | ||
681 | + <constraint firstItem="8TH-3g-UsI" firstAttribute="centerY" secondItem="Jdh-dY-FAu" secondAttribute="centerY" id="fy9-TI-eoE"/> | ||
682 | + <constraint firstItem="HPj-Yv-YzO" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="yem-uG-4a8" secondAttribute="trailing" constant="8" id="k2d-sv-rfG"/> | ||
683 | + <constraint firstItem="8TH-3g-UsI" firstAttribute="leading" secondItem="Jdh-dY-FAu" secondAttribute="leading" constant="8" id="wQg-ux-5gP"/> | ||
684 | + </constraints> | ||
685 | + <connections> | ||
686 | + <outlet property="logo" destination="8TH-3g-UsI" id="3e0-Qr-HHs"/> | ||
687 | + <outlet property="moreBtn" destination="HPj-Yv-YzO" id="CXg-Sc-E5B"/> | ||
688 | + <outlet property="title" destination="yem-uG-4a8" id="jgP-c2-8rY"/> | ||
689 | + </connections> | ||
690 | + </collectionReusableView> | ||
691 | + <connections> | ||
692 | + <outlet property="dataSource" destination="CLL-z0-29E" id="maz-ws-hfl"/> | ||
693 | + <outlet property="delegate" destination="CLL-z0-29E" id="EEF-Mt-3m2"/> | ||
694 | + </connections> | ||
695 | + </collectionView> | ||
696 | + </subviews> | ||
697 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
698 | + <constraints> | ||
699 | + <constraint firstItem="PET-wp-1k0" firstAttribute="top" secondItem="EVv-oR-qoV" secondAttribute="bottom" id="E8l-rG-D5Z"/> | ||
700 | + <constraint firstItem="EVv-oR-qoV" firstAttribute="leading" secondItem="1fP-l5-4K3" secondAttribute="leading" id="eWd-hq-hwR"/> | ||
701 | + <constraint firstItem="EVv-oR-qoV" firstAttribute="top" secondItem="Lr1-Rk-hqR" secondAttribute="bottom" id="l0i-7E-YUv"/> | ||
702 | + <constraint firstAttribute="trailing" secondItem="EVv-oR-qoV" secondAttribute="trailing" id="xf3-fQ-aK5"/> | ||
703 | + </constraints> | ||
704 | + </view> | ||
705 | + <connections> | ||
706 | + <outlet property="collectionView" destination="EVv-oR-qoV" id="B1b-Pw-i7S"/> | ||
707 | + </connections> | ||
708 | + </viewController> | ||
709 | + <placeholder placeholderIdentifier="IBFirstResponder" id="Thy-DG-e5P" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
710 | + </objects> | ||
711 | + <point key="canvasLocation" x="93.599999999999994" y="785.75712143928047"/> | ||
712 | + </scene> | ||
411 | </scenes> | 713 | </scenes> |
714 | + <resources> | ||
715 | + <image name="arrow" width="7" height="12"/> | ||
716 | + </resources> | ||
412 | </document> | 717 | </document> |
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationChannelViewController.swift
0 → 100644
@@ -0,0 +1,108 @@ | @@ -0,0 +1,108 @@ | ||
1 | +// | ||
2 | +// TVStationChannelViewController.swift | ||
3 | +// YouerLiveVideo | ||
4 | +// | ||
5 | +// Created by 左丞 on 2017/5/20. | ||
6 | +// Copyright © 2017年 左丞. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +import UIKit | ||
10 | + | ||
11 | +class TVStationChannelViewController: UIViewController { | ||
12 | + | ||
13 | + @IBOutlet weak var collectionView: UICollectionView! | ||
14 | + var typeList:[String] = ["直播节目","点播"] | ||
15 | + override func viewDidLoad() { | ||
16 | + super.viewDidLoad() | ||
17 | + self.automaticallyAdjustsScrollViewInsets = false | ||
18 | + // Do any additional setup after loading the view. | ||
19 | + } | ||
20 | + | ||
21 | + override func didReceiveMemoryWarning() { | ||
22 | + super.didReceiveMemoryWarning() | ||
23 | + // Dispose of any resources that can be recreated. | ||
24 | + } | ||
25 | + | ||
26 | + | ||
27 | + func moreBtnClick(send:UIButton){ | ||
28 | + | ||
29 | + } | ||
30 | + | ||
31 | + /* | ||
32 | + // MARK: - Navigation | ||
33 | + | ||
34 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
35 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
36 | + // Get the new view controller using segue.destinationViewController. | ||
37 | + // Pass the selected object to the new view controller. | ||
38 | + } | ||
39 | + */ | ||
40 | + | ||
41 | +} | ||
42 | + | ||
43 | +extension TVStationChannelViewController:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ | ||
44 | + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
45 | + | ||
46 | + } | ||
47 | + | ||
48 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
49 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) | ||
50 | + return cell | ||
51 | + } | ||
52 | + | ||
53 | + func numberOfSections(in collectionView: UICollectionView) -> Int { | ||
54 | + return 2 | ||
55 | + } | ||
56 | + | ||
57 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
58 | + return 4 | ||
59 | + } | ||
60 | + | ||
61 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForHeaderInSection section: Int) -> CGSize { | ||
62 | + return CGSize(width: getScreenWidth(), height: 44) | ||
63 | + } | ||
64 | + | ||
65 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { | ||
66 | + return UIEdgeInsetsMake(10, 10, 10, 10) | ||
67 | + } | ||
68 | + | ||
69 | + | ||
70 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | ||
71 | + return CGSize(width: (getScreenWidth()-30)/2, height: 200) | ||
72 | + } | ||
73 | + | ||
74 | + func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -> UICollectionReusableView { | ||
75 | + var reusableView:UICollectionReusableView! | ||
76 | + if kind == UICollectionElementKindSectionHeader{ | ||
77 | + let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: UICollectionElementKindSectionHeader, withReuseIdentifier: "HeaderView", for: indexPath) as! TVStationChannelHeaderView | ||
78 | + headerView.title.text = typeList[indexPath.section] | ||
79 | + headerView.moreBtn.tag = 100+indexPath.section | ||
80 | + headerView.moreBtn.addTarget(self, action: #selector(TVStationChannelViewController.moreBtnClick(send:)), for: .touchUpInside) | ||
81 | + headerView.logo.image = UIImage(named: "icon") | ||
82 | + reusableView = headerView | ||
83 | + } | ||
84 | + return reusableView | ||
85 | + } | ||
86 | + | ||
87 | +} | ||
88 | + | ||
89 | +class TVStationChannelCell: UICollectionViewCell { | ||
90 | + | ||
91 | + @IBOutlet weak var tvStationLogo: UIImageView! | ||
92 | + @IBOutlet weak var tvStationName: UILabel! | ||
93 | +} | ||
94 | + | ||
95 | + | ||
96 | +class TVStationChannelHeaderView: UICollectionReusableView { | ||
97 | + | ||
98 | + | ||
99 | + @IBOutlet weak var moreBtn: UIButton! | ||
100 | + @IBOutlet weak var logo: UIImageView! | ||
101 | + @IBOutlet weak var title: UILabel! | ||
102 | + | ||
103 | +} | ||
104 | + | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + |
YouerLiveVideo/YouerLiveVideo/controllers/TVStation/TVStationViewController.swift
@@ -19,6 +19,7 @@ class TVStationViewController: UIViewController { | @@ -19,6 +19,7 @@ class TVStationViewController: UIViewController { | ||
19 | super.viewDidLoad() | 19 | super.viewDidLoad() |
20 | self.configTheme() | 20 | self.configTheme() |
21 | getDataList() | 21 | getDataList() |
22 | + self.automaticallyAdjustsScrollViewInsets = false | ||
22 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .search, target: self, action: #selector(TVStationViewController.pushToSeachViewController)) | 23 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .search, target: self, action: #selector(TVStationViewController.pushToSeachViewController)) |
23 | // Do any additional setup after loading the view. | 24 | // Do any additional setup after loading the view. |
24 | } | 25 | } |
@@ -147,11 +148,10 @@ extension TVStationViewController:UICollectionViewDelegate,UICollectionViewDeleg | @@ -147,11 +148,10 @@ extension TVStationViewController:UICollectionViewDelegate,UICollectionViewDeleg | ||
147 | 148 | ||
148 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | 149 | func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { |
149 | if collectionView.tag == 3{ | 150 | if collectionView.tag == 3{ |
150 | - let vc = Story.instantiateViewControllerWithIdentifier("TVStationInforViewControllerVC", storyName: "TVStation") as! TVStationInforViewController | ||
151 | - vc.excellentTVStationProgram = excellentTVStationProgram[indexPath.row] | 151 | + let vc = Story.instantiateViewControllerWithIdentifier("ExcellentTVViewControllerVC", storyName: "TVStation") as! ExcellentTVViewController |
152 | self.navigationController?.pushViewController(vc, animated: true) | 152 | self.navigationController?.pushViewController(vc, animated: true) |
153 | }else{ | 153 | }else{ |
154 | - let vc = Story.instantiateViewControllerWithIdentifier("LiveInforViewControllerVC", storyName: "Resource") as! LiveInforViewController | 154 | + let vc = Story.instantiateViewControllerWithIdentifier("TVStationChannelViewControllerVC", storyName: "TVStation") as! TVStationChannelViewController |
155 | self.navigationController?.pushViewController(vc, animated: true) | 155 | self.navigationController?.pushViewController(vc, animated: true) |
156 | } | 156 | } |
157 | } | 157 | } |
YouerLiveVideo/YouerLiveVideo/controllers/User/AppSettingViewController.swift
0 → 100644
@@ -0,0 +1,102 @@ | @@ -0,0 +1,102 @@ | ||
1 | +// | ||
2 | +// AppSettingViewController.swift | ||
3 | +// YouerLiveVideo | ||
4 | +// | ||
5 | +// Created by 左丞 on 2017/5/23. | ||
6 | +// Copyright © 2017年 左丞. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +import UIKit | ||
10 | + | ||
11 | +class AppSettingViewController: UIViewController { | ||
12 | + var titleArr:[String] = ["密码修改"] | ||
13 | + override func viewDidLoad() { | ||
14 | + super.viewDidLoad() | ||
15 | + | ||
16 | + // Do any additional setup after loading the view. | ||
17 | + } | ||
18 | + | ||
19 | + override func didReceiveMemoryWarning() { | ||
20 | + super.didReceiveMemoryWarning() | ||
21 | + // Dispose of any resources that can be recreated. | ||
22 | + } | ||
23 | + | ||
24 | + override func viewWillAppear(_ animated: Bool) { | ||
25 | + super.viewWillAppear(animated) | ||
26 | + self.tabBarController?.tabBar.isHidden = true | ||
27 | + } | ||
28 | + | ||
29 | + override func viewWillDisappear(_ animated: Bool) { | ||
30 | + super.viewWillDisappear(animated) | ||
31 | + self.tabBarController?.hidesBottomBarWhenPushed = false | ||
32 | + } | ||
33 | + | ||
34 | + | ||
35 | + /* | ||
36 | + // MARK: - Navigation | ||
37 | + | ||
38 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
39 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
40 | + // Get the new view controller using segue.destinationViewController. | ||
41 | + // Pass the selected object to the new view controller. | ||
42 | + } | ||
43 | + */ | ||
44 | + | ||
45 | +} | ||
46 | + | ||
47 | +extension AppSettingViewController:UITableViewDelegate,UITableViewDataSource{ | ||
48 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
49 | + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! AppSettingCell | ||
50 | + cell.titleName.text = titleArr[indexPath.row] | ||
51 | + return cell | ||
52 | + } | ||
53 | + | ||
54 | + func numberOfSections(in tableView: UITableView) -> Int { | ||
55 | + return titleArr.count | ||
56 | + } | ||
57 | + | ||
58 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
59 | + return 1 | ||
60 | + } | ||
61 | + | ||
62 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
63 | + switch indexPath.section { | ||
64 | + case 0: | ||
65 | + let vc = Story.instantiateViewControllerWithIdentifier("ChangePassWordViewControllerVC", storyName: "User") as! ChangePassWordViewController | ||
66 | + vc.title = "密码修改" | ||
67 | + self.navigationController?.pushViewController(vc, animated: true) | ||
68 | + break | ||
69 | + default: | ||
70 | + break | ||
71 | + } | ||
72 | + } | ||
73 | + | ||
74 | + func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { | ||
75 | + let view = UILabel(frame: CGRect(x:0,y:0,width:getScreenWidth(),height:1)) | ||
76 | + view.backgroundColor = tableView.backgroundColor | ||
77 | + return view | ||
78 | + } | ||
79 | + | ||
80 | + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { | ||
81 | + let view = UILabel(frame: CGRect(x:0,y:0,width:getScreenWidth(),height:15)) | ||
82 | + view.backgroundColor = tableView.backgroundColor | ||
83 | + return view | ||
84 | + | ||
85 | + } | ||
86 | + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { | ||
87 | + return 1 | ||
88 | + } | ||
89 | + | ||
90 | + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | ||
91 | + return 15 | ||
92 | + } | ||
93 | +} | ||
94 | + | ||
95 | + | ||
96 | + | ||
97 | +class AppSettingCell: UITableViewCell { | ||
98 | + | ||
99 | + | ||
100 | + @IBOutlet weak var titleName: UILabel! | ||
101 | + | ||
102 | +} |
YouerLiveVideo/YouerLiveVideo/controllers/User/HistoryViewController.swift
0 → 100644
@@ -0,0 +1,102 @@ | @@ -0,0 +1,102 @@ | ||
1 | +// | ||
2 | +// HistoryViewController.swift | ||
3 | +// YouerLiveVideo | ||
4 | +// | ||
5 | +// Created by 左丞 on 2017/5/23. | ||
6 | +// Copyright © 2017年 左丞. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +import UIKit | ||
10 | + | ||
11 | +class HistoryViewController: UIViewController { | ||
12 | + | ||
13 | + @IBOutlet weak var collectionView: UICollectionView! | ||
14 | + | ||
15 | + var datatSet:[TVStationSubject] = [] | ||
16 | + var type:Int = 0// 资源类型 0-微课 1-资源 | ||
17 | + var isHistory:Int = 0 | ||
18 | + override func viewDidLoad() { | ||
19 | + super.viewDidLoad() | ||
20 | + if isHistory == 0{ | ||
21 | + AppDelegate.instance().httpServer.getHistroyView(parameters: ["f_ViewType":type as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in | ||
22 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | ||
23 | + for item in json.contentData()["resultData"].arrayValue{ | ||
24 | + self.datatSet.append(TVStationSubject(json: item)) | ||
25 | + } | ||
26 | + self.collectionView.reloadData() | ||
27 | + }, failHandler: { (error) in | ||
28 | + | ||
29 | + }) | ||
30 | + } | ||
31 | + }else{ | ||
32 | + AppDelegate.instance().httpServer.getHistroyView(parameters: ["f_ViewType":type as AnyObject,"pageIndex":1 as AnyObject]) { (str, error) in | ||
33 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | ||
34 | + for item in json.contentData()["resultData"].arrayValue{ | ||
35 | + self.datatSet.append(TVStationSubject(json: item)) | ||
36 | + } | ||
37 | + self.collectionView.reloadData() | ||
38 | + }, failHandler: { (error) in | ||
39 | + | ||
40 | + }) | ||
41 | + } | ||
42 | + } | ||
43 | + // Do any additional setup after loading the view. | ||
44 | + } | ||
45 | + | ||
46 | + override func didReceiveMemoryWarning() { | ||
47 | + super.didReceiveMemoryWarning() | ||
48 | + // Dispose of any resources that can be recreated. | ||
49 | + } | ||
50 | + | ||
51 | + | ||
52 | + /* | ||
53 | + // MARK: - Navigation | ||
54 | + | ||
55 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
56 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
57 | + // Get the new view controller using segue.destinationViewController. | ||
58 | + // Pass the selected object to the new view controller. | ||
59 | + } | ||
60 | + */ | ||
61 | + | ||
62 | +} | ||
63 | + | ||
64 | +extension HistoryViewController:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout{ | ||
65 | + | ||
66 | + func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { | ||
67 | + | ||
68 | + } | ||
69 | + | ||
70 | + func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { | ||
71 | + let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath) as! TVStationClassCell | ||
72 | + let item = datatSet[indexPath.row] | ||
73 | + cell.model = item | ||
74 | + return cell | ||
75 | + } | ||
76 | + | ||
77 | + func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { | ||
78 | + return datatSet.count | ||
79 | + } | ||
80 | + | ||
81 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize { | ||
82 | + return CGSize(width: (getScreenWidth()-30)/2, height: 200) | ||
83 | + } | ||
84 | + | ||
85 | + | ||
86 | + func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets { | ||
87 | + return UIEdgeInsetsMake(10, 10, 10, 10) | ||
88 | + } | ||
89 | + | ||
90 | +} | ||
91 | + | ||
92 | +class TVStationClassCell: UICollectionViewCell { | ||
93 | + | ||
94 | + @IBOutlet weak var name: UILabel! | ||
95 | + @IBOutlet weak var photo: UIImageView! | ||
96 | + var model:TVStationSubject?{ | ||
97 | + didSet{ | ||
98 | + name.text = model!.f_Title | ||
99 | + photo.sd_setImage(with: URL(string:model!.f_Img), placeholderImage: #imageLiteral(resourceName: "placeholder")) | ||
100 | + } | ||
101 | + } | ||
102 | +} |
YouerLiveVideo/YouerLiveVideo/controllers/User/Setting/ChangePassWordViewController.swift
0 → 100644
@@ -0,0 +1,84 @@ | @@ -0,0 +1,84 @@ | ||
1 | +// | ||
2 | +// ChangePassWordViewController.swift | ||
3 | +// YouerLiveVideo | ||
4 | +// | ||
5 | +// Created by 左丞 on 2017/5/23. | ||
6 | +// Copyright © 2017年 左丞. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +import UIKit | ||
10 | + | ||
11 | +class ChangePassWordViewController: UIViewController { | ||
12 | + | ||
13 | + @IBOutlet weak var scrollView: UIScrollView! | ||
14 | + @IBOutlet weak var scrollViewHeight: NSLayoutConstraint! | ||
15 | + | ||
16 | + @IBOutlet weak var passwordTextFiled: UITextField! | ||
17 | + @IBOutlet weak var agrenPasswordTextFiled: UITextField! | ||
18 | + @IBOutlet weak var userCodeTextFiled: UITextField! | ||
19 | + | ||
20 | + | ||
21 | + var scrollViewH:CGFloat! | ||
22 | + | ||
23 | + @IBAction func editKeyboard(_ sender: Any) { | ||
24 | + self.view.endEditing(true) | ||
25 | + } | ||
26 | + | ||
27 | + override func viewDidLoad() { | ||
28 | + super.viewDidLoad() | ||
29 | + scrollViewH = scrollViewHeight.constant | ||
30 | + NotificationCenter.default.addObserver(self, selector: #selector(ChangePassWordViewController.keyboardWIllChange), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil) | ||
31 | + | ||
32 | + // Do any additional setup after loading the view. | ||
33 | + } | ||
34 | + | ||
35 | + override func didReceiveMemoryWarning() { | ||
36 | + super.didReceiveMemoryWarning() | ||
37 | + // Dispose of any resources that can be recreated. | ||
38 | + } | ||
39 | + | ||
40 | + @IBAction func agrenChangePasswordBtnClick(_ sender: UIButton) { | ||
41 | + | ||
42 | + } | ||
43 | + | ||
44 | + @IBAction func sendUserCodeBtnClick(_ sender: UIButton) { | ||
45 | + | ||
46 | + } | ||
47 | + | ||
48 | + // MARK: - 输入密码点击return回收键盘 | ||
49 | + func textFieldShouldReturn(_ textField: UITextField) -> Bool { | ||
50 | + textField.resignFirstResponder() | ||
51 | + return true | ||
52 | + } | ||
53 | + // MARK: - 键盘监听 | ||
54 | + func keyboardWIllChange(noti: NSNotification){ | ||
55 | + let userInfo:NSDictionary=noti.userInfo! as NSDictionary | ||
56 | + let endFrame=(userInfo[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue | ||
57 | + if endFrame?.origin.y==getScreenHeight() { | ||
58 | + scrollViewHeight.constant=scrollViewH | ||
59 | + }else{ | ||
60 | + if ((endFrame?.origin.y)!-64) < scrollViewH { | ||
61 | + scrollViewHeight.constant=((endFrame?.origin.y)!-64) | ||
62 | + }else{ | ||
63 | + scrollViewHeight.constant=scrollViewH | ||
64 | + } | ||
65 | + } | ||
66 | + } | ||
67 | + // MARK: - 销毁通知 | ||
68 | + deinit { | ||
69 | + NotificationCenter.default.removeObserver(self) | ||
70 | + } | ||
71 | + | ||
72 | + /* | ||
73 | + // MARK: - Navigation | ||
74 | + | ||
75 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
76 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
77 | + // Get the new view controller using segue.destinationViewController. | ||
78 | + // Pass the selected object to the new view controller. | ||
79 | + } | ||
80 | + */ | ||
81 | + | ||
82 | +} | ||
83 | + | ||
84 | + |
YouerLiveVideo/YouerLiveVideo/controllers/User/User.storyboard
@@ -5,6 +5,561 @@ | @@ -5,6 +5,561 @@ | ||
5 | </device> | 5 | </device> |
6 | <dependencies> | 6 | <dependencies> |
7 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/> | 7 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/> |
8 | + <capability name="Aspect ratio constraints" minToolsVersion="5.1"/> | ||
9 | + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||
8 | </dependencies> | 10 | </dependencies> |
9 | - <scenes/> | 11 | + <scenes> |
12 | + <!--User Edit View Controller--> | ||
13 | + <scene sceneID="pS1-j4-eWs"> | ||
14 | + <objects> | ||
15 | + <viewController storyboardIdentifier="UserEditViewControllerVC" id="e3H-9T-9vN" customClass="UserEditViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | ||
16 | + <layoutGuides> | ||
17 | + <viewControllerLayoutGuide type="top" id="FSu-Pn-e9e"/> | ||
18 | + <viewControllerLayoutGuide type="bottom" id="xWX-Qt-Zg4"/> | ||
19 | + </layoutGuides> | ||
20 | + <view key="view" contentMode="scaleToFill" id="sEf-LI-up1"> | ||
21 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
22 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
23 | + <subviews> | ||
24 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="80" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="7cQ-8j-yH7"> | ||
25 | + <rect key="frame" x="0.0" y="20" width="375" height="647"/> | ||
26 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
27 | + <view key="tableFooterView" alpha="0.0" contentMode="scaleToFill" id="gdX-lf-V9T"> | ||
28 | + <rect key="frame" x="0.0" y="233" width="375" height="1"/> | ||
29 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
30 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
31 | + </view> | ||
32 | + <prototypes> | ||
33 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="cell" rowHeight="65" id="VaS-c5-fyN" customClass="UserEditCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
34 | + <rect key="frame" x="0.0" y="28" width="375" height="65"/> | ||
35 | + <autoresizingMask key="autoresizingMask"/> | ||
36 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VaS-c5-fyN" id="BHG-Ro-sxn"> | ||
37 | + <rect key="frame" x="0.0" y="0.0" width="375" height="65"/> | ||
38 | + <autoresizingMask key="autoresizingMask"/> | ||
39 | + <subviews> | ||
40 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1Fz-jx-xRr"> | ||
41 | + <rect key="frame" x="0.0" y="0.0" width="375" height="55"/> | ||
42 | + <subviews> | ||
43 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wur-aa-kt0"> | ||
44 | + <rect key="frame" x="16" y="17" width="42" height="21"/> | ||
45 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
46 | + <nil key="textColor"/> | ||
47 | + <nil key="highlightedColor"/> | ||
48 | + </label> | ||
49 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lKD-cm-cma"> | ||
50 | + <rect key="frame" x="100" y="17" width="42" height="21"/> | ||
51 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
52 | + <nil key="textColor"/> | ||
53 | + <nil key="highlightedColor"/> | ||
54 | + </label> | ||
55 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="修改" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="p7D-OG-Yvb"> | ||
56 | + <rect key="frame" x="324" y="17" width="35" height="21"/> | ||
57 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
58 | + <nil key="textColor"/> | ||
59 | + <nil key="highlightedColor"/> | ||
60 | + </label> | ||
61 | + </subviews> | ||
62 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
63 | + <constraints> | ||
64 | + <constraint firstItem="lKD-cm-cma" firstAttribute="leading" secondItem="1Fz-jx-xRr" secondAttribute="leading" constant="100" id="82k-40-ps7"/> | ||
65 | + <constraint firstItem="lKD-cm-cma" firstAttribute="centerY" secondItem="1Fz-jx-xRr" secondAttribute="centerY" id="CKm-pY-Oa5"/> | ||
66 | + <constraint firstItem="p7D-OG-Yvb" firstAttribute="centerY" secondItem="1Fz-jx-xRr" secondAttribute="centerY" id="GLx-N0-nO4"/> | ||
67 | + <constraint firstAttribute="trailing" secondItem="p7D-OG-Yvb" secondAttribute="trailing" constant="16" id="aeE-4O-uX0"/> | ||
68 | + <constraint firstItem="wur-aa-kt0" firstAttribute="leading" secondItem="1Fz-jx-xRr" secondAttribute="leading" constant="16" id="dzA-qy-Cb4"/> | ||
69 | + <constraint firstItem="wur-aa-kt0" firstAttribute="centerY" secondItem="1Fz-jx-xRr" secondAttribute="centerY" id="inn-Xl-Jd6"/> | ||
70 | + </constraints> | ||
71 | + </view> | ||
72 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ixZ-3y-Vbw"> | ||
73 | + <rect key="frame" x="0.0" y="50" width="375" height="15"/> | ||
74 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
75 | + <constraints> | ||
76 | + <constraint firstAttribute="height" constant="15" id="EhR-gh-BOo"/> | ||
77 | + </constraints> | ||
78 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
79 | + <nil key="textColor"/> | ||
80 | + <nil key="highlightedColor"/> | ||
81 | + </label> | ||
82 | + </subviews> | ||
83 | + <constraints> | ||
84 | + <constraint firstAttribute="bottom" secondItem="ixZ-3y-Vbw" secondAttribute="bottom" id="Hhs-no-unI"/> | ||
85 | + <constraint firstAttribute="trailing" secondItem="1Fz-jx-xRr" secondAttribute="trailing" id="PMA-PU-hcw"/> | ||
86 | + <constraint firstItem="1Fz-jx-xRr" firstAttribute="leading" secondItem="BHG-Ro-sxn" secondAttribute="leading" id="Voj-d0-Qey"/> | ||
87 | + <constraint firstAttribute="trailing" secondItem="ixZ-3y-Vbw" secondAttribute="trailing" id="Yzp-pT-xwG"/> | ||
88 | + <constraint firstItem="1Fz-jx-xRr" firstAttribute="top" secondItem="BHG-Ro-sxn" secondAttribute="top" id="ZeA-nu-6OB"/> | ||
89 | + <constraint firstAttribute="bottom" secondItem="1Fz-jx-xRr" secondAttribute="bottom" constant="10" id="h50-sQ-e7l"/> | ||
90 | + <constraint firstItem="ixZ-3y-Vbw" firstAttribute="leading" secondItem="BHG-Ro-sxn" secondAttribute="leading" id="xG1-Oa-Jgs"/> | ||
91 | + </constraints> | ||
92 | + </tableViewCellContentView> | ||
93 | + <connections> | ||
94 | + <outlet property="changeBtn" destination="p7D-OG-Yvb" id="AOH-ne-h5Q"/> | ||
95 | + <outlet property="name" destination="lKD-cm-cma" id="FUs-tv-gRh"/> | ||
96 | + <outlet property="titleName" destination="wur-aa-kt0" id="33B-f4-9wH"/> | ||
97 | + </connections> | ||
98 | + </tableViewCell> | ||
99 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="UserPhotoCell" rowHeight="140" id="ST2-cP-6pc" customClass="UserPhotoCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
100 | + <rect key="frame" x="0.0" y="93" width="375" height="140"/> | ||
101 | + <autoresizingMask key="autoresizingMask"/> | ||
102 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="ST2-cP-6pc" id="Sbp-Hc-H1F"> | ||
103 | + <rect key="frame" x="0.0" y="0.0" width="375" height="140"/> | ||
104 | + <autoresizingMask key="autoresizingMask"/> | ||
105 | + <subviews> | ||
106 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="uzU-Fp-mNB"> | ||
107 | + <rect key="frame" x="0.0" y="0.0" width="375" height="140"/> | ||
108 | + <subviews> | ||
109 | + <imageView contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="MvT-1n-2RV"> | ||
110 | + <rect key="frame" x="147" y="29.5" width="80" height="80"/> | ||
111 | + <gestureRecognizers/> | ||
112 | + <constraints> | ||
113 | + <constraint firstAttribute="height" constant="80" id="ilj-wE-mjh"/> | ||
114 | + <constraint firstAttribute="width" secondItem="MvT-1n-2RV" secondAttribute="height" multiplier="1:1" id="kzh-Ni-nkL"/> | ||
115 | + </constraints> | ||
116 | + </imageView> | ||
117 | + </subviews> | ||
118 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
119 | + <constraints> | ||
120 | + <constraint firstItem="MvT-1n-2RV" firstAttribute="centerX" secondItem="uzU-Fp-mNB" secondAttribute="centerX" id="ZHN-Gp-Ij9"/> | ||
121 | + <constraint firstItem="MvT-1n-2RV" firstAttribute="centerY" secondItem="uzU-Fp-mNB" secondAttribute="centerY" id="zuC-Cf-7x2"/> | ||
122 | + </constraints> | ||
123 | + </view> | ||
124 | + </subviews> | ||
125 | + <constraints> | ||
126 | + <constraint firstItem="uzU-Fp-mNB" firstAttribute="top" secondItem="Sbp-Hc-H1F" secondAttribute="top" id="Zyb-Ns-MhD"/> | ||
127 | + <constraint firstAttribute="bottom" secondItem="uzU-Fp-mNB" secondAttribute="bottom" id="jDv-GK-OaY"/> | ||
128 | + <constraint firstItem="uzU-Fp-mNB" firstAttribute="leading" secondItem="Sbp-Hc-H1F" secondAttribute="leading" id="n0L-Ff-SUt"/> | ||
129 | + <constraint firstAttribute="trailing" secondItem="uzU-Fp-mNB" secondAttribute="trailing" id="wYN-Vy-l2u"/> | ||
130 | + </constraints> | ||
131 | + </tableViewCellContentView> | ||
132 | + <connections> | ||
133 | + <outlet property="userPhoto" destination="MvT-1n-2RV" id="xxF-2C-1kE"/> | ||
134 | + </connections> | ||
135 | + </tableViewCell> | ||
136 | + </prototypes> | ||
137 | + <connections> | ||
138 | + <outlet property="dataSource" destination="e3H-9T-9vN" id="UvO-ae-JX9"/> | ||
139 | + <outlet property="delegate" destination="e3H-9T-9vN" id="BbH-AF-6nl"/> | ||
140 | + </connections> | ||
141 | + </tableView> | ||
142 | + </subviews> | ||
143 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
144 | + <constraints> | ||
145 | + <constraint firstAttribute="trailing" secondItem="7cQ-8j-yH7" secondAttribute="trailing" id="NEK-vl-XRa"/> | ||
146 | + <constraint firstItem="xWX-Qt-Zg4" firstAttribute="top" secondItem="7cQ-8j-yH7" secondAttribute="bottom" id="faO-w8-Ha9"/> | ||
147 | + <constraint firstItem="7cQ-8j-yH7" firstAttribute="leading" secondItem="sEf-LI-up1" secondAttribute="leading" id="geO-bM-2Wp"/> | ||
148 | + <constraint firstItem="7cQ-8j-yH7" firstAttribute="top" secondItem="FSu-Pn-e9e" secondAttribute="bottom" id="jn4-oS-0aN"/> | ||
149 | + </constraints> | ||
150 | + </view> | ||
151 | + <connections> | ||
152 | + <outlet property="tableView" destination="7cQ-8j-yH7" id="haS-Sg-rw6"/> | ||
153 | + </connections> | ||
154 | + </viewController> | ||
155 | + <placeholder placeholderIdentifier="IBFirstResponder" id="Ghq-3c-AqX" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
156 | + </objects> | ||
157 | + <point key="canvasLocation" x="776.79999999999995" y="-130.88455772113943"/> | ||
158 | + </scene> | ||
159 | + <!--App Setting View Controller--> | ||
160 | + <scene sceneID="eJC-vi-wHZ"> | ||
161 | + <objects> | ||
162 | + <viewController storyboardIdentifier="AppSettingViewControllerVC" id="DOf-c9-nNw" customClass="AppSettingViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | ||
163 | + <layoutGuides> | ||
164 | + <viewControllerLayoutGuide type="top" id="UTZ-Kh-YfO"/> | ||
165 | + <viewControllerLayoutGuide type="bottom" id="ZkS-Lb-DA8"/> | ||
166 | + </layoutGuides> | ||
167 | + <view key="view" contentMode="scaleToFill" id="BaA-H1-b7T"> | ||
168 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
169 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
170 | + <subviews> | ||
171 | + <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="RU1-zL-XaA"> | ||
172 | + <rect key="frame" x="0.0" y="20" width="375" height="577"/> | ||
173 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
174 | + <prototypes> | ||
175 | + <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" accessoryType="disclosureIndicator" indentationWidth="10" reuseIdentifier="cell" id="6lf-ye-czT" customClass="AppSettingCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
176 | + <rect key="frame" x="0.0" y="28" width="375" height="44"/> | ||
177 | + <autoresizingMask key="autoresizingMask"/> | ||
178 | + <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="6lf-ye-czT" id="EpN-M2-4mo"> | ||
179 | + <rect key="frame" x="0.0" y="0.0" width="342" height="44"/> | ||
180 | + <autoresizingMask key="autoresizingMask"/> | ||
181 | + <subviews> | ||
182 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wrs-53-euO"> | ||
183 | + <rect key="frame" x="16" y="11" width="42" height="21"/> | ||
184 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
185 | + <nil key="textColor"/> | ||
186 | + <nil key="highlightedColor"/> | ||
187 | + </label> | ||
188 | + </subviews> | ||
189 | + <constraints> | ||
190 | + <constraint firstItem="wrs-53-euO" firstAttribute="leading" secondItem="EpN-M2-4mo" secondAttribute="leading" constant="16" id="ce2-Gd-BXl"/> | ||
191 | + <constraint firstItem="wrs-53-euO" firstAttribute="centerY" secondItem="EpN-M2-4mo" secondAttribute="centerY" id="qO6-ij-bMv"/> | ||
192 | + </constraints> | ||
193 | + </tableViewCellContentView> | ||
194 | + <connections> | ||
195 | + <outlet property="titleName" destination="wrs-53-euO" id="ar5-gT-Peh"/> | ||
196 | + </connections> | ||
197 | + </tableViewCell> | ||
198 | + </prototypes> | ||
199 | + <connections> | ||
200 | + <outlet property="dataSource" destination="DOf-c9-nNw" id="M1L-uf-l3f"/> | ||
201 | + <outlet property="delegate" destination="DOf-c9-nNw" id="fXo-ce-spA"/> | ||
202 | + </connections> | ||
203 | + </tableView> | ||
204 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pPn-F1-n9K"> | ||
205 | + <rect key="frame" x="0.0" y="597" width="375" height="70"/> | ||
206 | + <subviews> | ||
207 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qpd-f0-dKF"> | ||
208 | + <rect key="frame" x="0.0" y="0.0" width="375" height="1"/> | ||
209 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
210 | + <constraints> | ||
211 | + <constraint firstAttribute="height" constant="1" id="45v-g5-KI8"/> | ||
212 | + </constraints> | ||
213 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
214 | + <nil key="textColor"/> | ||
215 | + <nil key="highlightedColor"/> | ||
216 | + </label> | ||
217 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CIJ-c9-Tc0"> | ||
218 | + <rect key="frame" x="50" y="11" width="274" height="48"/> | ||
219 | + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
220 | + <state key="normal" title="退出当前账号"> | ||
221 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
222 | + </state> | ||
223 | + </button> | ||
224 | + </subviews> | ||
225 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
226 | + <constraints> | ||
227 | + <constraint firstAttribute="trailing" secondItem="Qpd-f0-dKF" secondAttribute="trailing" id="7tR-mL-cT5"/> | ||
228 | + <constraint firstAttribute="height" constant="70" id="ETn-OW-sdW"/> | ||
229 | + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="top" secondItem="Qpd-f0-dKF" secondAttribute="bottom" constant="10" id="bEc-1f-7Ff"/> | ||
230 | + <constraint firstItem="Qpd-f0-dKF" firstAttribute="top" secondItem="pPn-F1-n9K" secondAttribute="top" id="cba-oN-PUb"/> | ||
231 | + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="centerY" secondItem="pPn-F1-n9K" secondAttribute="centerY" id="hyB-EM-Ohu"/> | ||
232 | + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="leading" secondItem="pPn-F1-n9K" secondAttribute="leading" constant="50" id="kCo-OY-3EF"/> | ||
233 | + <constraint firstItem="Qpd-f0-dKF" firstAttribute="leading" secondItem="pPn-F1-n9K" secondAttribute="leading" id="ojR-h1-w1Z"/> | ||
234 | + <constraint firstItem="CIJ-c9-Tc0" firstAttribute="centerX" secondItem="pPn-F1-n9K" secondAttribute="centerX" id="s4p-Dq-MJz"/> | ||
235 | + </constraints> | ||
236 | + </view> | ||
237 | + </subviews> | ||
238 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
239 | + <constraints> | ||
240 | + <constraint firstItem="pPn-F1-n9K" firstAttribute="leading" secondItem="BaA-H1-b7T" secondAttribute="leading" id="0Bi-aX-P1k"/> | ||
241 | + <constraint firstItem="ZkS-Lb-DA8" firstAttribute="top" secondItem="pPn-F1-n9K" secondAttribute="bottom" id="0r4-3W-Ify"/> | ||
242 | + <constraint firstAttribute="trailing" secondItem="pPn-F1-n9K" secondAttribute="trailing" id="K3f-78-bFd"/> | ||
243 | + <constraint firstItem="RU1-zL-XaA" firstAttribute="leading" secondItem="BaA-H1-b7T" secondAttribute="leading" id="Rpb-Ug-YCv"/> | ||
244 | + <constraint firstItem="RU1-zL-XaA" firstAttribute="top" secondItem="UTZ-Kh-YfO" secondAttribute="bottom" id="gIV-4m-XSg"/> | ||
245 | + <constraint firstAttribute="trailing" secondItem="RU1-zL-XaA" secondAttribute="trailing" id="ml9-a6-THg"/> | ||
246 | + <constraint firstItem="pPn-F1-n9K" firstAttribute="top" secondItem="RU1-zL-XaA" secondAttribute="bottom" id="voC-9E-czN"/> | ||
247 | + </constraints> | ||
248 | + </view> | ||
249 | + </viewController> | ||
250 | + <placeholder placeholderIdentifier="IBFirstResponder" id="44z-Sl-H4j" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
251 | + </objects> | ||
252 | + <point key="canvasLocation" x="1509.5999999999999" y="-131.78410794602701"/> | ||
253 | + </scene> | ||
254 | + <!--Change Pass Word View Controller--> | ||
255 | + <scene sceneID="opx-Sc-v2W"> | ||
256 | + <objects> | ||
257 | + <viewController storyboardIdentifier="ChangePassWordViewControllerVC" id="HIn-e8-Pzh" customClass="ChangePassWordViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | ||
258 | + <layoutGuides> | ||
259 | + <viewControllerLayoutGuide type="top" id="fMj-B9-eEF"/> | ||
260 | + <viewControllerLayoutGuide type="bottom" id="Gxk-Dg-G3D"/> | ||
261 | + </layoutGuides> | ||
262 | + <view key="view" contentMode="scaleToFill" id="bs0-1B-XZt" customClass="UIControl"> | ||
263 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
264 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
265 | + <subviews> | ||
266 | + <scrollView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8Vd-3T-3CR"> | ||
267 | + <rect key="frame" x="0.0" y="0.0" width="375" height="597"/> | ||
268 | + <subviews> | ||
269 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1DA-t8-OEm"> | ||
270 | + <rect key="frame" x="0.0" y="0.0" width="375" height="597"/> | ||
271 | + <subviews> | ||
272 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YjI-UW-Ova"> | ||
273 | + <rect key="frame" x="0.0" y="100" width="375" height="50"/> | ||
274 | + <subviews> | ||
275 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入您收到的验证码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="dtg-hq-Nhp"> | ||
276 | + <rect key="frame" x="20" y="17" width="147" height="17"/> | ||
277 | + <nil key="textColor"/> | ||
278 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | ||
279 | + <textInputTraits key="textInputTraits" keyboardType="numberPad"/> | ||
280 | + <connections> | ||
281 | + <outlet property="delegate" destination="HIn-e8-Pzh" id="Rk2-Rg-WTc"/> | ||
282 | + </connections> | ||
283 | + </textField> | ||
284 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lFa-PY-Lg1"> | ||
285 | + <rect key="frame" x="16" y="49" width="343" height="1"/> | ||
286 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
287 | + <constraints> | ||
288 | + <constraint firstAttribute="height" constant="1" id="Lfw-Yi-UtD"/> | ||
289 | + </constraints> | ||
290 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
291 | + <nil key="textColor"/> | ||
292 | + <nil key="highlightedColor"/> | ||
293 | + </label> | ||
294 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="i2a-hL-oad"> | ||
295 | + <rect key="frame" x="274" y="10" width="85" height="30"/> | ||
296 | + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
297 | + <state key="normal" title=" 获取验证码 "> | ||
298 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
299 | + </state> | ||
300 | + <connections> | ||
301 | + <action selector="sendUserCodeBtnClick:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Hmd-rM-a0h"/> | ||
302 | + </connections> | ||
303 | + </button> | ||
304 | + </subviews> | ||
305 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
306 | + <constraints> | ||
307 | + <constraint firstItem="i2a-hL-oad" firstAttribute="centerY" secondItem="YjI-UW-Ova" secondAttribute="centerY" id="6tN-tx-hH2"/> | ||
308 | + <constraint firstItem="lFa-PY-Lg1" firstAttribute="leading" secondItem="YjI-UW-Ova" secondAttribute="leading" constant="16" id="AUg-bg-Q14"/> | ||
309 | + <constraint firstAttribute="bottom" secondItem="lFa-PY-Lg1" secondAttribute="bottom" id="KLR-8O-Gec"/> | ||
310 | + <constraint firstItem="dtg-hq-Nhp" firstAttribute="leading" secondItem="YjI-UW-Ova" secondAttribute="leading" constant="20" id="Tbt-To-MnF"/> | ||
311 | + <constraint firstItem="lFa-PY-Lg1" firstAttribute="centerX" secondItem="YjI-UW-Ova" secondAttribute="centerX" id="UMn-tr-iSe"/> | ||
312 | + <constraint firstAttribute="height" constant="50" id="Zdw-rZ-eCg"/> | ||
313 | + <constraint firstAttribute="trailing" secondItem="i2a-hL-oad" secondAttribute="trailing" constant="16" id="nhQ-oH-HBd"/> | ||
314 | + <constraint firstItem="dtg-hq-Nhp" firstAttribute="centerY" secondItem="YjI-UW-Ova" secondAttribute="centerY" id="pYp-kV-v06"/> | ||
315 | + <constraint firstItem="i2a-hL-oad" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="dtg-hq-Nhp" secondAttribute="trailing" constant="8" id="tCf-jM-Z0F"/> | ||
316 | + </constraints> | ||
317 | + </view> | ||
318 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DSL-73-rUm"> | ||
319 | + <rect key="frame" x="0.0" y="0.0" width="375" height="50"/> | ||
320 | + <subviews> | ||
321 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请输入新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="KOX-8X-bEC"> | ||
322 | + <rect key="frame" x="20" y="17" width="335" height="17"/> | ||
323 | + <nil key="textColor"/> | ||
324 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | ||
325 | + <textInputTraits key="textInputTraits"/> | ||
326 | + <connections> | ||
327 | + <outlet property="delegate" destination="HIn-e8-Pzh" id="JRe-kh-lW4"/> | ||
328 | + </connections> | ||
329 | + </textField> | ||
330 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="xNz-Dn-QcJ"> | ||
331 | + <rect key="frame" x="16" y="49" width="343" height="1"/> | ||
332 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
333 | + <constraints> | ||
334 | + <constraint firstAttribute="height" constant="1" id="jO2-yd-Lfd"/> | ||
335 | + </constraints> | ||
336 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
337 | + <nil key="textColor"/> | ||
338 | + <nil key="highlightedColor"/> | ||
339 | + </label> | ||
340 | + </subviews> | ||
341 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
342 | + <constraints> | ||
343 | + <constraint firstAttribute="height" constant="50" id="CLT-v4-ZkO"/> | ||
344 | + <constraint firstItem="KOX-8X-bEC" firstAttribute="centerX" secondItem="DSL-73-rUm" secondAttribute="centerX" id="M4r-zi-VnB"/> | ||
345 | + <constraint firstItem="xNz-Dn-QcJ" firstAttribute="centerX" secondItem="DSL-73-rUm" secondAttribute="centerX" id="iTN-UG-68h"/> | ||
346 | + <constraint firstItem="KOX-8X-bEC" firstAttribute="leading" secondItem="DSL-73-rUm" secondAttribute="leading" constant="20" id="nTe-NB-Iit"/> | ||
347 | + <constraint firstAttribute="bottom" secondItem="xNz-Dn-QcJ" secondAttribute="bottom" id="o8H-LN-340"/> | ||
348 | + <constraint firstItem="KOX-8X-bEC" firstAttribute="centerY" secondItem="DSL-73-rUm" secondAttribute="centerY" id="oJc-1J-siL"/> | ||
349 | + <constraint firstItem="xNz-Dn-QcJ" firstAttribute="leading" secondItem="DSL-73-rUm" secondAttribute="leading" constant="16" id="uSC-7n-UlI"/> | ||
350 | + </constraints> | ||
351 | + </view> | ||
352 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="PPf-BI-ZxE"> | ||
353 | + <rect key="frame" x="0.0" y="50" width="375" height="50"/> | ||
354 | + <subviews> | ||
355 | + <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" placeholder="请重复您输入的新密码" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Qzh-5W-Fdl"> | ||
356 | + <rect key="frame" x="20" y="16.5" width="335" height="17"/> | ||
357 | + <nil key="textColor"/> | ||
358 | + <fontDescription key="fontDescription" type="system" pointSize="14"/> | ||
359 | + <textInputTraits key="textInputTraits"/> | ||
360 | + <connections> | ||
361 | + <outlet property="delegate" destination="HIn-e8-Pzh" id="3FT-zT-ACD"/> | ||
362 | + </connections> | ||
363 | + </textField> | ||
364 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="g5c-gx-Rlr"> | ||
365 | + <rect key="frame" x="16" y="49" width="343" height="1"/> | ||
366 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
367 | + <constraints> | ||
368 | + <constraint firstAttribute="height" constant="1" id="h8G-PP-6FW"/> | ||
369 | + </constraints> | ||
370 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
371 | + <nil key="textColor"/> | ||
372 | + <nil key="highlightedColor"/> | ||
373 | + </label> | ||
374 | + </subviews> | ||
375 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
376 | + <constraints> | ||
377 | + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="centerX" secondItem="PPf-BI-ZxE" secondAttribute="centerX" id="ACg-OY-kid"/> | ||
378 | + <constraint firstItem="g5c-gx-Rlr" firstAttribute="centerX" secondItem="PPf-BI-ZxE" secondAttribute="centerX" id="GIy-fQ-NqG"/> | ||
379 | + <constraint firstAttribute="bottom" secondItem="g5c-gx-Rlr" secondAttribute="bottom" id="VsV-v8-cnP"/> | ||
380 | + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="leading" secondItem="PPf-BI-ZxE" secondAttribute="leading" constant="20" id="XxL-fd-Xdk"/> | ||
381 | + <constraint firstAttribute="height" constant="50" id="Z4s-6F-BRm"/> | ||
382 | + <constraint firstItem="Qzh-5W-Fdl" firstAttribute="centerY" secondItem="PPf-BI-ZxE" secondAttribute="centerY" id="bP8-Ie-B5l"/> | ||
383 | + <constraint firstItem="g5c-gx-Rlr" firstAttribute="leading" secondItem="PPf-BI-ZxE" secondAttribute="leading" constant="16" id="mJw-dS-wNd"/> | ||
384 | + </constraints> | ||
385 | + </view> | ||
386 | + </subviews> | ||
387 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
388 | + <constraints> | ||
389 | + <constraint firstAttribute="trailing" secondItem="YjI-UW-Ova" secondAttribute="trailing" id="4og-BG-yQ2"/> | ||
390 | + <constraint firstItem="YjI-UW-Ova" firstAttribute="top" secondItem="PPf-BI-ZxE" secondAttribute="bottom" id="EVk-W9-6ha"/> | ||
391 | + <constraint firstAttribute="trailing" secondItem="PPf-BI-ZxE" secondAttribute="trailing" id="KSD-tV-fyr"/> | ||
392 | + <constraint firstAttribute="height" constant="597" id="O1w-LD-ENA"/> | ||
393 | + <constraint firstItem="DSL-73-rUm" firstAttribute="leading" secondItem="1DA-t8-OEm" secondAttribute="leading" id="P4W-fB-mdJ"/> | ||
394 | + <constraint firstItem="PPf-BI-ZxE" firstAttribute="leading" secondItem="1DA-t8-OEm" secondAttribute="leading" id="SZy-V6-tVw"/> | ||
395 | + <constraint firstItem="PPf-BI-ZxE" firstAttribute="top" secondItem="DSL-73-rUm" secondAttribute="bottom" id="YFk-eX-dg9"/> | ||
396 | + <constraint firstItem="YjI-UW-Ova" firstAttribute="leading" secondItem="1DA-t8-OEm" secondAttribute="leading" id="ZW2-Ge-UHU"/> | ||
397 | + <constraint firstItem="DSL-73-rUm" firstAttribute="top" secondItem="1DA-t8-OEm" secondAttribute="top" id="fhq-vI-7jW"/> | ||
398 | + <constraint firstAttribute="trailing" secondItem="DSL-73-rUm" secondAttribute="trailing" id="rjR-sC-f1X"/> | ||
399 | + </constraints> | ||
400 | + </view> | ||
401 | + </subviews> | ||
402 | + <constraints> | ||
403 | + <constraint firstAttribute="bottom" secondItem="1DA-t8-OEm" secondAttribute="bottom" id="SgU-Q9-eey"/> | ||
404 | + <constraint firstItem="1DA-t8-OEm" firstAttribute="centerX" secondItem="8Vd-3T-3CR" secondAttribute="centerX" id="V9c-vU-aiU"/> | ||
405 | + <constraint firstItem="1DA-t8-OEm" firstAttribute="top" secondItem="8Vd-3T-3CR" secondAttribute="top" id="c1T-M8-TiB"/> | ||
406 | + <constraint firstItem="1DA-t8-OEm" firstAttribute="leading" secondItem="8Vd-3T-3CR" secondAttribute="leading" id="dFv-uc-gPl"/> | ||
407 | + <constraint firstAttribute="trailing" secondItem="1DA-t8-OEm" secondAttribute="trailing" id="hCM-VP-Yxf"/> | ||
408 | + <constraint firstAttribute="height" constant="597" id="riU-A5-eXR"/> | ||
409 | + </constraints> | ||
410 | + </scrollView> | ||
411 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="whH-Oe-owS"> | ||
412 | + <rect key="frame" x="0.0" y="597" width="375" height="70"/> | ||
413 | + <subviews> | ||
414 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kVt-8Z-dIm"> | ||
415 | + <rect key="frame" x="0.0" y="0.0" width="375" height="1"/> | ||
416 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
417 | + <constraints> | ||
418 | + <constraint firstAttribute="height" constant="1" id="sVm-Ul-Tks"/> | ||
419 | + </constraints> | ||
420 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
421 | + <nil key="textColor"/> | ||
422 | + <nil key="highlightedColor"/> | ||
423 | + </label> | ||
424 | + <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="a1z-OP-RVi"> | ||
425 | + <rect key="frame" x="50" y="11" width="274" height="48"/> | ||
426 | + <color key="backgroundColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/> | ||
427 | + <state key="normal" title="确认修改"> | ||
428 | + <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
429 | + </state> | ||
430 | + <connections> | ||
431 | + <action selector="agrenChangePasswordBtnClick:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="qqi-Og-eWN"/> | ||
432 | + </connections> | ||
433 | + </button> | ||
434 | + </subviews> | ||
435 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
436 | + <constraints> | ||
437 | + <constraint firstAttribute="height" constant="70" id="2q1-vd-aIj"/> | ||
438 | + <constraint firstItem="a1z-OP-RVi" firstAttribute="top" secondItem="kVt-8Z-dIm" secondAttribute="bottom" constant="10" id="Cer-Vw-jgp"/> | ||
439 | + <constraint firstItem="a1z-OP-RVi" firstAttribute="centerY" secondItem="whH-Oe-owS" secondAttribute="centerY" id="JRI-y7-sxw"/> | ||
440 | + <constraint firstItem="kVt-8Z-dIm" firstAttribute="top" secondItem="whH-Oe-owS" secondAttribute="top" id="TJw-qg-Xj5"/> | ||
441 | + <constraint firstAttribute="trailing" secondItem="kVt-8Z-dIm" secondAttribute="trailing" id="Yft-zB-u6I"/> | ||
442 | + <constraint firstItem="kVt-8Z-dIm" firstAttribute="leading" secondItem="whH-Oe-owS" secondAttribute="leading" id="Yyc-Md-Jf6"/> | ||
443 | + <constraint firstItem="a1z-OP-RVi" firstAttribute="leading" secondItem="whH-Oe-owS" secondAttribute="leading" constant="50" id="bj3-p2-4Ev"/> | ||
444 | + <constraint firstItem="a1z-OP-RVi" firstAttribute="centerX" secondItem="whH-Oe-owS" secondAttribute="centerX" id="wX9-9q-dFe"/> | ||
445 | + </constraints> | ||
446 | + </view> | ||
447 | + </subviews> | ||
448 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
449 | + <constraints> | ||
450 | + <constraint firstItem="whH-Oe-owS" firstAttribute="top" secondItem="8Vd-3T-3CR" secondAttribute="bottom" id="71h-u4-NXV"/> | ||
451 | + <constraint firstAttribute="trailing" secondItem="8Vd-3T-3CR" secondAttribute="trailing" id="9MH-8S-tRA"/> | ||
452 | + <constraint firstItem="whH-Oe-owS" firstAttribute="leading" secondItem="bs0-1B-XZt" secondAttribute="leading" id="B4t-9D-S3Q"/> | ||
453 | + <constraint firstItem="8Vd-3T-3CR" firstAttribute="leading" secondItem="bs0-1B-XZt" secondAttribute="leading" id="H8g-fx-ewt"/> | ||
454 | + <constraint firstItem="Gxk-Dg-G3D" firstAttribute="top" secondItem="whH-Oe-owS" secondAttribute="bottom" id="LnM-uu-3er"/> | ||
455 | + <constraint firstItem="8Vd-3T-3CR" firstAttribute="top" secondItem="bs0-1B-XZt" secondAttribute="top" id="MkB-mh-yZy"/> | ||
456 | + <constraint firstAttribute="trailing" secondItem="whH-Oe-owS" secondAttribute="trailing" id="uLu-dR-hbo"/> | ||
457 | + </constraints> | ||
458 | + <connections> | ||
459 | + <action selector="editKeyboard:" destination="HIn-e8-Pzh" eventType="touchUpInside" id="Gqe-4a-Nym"/> | ||
460 | + </connections> | ||
461 | + </view> | ||
462 | + <connections> | ||
463 | + <outlet property="agrenPasswordTextFiled" destination="Qzh-5W-Fdl" id="NIs-ap-xHZ"/> | ||
464 | + <outlet property="passwordTextFiled" destination="KOX-8X-bEC" id="Rd7-u2-mLM"/> | ||
465 | + <outlet property="scrollView" destination="8Vd-3T-3CR" id="dEo-pi-u7a"/> | ||
466 | + <outlet property="scrollViewHeight" destination="riU-A5-eXR" id="ihQ-Ne-Y5c"/> | ||
467 | + <outlet property="userCodeTextFiled" destination="dtg-hq-Nhp" id="ZYP-US-SH2"/> | ||
468 | + </connections> | ||
469 | + </viewController> | ||
470 | + <placeholder placeholderIdentifier="IBFirstResponder" id="kXj-Be-3l7" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
471 | + </objects> | ||
472 | + <point key="canvasLocation" x="776.79999999999995" y="550.97451274362822"/> | ||
473 | + </scene> | ||
474 | + <!--History View Controller--> | ||
475 | + <scene sceneID="U2w-Je-5CE"> | ||
476 | + <objects> | ||
477 | + <viewController storyboardIdentifier="HistoryViewControllerVC" id="VUt-WI-s3d" customClass="HistoryViewController" customModule="YouerLiveVideo" customModuleProvider="target" sceneMemberID="viewController"> | ||
478 | + <layoutGuides> | ||
479 | + <viewControllerLayoutGuide type="top" id="pk3-CA-MMH"/> | ||
480 | + <viewControllerLayoutGuide type="bottom" id="liG-my-8VL"/> | ||
481 | + </layoutGuides> | ||
482 | + <view key="view" contentMode="scaleToFill" id="I80-uH-88Q"> | ||
483 | + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||
484 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
485 | + <subviews> | ||
486 | + <collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" dataMode="prototypes" translatesAutoresizingMaskIntoConstraints="NO" id="ik7-C5-cjj"> | ||
487 | + <rect key="frame" x="0.0" y="20" width="375" height="647"/> | ||
488 | + <color key="backgroundColor" red="0.93503493069999999" green="0.93562394380000002" blue="0.96585971120000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> | ||
489 | + <collectionViewFlowLayout key="collectionViewLayout" minimumLineSpacing="10" minimumInteritemSpacing="10" id="UDJ-ZI-WP1"> | ||
490 | + <size key="itemSize" width="178" height="213"/> | ||
491 | + <size key="headerReferenceSize" width="0.0" height="0.0"/> | ||
492 | + <size key="footerReferenceSize" width="0.0" height="0.0"/> | ||
493 | + <inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/> | ||
494 | + </collectionViewFlowLayout> | ||
495 | + <cells> | ||
496 | + <collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="cell" id="Aw8-Kt-490" customClass="TVStationClassCell" customModule="YouerLiveVideo" customModuleProvider="target"> | ||
497 | + <rect key="frame" x="0.0" y="0.0" width="178" height="213"/> | ||
498 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
499 | + <view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center"> | ||
500 | + <rect key="frame" x="0.0" y="0.0" width="178" height="213"/> | ||
501 | + <autoresizingMask key="autoresizingMask"/> | ||
502 | + <subviews> | ||
503 | + <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="92W-L6-BhN"> | ||
504 | + <rect key="frame" x="0.0" y="0.0" width="178" height="159"/> | ||
505 | + <constraints> | ||
506 | + <constraint firstAttribute="width" secondItem="92W-L6-BhN" secondAttribute="height" multiplier="178:159" id="2My-SZ-9FI"/> | ||
507 | + </constraints> | ||
508 | + </imageView> | ||
509 | + <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dZx-RX-5Ft"> | ||
510 | + <rect key="frame" x="0.0" y="159" width="178" height="54"/> | ||
511 | + <subviews> | ||
512 | + <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="3Lx-WS-Jds"> | ||
513 | + <rect key="frame" x="68" y="17" width="42" height="21"/> | ||
514 | + <fontDescription key="fontDescription" type="system" pointSize="17"/> | ||
515 | + <nil key="textColor"/> | ||
516 | + <nil key="highlightedColor"/> | ||
517 | + </label> | ||
518 | + </subviews> | ||
519 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
520 | + <constraints> | ||
521 | + <constraint firstItem="3Lx-WS-Jds" firstAttribute="centerY" secondItem="dZx-RX-5Ft" secondAttribute="centerY" id="8xZ-RF-Xo9"/> | ||
522 | + <constraint firstItem="3Lx-WS-Jds" firstAttribute="centerX" secondItem="dZx-RX-5Ft" secondAttribute="centerX" id="Iyc-ze-CXx"/> | ||
523 | + </constraints> | ||
524 | + </view> | ||
525 | + </subviews> | ||
526 | + </view> | ||
527 | + <constraints> | ||
528 | + <constraint firstAttribute="trailing" secondItem="92W-L6-BhN" secondAttribute="trailing" id="Hnf-FP-RYB"/> | ||
529 | + <constraint firstItem="92W-L6-BhN" firstAttribute="leading" secondItem="Aw8-Kt-490" secondAttribute="leading" id="Qsu-Xp-Ezh"/> | ||
530 | + <constraint firstItem="dZx-RX-5Ft" firstAttribute="leading" secondItem="Aw8-Kt-490" secondAttribute="leading" id="UHJ-V1-cnI"/> | ||
531 | + <constraint firstAttribute="bottom" secondItem="dZx-RX-5Ft" secondAttribute="bottom" id="bha-Pa-MlI"/> | ||
532 | + <constraint firstItem="dZx-RX-5Ft" firstAttribute="top" secondItem="92W-L6-BhN" secondAttribute="bottom" id="i5q-Ju-a8n"/> | ||
533 | + <constraint firstAttribute="trailing" secondItem="dZx-RX-5Ft" secondAttribute="trailing" id="q87-7m-rZt"/> | ||
534 | + <constraint firstItem="92W-L6-BhN" firstAttribute="top" secondItem="Aw8-Kt-490" secondAttribute="top" id="xil-Wb-gF6"/> | ||
535 | + </constraints> | ||
536 | + <connections> | ||
537 | + <outlet property="name" destination="3Lx-WS-Jds" id="2cM-U4-yyk"/> | ||
538 | + <outlet property="photo" destination="92W-L6-BhN" id="Vph-ZW-5X7"/> | ||
539 | + </connections> | ||
540 | + </collectionViewCell> | ||
541 | + </cells> | ||
542 | + <connections> | ||
543 | + <outlet property="dataSource" destination="VUt-WI-s3d" id="Jtl-TT-zJd"/> | ||
544 | + <outlet property="delegate" destination="VUt-WI-s3d" id="wNk-pR-x8E"/> | ||
545 | + </connections> | ||
546 | + </collectionView> | ||
547 | + </subviews> | ||
548 | + <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> | ||
549 | + <constraints> | ||
550 | + <constraint firstItem="ik7-C5-cjj" firstAttribute="leading" secondItem="I80-uH-88Q" secondAttribute="leading" id="QNX-pO-YVT"/> | ||
551 | + <constraint firstItem="ik7-C5-cjj" firstAttribute="top" secondItem="pk3-CA-MMH" secondAttribute="bottom" id="UPB-FM-dWr"/> | ||
552 | + <constraint firstItem="liG-my-8VL" firstAttribute="top" secondItem="ik7-C5-cjj" secondAttribute="bottom" id="lVo-nK-E5H"/> | ||
553 | + <constraint firstAttribute="trailing" secondItem="ik7-C5-cjj" secondAttribute="trailing" id="qck-4n-jmn"/> | ||
554 | + </constraints> | ||
555 | + </view> | ||
556 | + <connections> | ||
557 | + <outlet property="collectionView" destination="ik7-C5-cjj" id="ZyT-nh-hNI"/> | ||
558 | + </connections> | ||
559 | + </viewController> | ||
560 | + <placeholder placeholderIdentifier="IBFirstResponder" id="XL0-Rz-rxn" userLabel="First Responder" sceneMemberID="firstResponder"/> | ||
561 | + </objects> | ||
562 | + <point key="canvasLocation" x="2237.5999999999999" y="-131.78410794602701"/> | ||
563 | + </scene> | ||
564 | + </scenes> | ||
10 | </document> | 565 | </document> |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserEditViewController.swift
0 → 100644
@@ -0,0 +1,222 @@ | @@ -0,0 +1,222 @@ | ||
1 | +// | ||
2 | +// UserEditViewController.swift | ||
3 | +// YouerLiveVideo | ||
4 | +// | ||
5 | +// Created by 左丞 on 2017/5/23. | ||
6 | +// Copyright © 2017年 左丞. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +import UIKit | ||
10 | + | ||
11 | +class UserEditViewController: UIViewController ,UIImagePickerControllerDelegate,UINavigationControllerDelegate{ | ||
12 | + | ||
13 | + @IBOutlet weak var tableView: UITableView! | ||
14 | + | ||
15 | + | ||
16 | + var user = AppDelegate.instance().accountManager | ||
17 | + var titleArr:[String] = ["昵称","账号","身份","所属学校"] | ||
18 | + var contentArr:[String] = [] | ||
19 | + override func viewDidLoad() { | ||
20 | + super.viewDidLoad() | ||
21 | + setContentArr() | ||
22 | + // Do any additional setup after loading the view. | ||
23 | + } | ||
24 | + | ||
25 | + func setContentArr(){ | ||
26 | + var ident = "" | ||
27 | + if user.isParent(){ | ||
28 | + ident = "家长" | ||
29 | + }else{ | ||
30 | + ident = "教师" | ||
31 | + } | ||
32 | + contentArr = [user.name(),user.userid,ident,user.schoolName()] | ||
33 | + } | ||
34 | + | ||
35 | + override func viewWillAppear(_ animated: Bool) { | ||
36 | + super.viewWillAppear(animated) | ||
37 | + self.tabBarController?.tabBar.isHidden = true | ||
38 | + } | ||
39 | + | ||
40 | + override func viewWillDisappear(_ animated: Bool) { | ||
41 | + super.viewWillDisappear(animated) | ||
42 | + self.tabBarController?.hidesBottomBarWhenPushed = false | ||
43 | + } | ||
44 | + | ||
45 | + | ||
46 | + | ||
47 | + override func didReceiveMemoryWarning() { | ||
48 | + super.didReceiveMemoryWarning() | ||
49 | + // Dispose of any resources that can be recreated. | ||
50 | + } | ||
51 | + | ||
52 | + | ||
53 | + // MARK: -UIImagePickerControllerDelegate | ||
54 | + func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { | ||
55 | + picker.dismiss(animated: true, completion: { () -> Void in | ||
56 | + var oimage = info[UIImagePickerControllerOriginalImage] as? UIImage | ||
57 | + oimage = oimage!.imageScaledToScale() | ||
58 | + let filePath=FilesManager.imageFilePath(String(format:"%f.jpg",Date().timeIntervalSince1970)) | ||
59 | + try? UIImageJPEGRepresentation(oimage!,0.7)!.write(to: URL(fileURLWithPath: filePath), options: [.atomic]) | ||
60 | + self.updateImage(file: filePath) | ||
61 | + }) | ||
62 | + } | ||
63 | + func updateImage(file:String){ | ||
64 | + SVProgressHUD.show(withStatus: "图片上传中...") | ||
65 | + SVProgressHUD.setDefaultMaskType(.black) | ||
66 | + AppDelegate.instance().httpServer.uploadFile(file: NSURL(fileURLWithPath: file)) { (str, error) in | ||
67 | + SVProgressHUD.dismiss() | ||
68 | + if error == nil{ | ||
69 | + if JSON.fromString(jsonString: str)!["status"].intValue == 1{ | ||
70 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | ||
71 | + let str=json.contentData().arrayValue[0].stringValue | ||
72 | + AppDelegate.instance().httpServer.postUpdateUser(parameters: ["nickname":self.user.name() as AnyObject,"headimg":str as AnyObject], completionHandler: { (str, error) in | ||
73 | + if error == nil{ | ||
74 | + if JSON.fromString(jsonString: str)!["status"].intValue == 1{ | ||
75 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | ||
76 | + AppDelegate.instance().accountManager.refreshUserInfo(completionHandler: { (finish) in | ||
77 | + if finish{ | ||
78 | + self.user=AppDelegate.instance().accountManager | ||
79 | + self.tableView.reloadData() | ||
80 | + } | ||
81 | + }) | ||
82 | + }, failHandler: { (error) in | ||
83 | + self.view.makeToast("头像修改失败") | ||
84 | + }) | ||
85 | + }else{ | ||
86 | + self.view.makeToast("头像修改失败") | ||
87 | + } | ||
88 | + } | ||
89 | + }) | ||
90 | + }, failHandler: { (error) in | ||
91 | + self.view.makeToast("图片上传失败") | ||
92 | + }) | ||
93 | + }else{ | ||
94 | + self.view.makeToast("图片上传失败") | ||
95 | + } | ||
96 | + } | ||
97 | + } | ||
98 | + } | ||
99 | + | ||
100 | + | ||
101 | + /* | ||
102 | + // MARK: - Navigation | ||
103 | + | ||
104 | + // In a storyboard-based application, you will often want to do a little preparation before navigation | ||
105 | + override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | ||
106 | + // Get the new view controller using segue.destinationViewController. | ||
107 | + // Pass the selected object to the new view controller. | ||
108 | + } | ||
109 | + */ | ||
110 | + | ||
111 | +} | ||
112 | + | ||
113 | +extension UserEditViewController:UITableViewDelegate,UITableViewDataSource{ | ||
114 | + | ||
115 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
116 | + switch indexPath.row { | ||
117 | + case 0: | ||
118 | + let action=UIAlertController(title:"修改头像",message:nil,preferredStyle:UIAlertControllerStyle.actionSheet) | ||
119 | + let photoAction=UIAlertAction(title: "从相册选择", style: UIAlertActionStyle.default) { (action) in | ||
120 | + if cameraOrPhotPermissions(0, view: self.view){ | ||
121 | + let vc = UIImagePickerController() | ||
122 | + vc.delegate = self | ||
123 | + vc.sourceType = .photoLibrary | ||
124 | + self.present(vc, animated: true, completion: nil) | ||
125 | + } | ||
126 | + } | ||
127 | + let cancleAction=UIAlertAction(title: "取消", style: UIAlertActionStyle.cancel) { (action) in | ||
128 | + } | ||
129 | + action.addAction(photoAction) | ||
130 | + action.addAction(cancleAction) | ||
131 | + self.present(action, animated: true, completion: nil) | ||
132 | + case 1: | ||
133 | + let alert=UIAlertController(title: "修改昵称", message: nil, preferredStyle: UIAlertControllerStyle.alert) | ||
134 | + let cancle=UIAlertAction(title: "取消", style: UIAlertActionStyle.cancel, handler: nil) | ||
135 | + let get=UIAlertAction(title: "修改", style: UIAlertActionStyle.default, handler: { (action) in | ||
136 | + if alert.textFields![0].text != "" { | ||
137 | + AppDelegate.instance().httpServer.postUpdateUser(parameters: ["nickname":alert.textFields![0].text! as AnyObject,"headimg":self.user.photo() as AnyObject], completionHandler: { (str, error) in | ||
138 | + if error == nil{ | ||
139 | + if JSON.fromString(jsonString: str)!["status"].intValue == 1{ | ||
140 | + httpJsonResule(jsonString: str, error: error, successHandler: { (json) in | ||
141 | + self.view.makeToast("昵称修改成功") | ||
142 | + AppDelegate.instance().accountManager.refreshUserInfo(completionHandler: { (finish) in | ||
143 | + if finish{ | ||
144 | + self.user=AppDelegate.instance().accountManager | ||
145 | + self.setContentArr() | ||
146 | + self.tableView.reloadData() | ||
147 | + } | ||
148 | + }) | ||
149 | + }, failHandler: { (error) in | ||
150 | + self.view.makeToast("昵称修改失败") | ||
151 | + }) | ||
152 | + }else{ | ||
153 | + self.view.makeToast("昵称修改失败") | ||
154 | + } | ||
155 | + } | ||
156 | + }) | ||
157 | + }else{ | ||
158 | + self.view.makeToast("昵称修改不能为空") | ||
159 | + } | ||
160 | + }) | ||
161 | + alert.addTextField(configurationHandler: { (textfield) in | ||
162 | + textfield.placeholder="请输入修改的昵称" | ||
163 | + }) | ||
164 | + alert.addAction(cancle) | ||
165 | + alert.addAction(get) | ||
166 | + self.present(alert, animated: true, completion: nil) | ||
167 | + break | ||
168 | + default: | ||
169 | + return | ||
170 | + } | ||
171 | + } | ||
172 | + | ||
173 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
174 | + if indexPath.row == 0{ | ||
175 | + let cell = tableView.dequeueReusableCell(withIdentifier: "UserPhotoCell") as! UserPhotoCell | ||
176 | + cell.userPhoto.sd_setImage(with: URL(string:self.user.photo()), placeholderImage: #imageLiteral(resourceName: "defphoto.png")) | ||
177 | + return cell | ||
178 | + }else{ | ||
179 | + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! UserEditCell | ||
180 | + cell.titleName.text = titleArr[indexPath.row-1] | ||
181 | + cell.name.text = contentArr[indexPath.row-1] | ||
182 | + if indexPath.row == 0{ | ||
183 | + cell.changeBtn.isHidden = false | ||
184 | + cell.changeBtn.tag = indexPath.row+100 | ||
185 | + } | ||
186 | + return cell | ||
187 | + } | ||
188 | + } | ||
189 | + | ||
190 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
191 | + return titleArr.count+1 | ||
192 | + } | ||
193 | + | ||
194 | + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { | ||
195 | + if indexPath.row == 0{ | ||
196 | + return 140 | ||
197 | + } | ||
198 | + return 65 | ||
199 | + } | ||
200 | + | ||
201 | + | ||
202 | +} | ||
203 | + | ||
204 | +class UserEditCell: UITableViewCell { | ||
205 | + | ||
206 | + @IBOutlet weak var changeBtn: UILabel! | ||
207 | + @IBOutlet weak var titleName: UILabel! | ||
208 | + @IBOutlet weak var name: UILabel! | ||
209 | + override func awakeFromNib() { | ||
210 | + changeBtn.isHidden = true | ||
211 | + } | ||
212 | +} | ||
213 | + | ||
214 | +class UserPhotoCell:UITableViewCell{ | ||
215 | + | ||
216 | + @IBOutlet weak var userPhoto: UIImageView! | ||
217 | + | ||
218 | + override func awakeFromNib() { | ||
219 | + userPhoto.layer.cornerRadius = userPhoto.frame.size.height/2 | ||
220 | + userPhoto.layer.masksToBounds = true | ||
221 | + } | ||
222 | +} |
YouerLiveVideo/YouerLiveVideo/controllers/User/UserViewController.swift
@@ -10,17 +10,60 @@ import UIKit | @@ -10,17 +10,60 @@ import UIKit | ||
10 | 10 | ||
11 | class UserViewController: UIViewController { | 11 | class UserViewController: UIViewController { |
12 | 12 | ||
13 | + | ||
14 | + @IBOutlet weak var historyList: UITableView! | ||
15 | + @IBOutlet weak var userName: UILabel! | ||
16 | + @IBOutlet weak var userPhoto: UIImageView! | ||
17 | + var historyType:[String] = ["资源历史","微课历史"] | ||
18 | + var myResourceType:[String] = ["我的资源","我的微课"] | ||
19 | + var sectionList:[String] = ["历史记录","我的"] | ||
20 | + var isCloseHistoryList:Bool = false | ||
21 | + var isCloseMyResource:Bool = false | ||
13 | override func viewDidLoad() { | 22 | override func viewDidLoad() { |
14 | super.viewDidLoad() | 23 | super.viewDidLoad() |
15 | self.configTheme() | 24 | self.configTheme() |
25 | + self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "radio_s"), style: .plain, target: self, action: #selector(UserViewController.editBtnClick)) | ||
26 | + setUserInfor() | ||
16 | // Do any additional setup after loading the view. | 27 | // Do any additional setup after loading the view. |
17 | } | 28 | } |
29 | + | ||
30 | + func setUserInfor(){ | ||
31 | + userPhoto.layer.cornerRadius = userPhoto.frame.size.height/2 | ||
32 | + userPhoto.layer.masksToBounds = true | ||
33 | + userName.text = AppDelegate.instance().accountManager.name() | ||
34 | + userPhoto.sd_setImage(with: URL(string: AppDelegate.instance().accountManager.photo()), placeholderImage: #imageLiteral(resourceName: "defphoto.png")) | ||
35 | + | ||
36 | + } | ||
18 | 37 | ||
19 | override func didReceiveMemoryWarning() { | 38 | override func didReceiveMemoryWarning() { |
20 | super.didReceiveMemoryWarning() | 39 | super.didReceiveMemoryWarning() |
21 | // Dispose of any resources that can be recreated. | 40 | // Dispose of any resources that can be recreated. |
22 | } | 41 | } |
23 | 42 | ||
43 | + @IBAction func userEditClcik(_ sender: Any) { | ||
44 | + let vc = Story.instantiateViewControllerWithIdentifier("UserEditViewControllerVC", storyName: "User") as! UserEditViewController | ||
45 | + self.navigationController?.pushViewController(vc, animated: true) | ||
46 | + } | ||
47 | + | ||
48 | + func editBtnClick(){ | ||
49 | + let vc = Story.instantiateViewControllerWithIdentifier("AppSettingViewControllerVC", storyName: "User") as! AppSettingViewController | ||
50 | + vc.title = "设置" | ||
51 | + self.navigationController?.pushViewController(vc, animated: true) | ||
52 | + } | ||
53 | + | ||
54 | + func headerTap(tap:UITapGestureRecognizer){ | ||
55 | + if tap.view?.tag == 200{ | ||
56 | + isCloseHistoryList = !isCloseHistoryList | ||
57 | + }else{ | ||
58 | + isCloseMyResource = !isCloseMyResource | ||
59 | + } | ||
60 | + historyList.reloadData() | ||
61 | + } | ||
62 | + | ||
63 | + override func viewWillAppear(_ animated: Bool) { | ||
64 | + super.viewWillAppear(animated) | ||
65 | + self.tabBarController?.tabBar.isHidden = false | ||
66 | + } | ||
24 | 67 | ||
25 | /* | 68 | /* |
26 | // MARK: - Navigation | 69 | // MARK: - Navigation |
@@ -33,3 +76,89 @@ class UserViewController: UIViewController { | @@ -33,3 +76,89 @@ class UserViewController: UIViewController { | ||
33 | */ | 76 | */ |
34 | 77 | ||
35 | } | 78 | } |
79 | + | ||
80 | +extension UserViewController:UITableViewDelegate,UITableViewDataSource{ | ||
81 | + | ||
82 | + | ||
83 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | ||
84 | + let vc = Story.instantiateViewControllerWithIdentifier("HistoryViewControllerVC", storyName: "User") as! HistoryViewController | ||
85 | + vc.type = indexPath.row | ||
86 | + vc.isHistory = indexPath.section | ||
87 | + vc.title = historyType[indexPath.row] | ||
88 | + self.navigationController?.pushViewController(vc, animated: true) | ||
89 | + } | ||
90 | + | ||
91 | + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | ||
92 | + let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as! UserCenterHistoryCell | ||
93 | + cell.titleName.text = historyType[indexPath.row] | ||
94 | + return cell | ||
95 | + } | ||
96 | + | ||
97 | + func numberOfSections(in tableView: UITableView) -> Int { | ||
98 | + return sectionList.count | ||
99 | + } | ||
100 | + | ||
101 | + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | ||
102 | + if section == 0{ | ||
103 | + if isCloseHistoryList{ | ||
104 | + return 0 | ||
105 | + } | ||
106 | + return historyType.count | ||
107 | + }else if section == 1{ | ||
108 | + if isCloseMyResource{ | ||
109 | + return 0 | ||
110 | + } | ||
111 | + return myResourceType.count | ||
112 | + }else{ | ||
113 | + return 0 | ||
114 | + } | ||
115 | + } | ||
116 | + | ||
117 | + func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { | ||
118 | + let headerView = UIView(frame: CGRect(x: 0, y: 0, width: getScreenWidth(), height: 44)) | ||
119 | + headerView.backgroundColor = UIColor.white | ||
120 | + let label = UILabel(frame: CGRect(x: 8, y: headerView.frame.height/2-10, width: 100, height: 21)) | ||
121 | + label.text = sectionList[section] | ||
122 | + label.sizeToFit() | ||
123 | + headerView.addSubview(label) | ||
124 | + | ||
125 | + let image = UIImageView(frame: CGRect(x: 0, y: 0, width: 9, height: 15)) | ||
126 | + image.center = CGPoint(x: getScreenWidth() - 20, y: headerView.frame.height/2) | ||
127 | + image.image = #imageLiteral(resourceName: "arrow") | ||
128 | + image.isUserInteractionEnabled = true | ||
129 | + var angle:Double = 0 | ||
130 | + if !isCloseHistoryList && section == 0{ | ||
131 | + angle = M_PI_2 | ||
132 | + } | ||
133 | + if !isCloseMyResource && section == 1{ | ||
134 | + angle = M_PI_2 | ||
135 | + } | ||
136 | + image.transform = CGAffineTransform(rotationAngle: CGFloat(angle)) | ||
137 | + headerView.addSubview(image) | ||
138 | + | ||
139 | + let line = UILabel(frame: CGRect(x: 0, y: headerView.frame.height-1, width: getScreenWidth(), height: 1)) | ||
140 | + line.backgroundColor = historyList.backgroundColor | ||
141 | + headerView.addSubview(line) | ||
142 | + headerView.tag = 200+section | ||
143 | + headerView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(UserViewController.headerTap(tap:)))) | ||
144 | + return headerView | ||
145 | + } | ||
146 | + | ||
147 | + func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { | ||
148 | + return 44 | ||
149 | + } | ||
150 | + | ||
151 | + func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { | ||
152 | + return 1 | ||
153 | + } | ||
154 | + | ||
155 | +} | ||
156 | + | ||
157 | +class UserCenterHistoryCell:UITableViewCell{ | ||
158 | + | ||
159 | + @IBOutlet weak var titleName: UILabel! | ||
160 | + | ||
161 | + | ||
162 | + | ||
163 | +} | ||
164 | + |
YouerLiveVideo/YouerLiveVideo/util/account.swift
@@ -71,6 +71,20 @@ class AccountManager{ | @@ -71,6 +71,20 @@ class AccountManager{ | ||
71 | return "" | 71 | return "" |
72 | } | 72 | } |
73 | 73 | ||
74 | + func schoolName()->String{ | ||
75 | + if let info=rawUserInfo{ | ||
76 | + return info.contentData()["f_SchoolName"].stringValue | ||
77 | + } | ||
78 | + return "" | ||
79 | + } | ||
80 | + | ||
81 | + func isParent()->Bool{ | ||
82 | + if let info=rawUserInfo{ | ||
83 | + return info.contentData()["f_Identity"].boolValue | ||
84 | + } | ||
85 | + return false | ||
86 | + } | ||
87 | + | ||
74 | 88 | ||
75 | func logOut(){ | 89 | func logOut(){ |
76 | //退出云信登录 | 90 | //退出云信登录 |