Commit 1b84b084eab999bea4e51e21fdf274418288dc01

Authored by 朱林
2 parents 26d467de f7f68bfc

Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud

Conflicts:
	LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
	LiveVideoCloud/LiveVideoCloud/AppDelegate/AppDelegate.m
Showing 23 changed files with 343 additions and 90 deletions
LiveVideoCloud/LiveVideoCloud.xcodeproj/project.pbxproj
@@ -191,6 +191,7 @@ @@ -191,6 +191,7 @@
191 D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; }; 191 D2888DB11E6EC05F003A77C8 /* TempViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB01E6EC05F003A77C8 /* TempViewController.m */; };
192 D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB31E6EC154003A77C8 /* HomeViewController.m */; }; 192 D2888DB41E6EC154003A77C8 /* HomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB31E6EC154003A77C8 /* HomeViewController.m */; };
193 D2888DB71E6EC1B8003A77C8 /* LVCMyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */; }; 193 D2888DB71E6EC1B8003A77C8 /* LVCMyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */; };
  194 + D28F5FFF1E8BC7EF00914142 /* LVCUGCLiveListView.m in Sources */ = {isa = PBXBuildFile; fileRef = D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */; };
194 D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */; }; 195 D29D88481E88C53300543A03 /* LVCUGCLivePrepareView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */; };
195 D29E81ED1E88DC5B008C9906 /* PriChatCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D29E81EC1E88DC5B008C9906 /* PriChatCell.m */; }; 196 D29E81ED1E88DC5B008C9906 /* PriChatCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D29E81EC1E88DC5B008C9906 /* PriChatCell.m */; };
196 D2A089E81E89FA720071412C /* LVCUGCLivePlayerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */; }; 197 D2A089E81E89FA720071412C /* LVCUGCLivePlayerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */; };
@@ -206,7 +207,6 @@ @@ -206,7 +207,6 @@
206 D2B7B2511E8247D400ED084E /* ChatBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2501E8247D400ED084E /* ChatBarrageManager.m */; }; 207 D2B7B2511E8247D400ED084E /* ChatBarrageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2501E8247D400ED084E /* ChatBarrageManager.m */; };
207 D2B7B2541E824B2D00ED084E /* ChatBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2531E824B2D00ED084E /* ChatBarrageView.m */; }; 208 D2B7B2541E824B2D00ED084E /* ChatBarrageView.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2531E824B2D00ED084E /* ChatBarrageView.m */; };
208 D2B7B2571E8261EF00ED084E /* ChatBarrOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2561E8261EF00ED084E /* ChatBarrOperation.m */; }; 209 D2B7B2571E8261EF00ED084E /* ChatBarrOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = D2B7B2561E8261EF00ED084E /* ChatBarrOperation.m */; };
209 - D2CC7B871E891AA50034B8BF /* LVCUGCLiveListController.m in Sources */ = {isa = PBXBuildFile; fileRef = D2CC7B861E891AA50034B8BF /* LVCUGCLiveListController.m */; };  
210 D2D236B41E88F8E600B7C517 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */; }; 210 D2D236B41E88F8E600B7C517 /* CNLiveChatManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */; };
211 D2D236B51E88F8E600B7C517 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */; }; 211 D2D236B51E88F8E600B7C517 /* CNLiveMsgTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */; };
212 D2D7D18D1E8A581000217771 /* timg.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = D2D7D18C1E8A581000217771 /* timg.jpeg */; }; 212 D2D7D18D1E8A581000217771 /* timg.jpeg in Resources */ = {isa = PBXBuildFile; fileRef = D2D7D18C1E8A581000217771 /* timg.jpeg */; };
@@ -628,6 +628,8 @@ @@ -628,6 +628,8 @@
628 D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; }; 628 D2888DB31E6EC154003A77C8 /* HomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeViewController.m; sourceTree = "<group>"; };
629 D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMyViewController.h; sourceTree = "<group>"; }; 629 D2888DB51E6EC1B8003A77C8 /* LVCMyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCMyViewController.h; sourceTree = "<group>"; };
630 D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMyViewController.m; sourceTree = "<group>"; }; 630 D2888DB61E6EC1B8003A77C8 /* LVCMyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCMyViewController.m; sourceTree = "<group>"; };
  631 + D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVCUGCLiveListView.h; path = ../Controller/LVCUGCLiveListView.h; sourceTree = "<group>"; };
  632 + D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LVCUGCLiveListView.m; path = ../Controller/LVCUGCLiveListView.m; sourceTree = "<group>"; };
631 D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePrepareView.h; sourceTree = "<group>"; }; 633 D29D88461E88C53300543A03 /* LVCUGCLivePrepareView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLivePrepareView.h; sourceTree = "<group>"; };
632 D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePrepareView.m; sourceTree = "<group>"; }; 634 D29D88471E88C53300543A03 /* LVCUGCLivePrepareView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLivePrepareView.m; sourceTree = "<group>"; };
633 D29E81EB1E88DC5B008C9906 /* PriChatCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PriChatCell.h; sourceTree = "<group>"; }; 635 D29E81EB1E88DC5B008C9906 /* PriChatCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PriChatCell.h; sourceTree = "<group>"; };
@@ -650,8 +652,6 @@ @@ -650,8 +652,6 @@
650 D2B7B2531E824B2D00ED084E /* ChatBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageView.m; sourceTree = "<group>"; }; 652 D2B7B2531E824B2D00ED084E /* ChatBarrageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrageView.m; sourceTree = "<group>"; };
651 D2B7B2551E8261EF00ED084E /* ChatBarrOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrOperation.h; sourceTree = "<group>"; }; 653 D2B7B2551E8261EF00ED084E /* ChatBarrOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChatBarrOperation.h; sourceTree = "<group>"; };
652 D2B7B2561E8261EF00ED084E /* ChatBarrOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrOperation.m; sourceTree = "<group>"; }; 654 D2B7B2561E8261EF00ED084E /* ChatBarrOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChatBarrOperation.m; sourceTree = "<group>"; };
653 - D2CC7B851E891AA50034B8BF /* LVCUGCLiveListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LVCUGCLiveListController.h; sourceTree = "<group>"; };  
654 - D2CC7B861E891AA50034B8BF /* LVCUGCLiveListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LVCUGCLiveListController.m; sourceTree = "<group>"; };  
655 D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; }; 655 D2D236B21E88F8E600B7C517 /* CNLiveChatManager.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveChatManager.framework; sourceTree = "<group>"; };
656 D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; }; 656 D2D236B31E88F8E600B7C517 /* CNLiveMsgTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveMsgTools.framework; sourceTree = "<group>"; };
657 D2D7D18C1E8A581000217771 /* timg.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = timg.jpeg; sourceTree = "<group>"; }; 657 D2D7D18C1E8A581000217771 /* timg.jpeg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = timg.jpeg; sourceTree = "<group>"; };
@@ -1684,8 +1684,6 @@ @@ -1684,8 +1684,6 @@
1684 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */, 1684 810B64E21E779AFE00133E15 /* LVCLivePlayerController.m */,
1685 810B65081E77B39D00133E15 /* LVCFullScreenPlayerController.h */, 1685 810B65081E77B39D00133E15 /* LVCFullScreenPlayerController.h */,
1686 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */, 1686 810B65091E77B39D00133E15 /* LVCFullScreenPlayerController.m */,
1687 - D2CC7B851E891AA50034B8BF /* LVCUGCLiveListController.h */,  
1688 - D2CC7B861E891AA50034B8BF /* LVCUGCLiveListController.m */,  
1689 D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */, 1687 D25BF87E1E7BD266007FB138 /* LVCUGCLivePlayerController.h */,
1690 D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */, 1688 D25BF87F1E7BD266007FB138 /* LVCUGCLivePlayerController.m */,
1691 81A483151E88BED00097A80A /* LVCTVLiveViewController.h */, 1689 81A483151E88BED00097A80A /* LVCTVLiveViewController.h */,
@@ -1719,6 +1717,8 @@ @@ -1719,6 +1717,8 @@
1719 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */, 1717 8112D4301E7927A5002E00F6 /* LVCPlayerLoadingView.m */,
1720 81CE9E191E8CF567000F8F6B /* LVCRequestFailedView.h */, 1718 81CE9E191E8CF567000F8F6B /* LVCRequestFailedView.h */,
1721 81CE9E1A1E8CF567000F8F6B /* LVCRequestFailedView.m */, 1719 81CE9E1A1E8CF567000F8F6B /* LVCRequestFailedView.m */,
  1720 + D28F5FFD1E8BC7EF00914142 /* LVCUGCLiveListView.h */,
  1721 + D28F5FFE1E8BC7EF00914142 /* LVCUGCLiveListView.m */,
1722 D2A089E61E89FA720071412C /* LVCUGCLivePlayerCell.h */, 1722 D2A089E61E89FA720071412C /* LVCUGCLivePlayerCell.h */,
1723 D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */, 1723 D2A089E71E89FA720071412C /* LVCUGCLivePlayerCell.m */,
1724 D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */, 1724 D25BF8811E7F775F007FB138 /* LVCUGCPlayerLoadingView.h */,
@@ -1936,6 +1936,7 @@ @@ -1936,6 +1936,7 @@
1936 D2029CB81E6EADE10027CD92 /* SDImageCache.m in Sources */, 1936 D2029CB81E6EADE10027CD92 /* SDImageCache.m in Sources */,
1937 D2029CBB1E6EADE10027CD92 /* SDWebImageDownloader.m in Sources */, 1937 D2029CBB1E6EADE10027CD92 /* SDWebImageDownloader.m in Sources */,
1938 D2029CA71E6EADE10027CD92 /* MJRefreshAutoGifFooter.m in Sources */, 1938 D2029CA71E6EADE10027CD92 /* MJRefreshAutoGifFooter.m in Sources */,
  1939 + D28F5FFF1E8BC7EF00914142 /* LVCUGCLiveListView.m in Sources */,
1939 D2029CC11E6EADE10027CD92 /* UIImage+MultiFormat.m in Sources */, 1940 D2029CC11E6EADE10027CD92 /* UIImage+MultiFormat.m in Sources */,
1940 D245715F1E83B09900AA85D6 /* userInfoModel.m in Sources */, 1941 D245715F1E83B09900AA85D6 /* userInfoModel.m in Sources */,
1941 D2029C861E6EADE10027CD92 /* Tools.m in Sources */, 1942 D2029C861E6EADE10027CD92 /* Tools.m in Sources */,
@@ -2069,7 +2070,6 @@ @@ -2069,7 +2070,6 @@
2069 D2029D081E6EAE2E0027CD92 /* ZXDeviceInfo.m in Sources */, 2070 D2029D081E6EAE2E0027CD92 /* ZXDeviceInfo.m in Sources */,
2070 D24571631E83C40B00AA85D6 /* PrivateView.m in Sources */, 2071 D24571631E83C40B00AA85D6 /* PrivateView.m in Sources */,
2071 D2029CC21E6EADE10027CD92 /* UIImage+WebP.m in Sources */, 2072 D2029CC21E6EADE10027CD92 /* UIImage+WebP.m in Sources */,
2072 - D2CC7B871E891AA50034B8BF /* LVCUGCLiveListController.m in Sources */,  
2073 D2029BCD1E6EADD70027CD92 /* BaseViewController.m in Sources */, 2073 D2029BCD1E6EADD70027CD92 /* BaseViewController.m in Sources */,
2074 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */, 2074 810B64E01E779AE900133E15 /* LVCPlayer.m in Sources */,
2075 810B64FF1E779B1F00133E15 /* MASConstraint.m in Sources */, 2075 810B64FF1E779B1F00133E15 /* MASConstraint.m in Sources */,
LiveVideoCloud/LiveVideoCloud/AppDelegate/AppDelegate.m
@@ -44,7 +44,8 @@ @@ -44,7 +44,8 @@
44 */ 44 */
45 45
46 // 20170327 20170328 46 // 20170327 20170328
47 - CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"20170311" name:@"zzllzzzll" portrait:@"https://y3.cnliveimg.com/mobile/images/mobilehead/2017/03/30/1490844962259_small.jpg"]; 47 +
  48 + CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"20170328" name:@"20170328" portrait:@""];
48 [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) { 49 [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) {
49 NSLog(@"连接服务器-----success"); 50 NSLog(@"连接服务器-----success");
50 51
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Chat/ChatMsgModel/chatMsgModel.m
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 //如果计算过高度,直接返回 35 //如果计算过高度,直接返回
36 if (_priCellHeight) return _priCellHeight; 36 if (_priCellHeight) return _priCellHeight;
37 37
38 - _priCellHeight = 10; 38 + _priCellHeight = 30;
39 NSString *content = self.content; 39 NSString *content = self.content;
40 //文字 40 //文字
41 CGFloat textMaxW = self.priCellWidth; 41 CGFloat textMaxW = self.priCellWidth;
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/ComboCell.m
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 11
12 @interface ComboCell () 12 @interface ComboCell ()
13 13
14 -@property (nonatomic ,strong) UIView * _Nullable bgView; 14 +@property (nonatomic ,strong) UIImageView * _Nullable bgView;
15 @property (nonatomic ,strong) UIImageView * _Nullable icon; 15 @property (nonatomic ,strong) UIImageView * _Nullable icon;
16 @property (nonatomic ,strong) UILabel * _Nullable senderNameLbl; 16 @property (nonatomic ,strong) UILabel * _Nullable senderNameLbl;
17 @property (nonatomic ,strong) UILabel * _Nullable giftNameLbl; 17 @property (nonatomic ,strong) UILabel * _Nullable giftNameLbl;
@@ -43,6 +43,7 @@ @@ -43,6 +43,7 @@
43 self.senderNameLbl.size = [self.senderNameLbl labelSize]; 43 self.senderNameLbl.size = [self.senderNameLbl labelSize];
44 self.giftNameLbl.size = [self.giftNameLbl labelSize]; 44 self.giftNameLbl.size = [self.giftNameLbl labelSize];
45 self.bgView.frame = CGRectMake(0, 0, self.width, self.height); 45 self.bgView.frame = CGRectMake(0, 0, self.width, self.height);
  46 + self.bgView.image = [UIImage imageNamed:@"背景220x40"];
46 self.bgView.layer.cornerRadius = self.height * 0.5; 47 self.bgView.layer.cornerRadius = self.height * 0.5;
47 self.giftImage.frame = CGRectMake(self.width - self.height, 0, self.height, self.height); 48 self.giftImage.frame = CGRectMake(self.width - self.height, 0, self.height, self.height);
48 self.giftImage.image = [UIImage imageNamed:model.giftImageName]; 49 self.giftImage.image = [UIImage imageNamed:model.giftImageName];
@@ -68,7 +69,7 @@ @@ -68,7 +69,7 @@
68 { 69 {
69 _senderNameLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.icon.right + 5, 0, 100, 20)]; 70 _senderNameLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.icon.right + 5, 0, 100, 20)];
70 _senderNameLbl.font = [UIFont systemFontOfSize:kContentFont]; 71 _senderNameLbl.font = [UIFont systemFontOfSize:kContentFont];
71 - _senderNameLbl.textColor = [UIColor blackColor]; 72 + _senderNameLbl.textColor = [UIColor whiteColor];
72 } 73 }
73 return _senderNameLbl; 74 return _senderNameLbl;
74 } 75 }
@@ -79,7 +80,7 @@ @@ -79,7 +80,7 @@
79 { 80 {
80 _giftNameLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.icon.right + 5, self.senderNameLbl.bottom , 100, 20)]; 81 _giftNameLbl = [[UILabel alloc] initWithFrame:CGRectMake(self.icon.right + 5, self.senderNameLbl.bottom , 100, 20)];
81 _giftNameLbl.font = [UIFont systemFontOfSize:kContentFont]; 82 _giftNameLbl.font = [UIFont systemFontOfSize:kContentFont];
82 - _giftNameLbl.textColor = [UIColor blackColor]; 83 + _giftNameLbl.textColor = [UIColor yellowColorZX];
83 } 84 }
84 return _giftNameLbl; 85 return _giftNameLbl;
85 } 86 }
@@ -91,9 +92,8 @@ @@ -91,9 +92,8 @@
91 _icon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; 92 _icon = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
92 _icon.clipsToBounds = YES; 93 _icon.clipsToBounds = YES;
93 _icon.layer.cornerRadius = 20; 94 _icon.layer.cornerRadius = 20;
94 - _icon.layer.borderWidth = 1;  
95 - _icon.layer.borderColor = [UIColor cyanColor].CGColor;  
96 - 95 +// _icon.layer.borderWidth = 1;
  96 +// _icon.layer.borderColor = [UIColor cyanColor].CGColor;
97 } 97 }
98 return _icon; 98 return _icon;
99 } 99 }
@@ -107,13 +107,13 @@ @@ -107,13 +107,13 @@
107 return _giftImage; 107 return _giftImage;
108 } 108 }
109 109
110 -- (UIView *)bgView 110 +- (UIImageView *)bgView
111 { 111 {
112 if (!_bgView) 112 if (!_bgView)
113 { 113 {
114 - _bgView = [[UIView alloc] init];  
115 - _bgView.backgroundColor = [UIColor yellowColor]; 114 + _bgView = [[UIImageView alloc] init];
116 _bgView.clipsToBounds = YES; 115 _bgView.clipsToBounds = YES;
  116 + _bgView.alpha = 0.4;
117 } 117 }
118 return _bgView; 118 return _bgView;
119 } 119 }
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/Gift/Present/PresentViewCell.m
@@ -72,8 +72,8 @@ @@ -72,8 +72,8 @@
72 { 72 {
73 PresentLable *lable = [[PresentLable alloc] init]; 73 PresentLable *lable = [[PresentLable alloc] init];
74 lable.backgroundColor = [UIColor clearColor]; 74 lable.backgroundColor = [UIColor clearColor];
75 - lable.borderColor = [UIColor yellowColor];  
76 - lable.textColor = [UIColor greenColor]; 75 + lable.borderColor = [UIColor orangeColor];
  76 + lable.textColor = [UIColor yellowColor];
77 lable.font = [UIFont systemFontOfSize:17.0]; 77 lable.font = [UIFont systemFontOfSize:17.0];
78 lable.textAlignment = NSTextAlignmentCenter; 78 lable.textAlignment = NSTextAlignmentCenter;
79 lable.alpha = 0.0; 79 lable.alpha = 0.0;
@@ -253,7 +253,7 @@ @@ -253,7 +253,7 @@
253 [UIView animateKeyframesWithDuration:interval delay:0 options:0 animations:^{ 253 [UIView animateKeyframesWithDuration:interval delay:0 options:0 animations:^{
254 254
255 [UIView addKeyframeWithRelativeStartTime:0 relativeDuration:1/2.0 animations:^{ 255 [UIView addKeyframeWithRelativeStartTime:0 relativeDuration:1/2.0 animations:^{
256 - self.transform = CGAffineTransformMakeScale(4, 4); 256 + self.transform = CGAffineTransformMakeScale(2.5, 2.5);
257 }]; 257 }];
258 [UIView addKeyframeWithRelativeStartTime:1/2.0 relativeDuration:1/2.0 animations:^{ 258 [UIView addKeyframeWithRelativeStartTime:1/2.0 relativeDuration:1/2.0 animations:^{
259 self.transform = CGAffineTransformMakeScale(0.8, 0.8); 259 self.transform = CGAffineTransformMakeScale(0.8, 0.8);
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.h
@@ -7,8 +7,10 @@ @@ -7,8 +7,10 @@
7 // 7 //
8 8
9 #import "BaseView.h" 9 #import "BaseView.h"
  10 +#import "AnimationBaseView.h"
  11 +
10 @class PresentView; 12 @class PresentView;
11 -@class AnimationBaseView; 13 +//@class AnimationBaseView;
12 14
13 typedef NS_ENUM(NSInteger, BounceBtnType) {//弹窗按钮类型 15 typedef NS_ENUM(NSInteger, BounceBtnType) {//弹窗按钮类型
14 BounceBtnTypeAite = 1,//@TA按钮点击 16 BounceBtnTypeAite = 1,//@TA按钮点击
@@ -22,10 +24,11 @@ typedef NS_ENUM(NSInteger, JumpControllerType) {//跳转控制器类型 @@ -22,10 +24,11 @@ typedef NS_ENUM(NSInteger, JumpControllerType) {//跳转控制器类型
22 }; 24 };
23 @interface LiveBaseView : BaseView 25 @interface LiveBaseView : BaseView
24 26
  27 +@property (nonatomic ,strong ) UIButton * _Nullable closeBtn;
25 @property (nonatomic) JumpControllerType jumpType; 28 @property (nonatomic) JumpControllerType jumpType;
26 @property (nonatomic ,strong) UIViewController * _Nullable viewController; 29 @property (nonatomic ,strong) UIViewController * _Nullable viewController;
27 @property (nonatomic ,strong ,readonly) PresentView * _Nullable presentView; 30 @property (nonatomic ,strong ,readonly) PresentView * _Nullable presentView;
28 -@property (nonatomic ,strong ,readonly) AnimationBaseView * _Nullable animationBaseView; 31 +@property (nonatomic ,strong) AnimationBaseView * _Nullable animationBaseView;
29 32
30 + (instancetype _Nullable)liveBaseView; 33 + (instancetype _Nullable)liveBaseView;
31 34
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/LiveBaseView.m
@@ -21,7 +21,6 @@ @@ -21,7 +21,6 @@
21 #import "userInfoModel.h" 21 #import "userInfoModel.h"
22 #import "PrivateView.h" 22 #import "PrivateView.h"
23 #import "ChatBarrageView.h" 23 #import "ChatBarrageView.h"
24 -#import "AnimationBaseView.h"  
25 24
26 #define BottomToolHeight 60 25 #define BottomToolHeight 60
27 26
@@ -37,9 +36,9 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 @@ -37,9 +36,9 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
37 @interface LiveBaseView ()<bottomBtnDeledate,PresentViewDelegate,UIScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,userClickDelegate,CNLiveChatManagerDelegate,PopViewDelegate> 36 @interface LiveBaseView ()<bottomBtnDeledate,PresentViewDelegate,UIScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate,userClickDelegate,CNLiveChatManagerDelegate,PopViewDelegate>
38 37
39 @property (nonatomic ,strong ) UIScrollView * _Nullable scrollView; 38 @property (nonatomic ,strong ) UIScrollView * _Nullable scrollView;
40 -@property (nonatomic ,strong ,readwrite) AnimationBaseView * _Nullable animationBaseView;//展示层View 39 +//@property (nonatomic ,strong ,readwrite) AnimationBaseView * _Nullable animationBaseView;//展示层View
41 @property (nonatomic ,strong ) BottomToolView* _Nullable bottomToolView; 40 @property (nonatomic ,strong ) BottomToolView* _Nullable bottomToolView;
42 -@property (nonatomic ,strong ) UIButton * _Nullable closeBtn; 41 +
43 @property (nonatomic ,strong ) GiftListView * _Nullable giftListView; 42 @property (nonatomic ,strong ) GiftListView * _Nullable giftListView;
44 @property (nonatomic ,weak ) UIView * _Nullable giftPopView; 43 @property (nonatomic ,weak ) UIView * _Nullable giftPopView;
45 @property (nonatomic ,strong ,readwrite) PresentView * _Nullable presentView;//连击View 44 @property (nonatomic ,strong ,readwrite) PresentView * _Nullable presentView;//连击View
@@ -720,7 +719,6 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型 @@ -720,7 +719,6 @@ typedef NS_ENUM(NSInteger, PopType) {//弹窗类型
720 closeBtn.frame = CGRectMake(SCREEN_WIDTH - 43,SCREEN_HEIGHT - self.bottomToolView.height + (self.bottomToolView.height - 33)*0.5, 33, 33); 719 closeBtn.frame = CGRectMake(SCREEN_WIDTH - 43,SCREEN_HEIGHT - self.bottomToolView.height + (self.bottomToolView.height - 33)*0.5, 33, 33);
721 [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseNormal"] forState:UIControlStateNormal]; 720 [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseNormal"] forState:UIControlStateNormal];
722 [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseTouch"] forState:UIControlStateHighlighted]; 721 [closeBtn setBackgroundImage:[UIImage imageNamed:@"LiveCloseTouch"] forState:UIControlStateHighlighted];
723 - [closeBtn addTarget:self action:@selector(closeAction) forControlEvents:UIControlEventTouchUpInside];  
724 _closeBtn = closeBtn; 722 _closeBtn = closeBtn;
725 } 723 }
726 return _closeBtn; 724 return _closeBtn;
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/PrivateView/PriChatCell.m
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 @interface PriChatCell () 14 @interface PriChatCell ()
15 15
16 @property (nonatomic ,strong) chatMsgModel * _Nullable model; 16 @property (nonatomic ,strong) chatMsgModel * _Nullable model;
  17 +@property (nonatomic ,strong) UIImageView * _Nullable bgImgView;
17 @property (nonatomic ,strong) UIImageView * _Nullable icon; 18 @property (nonatomic ,strong) UIImageView * _Nullable icon;
18 @property (nonatomic ,strong) UILabel * _Nullable content; 19 @property (nonatomic ,strong) UILabel * _Nullable content;
19 20
@@ -36,51 +37,67 @@ @@ -36,51 +37,67 @@
36 _model = model; 37 _model = model;
37 [self bindView]; 38 [self bindView];
38 [self.icon sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:nil]; 39 [self.icon sd_setImageWithURL:[NSURL URLWithString:model.icon] placeholderImage:nil];
  40 + self.icon.backgroundColor = [UIColor greenColor];
39 self.content.text = model.content; 41 self.content.text = model.content;
40 CGSize size = [self.content labelSizeWithWidth:_model.priCellWidth]; 42 CGSize size = [self.content labelSizeWithWidth:_model.priCellWidth];
  43 +
41 if (_model.isMine) { 44 if (_model.isMine) {
42 - if (_model.priCellHeight < 37) {//1行 // 36.7  
43 -  
44 - self.content.frame = CGRectMake(self.width - 30 - size.width - 10, 2.5, size.width, size.height);//self.height - 5 45 + if (_model.priCellHeight < 57) {//1行 // 36.7
  46 + self.icon.frame = CGRectMake(self.width - 30, 6, 25, 25);
  47 + self.icon.centerY = (self.height - 25)*0.5 + 12.5;
  48 + self.content.frame = CGRectMake(self.width - 30 - size.width - 20 - 25, 2.5, size.width, size.height);
45 self.content.textAlignment = NSTextAlignmentRight; 49 self.content.textAlignment = NSTextAlignmentRight;
46 - self.content.centerY = self.icon.centerY; 50 + self.content.centerY = self.height * 0.5;
  51 + self.bgImgView.frame = CGRectMake(self.content.left - 15, self.content.top - 10, self.content.width + 45, self.content.height + 20);
47 }else 52 }else
48 { 53 {
49 - self.content.frame = CGRectMake(self.width - 30 - size.width - 10, 10, size.width, size.height);//self.height - 5 54 + self.icon.frame = CGRectMake(self.width - 30, 6, 25, 25);
  55 + self.icon.centerY = (self.height - 25)*0.5 + 12.5;
  56 + self.content.frame = CGRectMake(self.width - 30 - size.width - 20 - 25, 10, size.width, size.height);
50 self.content.textAlignment = NSTextAlignmentLeft; 57 self.content.textAlignment = NSTextAlignmentLeft;
  58 + self.content.centerY = self.height * 0.5;
  59 + self.bgImgView.frame = CGRectMake(self.content.left - 15, self.content.top - 10, self.content.width + 50, self.content.height + 20);
51 } 60 }
  61 +
  62 + self.bgImgView.image = [[UIImage imageNamed:@"right"]stretchableImageWithLeftCapWidth:167 topCapHeight:100];
52 }else 63 }else
53 { 64 {
54 - if (_model.priCellHeight < 37) {//1行 65 + if (_model.priCellHeight < 57) {//1行
55 self.icon.frame = CGRectMake(5, 6, 25, 25); 66 self.icon.frame = CGRectMake(5, 6, 25, 25);
56 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516; 67 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516;
57 - self.content.frame = CGRectMake(5 + 30 + 10, 2.5, size.width, size.height);//self.height - 5 68 + self.content.frame = CGRectMake(5 + 25 + 35, 2.5, size.width, size.height);
58 self.content.textAlignment = NSTextAlignmentLeft; 69 self.content.textAlignment = NSTextAlignmentLeft;
59 self.content.centerY = self.icon.centerY; 70 self.content.centerY = self.icon.centerY;
  71 + self.bgImgView.frame = CGRectMake(self.content.left - 25, self.content.top - 10, self.content.width + 45, self.content.height + 20);
60 }else 72 }else
61 { 73 {
62 self.icon.frame = CGRectMake(5, 6, 25, 25); 74 self.icon.frame = CGRectMake(5, 6, 25, 25);
63 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516; 75 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516;
64 - self.content.frame = CGRectMake(5 + 30 + 10, 10, size.width, size.height);//self.height - 5 76 + self.content.frame = CGRectMake(5 + 25 + 35 + 15, 10, size.width, size.height);
65 self.content.textAlignment = NSTextAlignmentLeft; 77 self.content.textAlignment = NSTextAlignmentLeft;
  78 + self.content.centerY = self.height * 0.5;
  79 + self.bgImgView.frame = CGRectMake(self.content.left - 35 - 5, self.content.top - 10, self.content.width + 50, self.content.height + 20);
66 } 80 }
  81 +
  82 + self.bgImgView.image = [[UIImage imageNamed:@"left"] stretchableImageWithLeftCapWidth:189 topCapHeight:164];
  83 +
67 } 84 }
  85 + _icon.layer.cornerRadius = _icon.height * 0.5;
  86 + [self sendSubviewToBack:self.bgImgView];
68 } 87 }
69 88
70 - (void)bindView 89 - (void)bindView
71 { 90 {
72 if (_model.isMine) { 91 if (_model.isMine) {
73 self.icon.frame = CGRectMake(self.width - 30, 6, 25, 25); 92 self.icon.frame = CGRectMake(self.width - 30, 6, 25, 25);
74 - NSLog(@"self.icon.centerY%f,%f",self.height * 0.5,_model.priCellHeight);//13.353516 21.707031 155.363281 93 +// NSLog(@"self.icon.centerY%f,%f",self.height * 0.5,_model.priCellHeight);//13.353516 21.707031 155.363281
75 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516; 94 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516;
76 self.content.frame = CGRectMake(self.width - 30 - CHAT_POP_WIDTH, 2.5, CHAT_POP_WIDTH - 10, self.height - 5); 95 self.content.frame = CGRectMake(self.width - 30 - CHAT_POP_WIDTH, 2.5, CHAT_POP_WIDTH - 10, self.height - 5);
77 - self.content.backgroundColor = [UIColor blueColorZX];  
78 96
79 }else{ 97 }else{
80 self.icon.frame = CGRectMake(5, 6, 25, 25); 98 self.icon.frame = CGRectMake(5, 6, 25, 25);
81 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516; 99 self.icon.centerY = (self.height - 25)*0.5 + 12.5;//13.353516;
82 self.content.frame = CGRectMake(5 + 30, 2.5, CHAT_POP_WIDTH, self.height - 5); 100 self.content.frame = CGRectMake(5 + 30, 2.5, CHAT_POP_WIDTH, self.height - 5);
83 - self.content.backgroundColor = [UIColor greenColor];  
84 } 101 }
85 } 102 }
86 103
@@ -105,12 +122,22 @@ @@ -105,12 +122,22 @@
105 { 122 {
106 _icon = [[UIImageView alloc] init]; 123 _icon = [[UIImageView alloc] init];
107 _icon.layer.masksToBounds = YES; 124 _icon.layer.masksToBounds = YES;
108 - _icon.layer.cornerRadius = 15.f;  
109 [self addSubview:_icon]; 125 [self addSubview:_icon];
110 } 126 }
111 return _icon; 127 return _icon;
112 } 128 }
113 129
  130 +- (UIImageView * _Nullable)bgImgView
  131 +{
  132 + if (!_bgImgView)
  133 + {
  134 + _bgImgView = [[UIImageView alloc] init];
  135 +
  136 + [self addSubview:_bgImgView];
  137 + }
  138 + return _bgImgView;
  139 +}
  140 +
114 - (void)awakeFromNib { 141 - (void)awakeFromNib {
115 [super awakeFromNib]; 142 [super awakeFromNib];
116 // Initialization code 143 // Initialization code
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/PrivateView/PrivateView.m
@@ -80,7 +80,6 @@ static NSString *message_content = @&quot;message_content&quot;; @@ -80,7 +80,6 @@ static NSString *message_content = @&quot;message_content&quot;;
80 self.top = SCREEN_HEIGHT - newFrameKeyboard.size.height - self.height; 80 self.top = SCREEN_HEIGHT - newFrameKeyboard.size.height - self.height;
81 }]; 81 }];
82 self.isEditing = YES; 82 self.isEditing = YES;
83 - NSLog(@"showtop:%f",self.top);  
84 } 83 }
85 } 84 }
86 85
@@ -91,7 +90,6 @@ static NSString *message_content = @&quot;message_content&quot;; @@ -91,7 +90,6 @@ static NSString *message_content = @&quot;message_content&quot;;
91 [UIView animateWithDuration:0.1 animations:^{ 90 [UIView animateWithDuration:0.1 animations:^{
92 self.top = SCREEN_HEIGHT - 300; 91 self.top = SCREEN_HEIGHT - 300;
93 }]; 92 }];
94 - NSLog(@"hiddentop:%f",self.top);  
95 self.isEditing = NO; 93 self.isEditing = NO;
96 } 94 }
97 } 95 }
@@ -104,7 +102,7 @@ static NSString *message_content = @&quot;message_content&quot;; @@ -104,7 +102,7 @@ static NSString *message_content = @&quot;message_content&quot;;
104 NSDictionary *dic = @{message_content:textField.text}; 102 NSDictionary *dic = @{message_content:textField.text};
105 weakself 103 weakself
106 NSString *message = [Tools dictionaryToJson:dic]; 104 NSString *message = [Tools dictionaryToJson:dic];
107 - [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:message type:CNLive_ConversationType_PRIVATE targetId:@"20170327" success:^(CNLiveChatMessage *message) { 105 + [[CNLiveChatManager sharedCNLiveChatManager] sendMessage:message type:CNLive_ConversationType_PRIVATE targetId:@"20170328" success:^(CNLiveChatMessage *message) {
108 106
109 dispatch_async(dispatch_get_main_queue(), ^{ 107 dispatch_async(dispatch_get_main_queue(), ^{
110 strongself 108 strongself
@@ -256,7 +254,8 @@ static NSString *message_content = @&quot;message_content&quot;; @@ -256,7 +254,8 @@ static NSString *message_content = @&quot;message_content&quot;;
256 if (!_textField) 254 if (!_textField)
257 { 255 {
258 _textField = [[UITextField alloc] initWithFrame:CGRectMake(4, 4, self.bottomTool.width - self.sendBtn.width - 8, self.bottomTool.height - 8)]; 256 _textField = [[UITextField alloc] initWithFrame:CGRectMake(4, 4, self.bottomTool.width - self.sendBtn.width - 8, self.bottomTool.height - 8)];
259 - _textField.borderStyle = UITextBorderStyleLine; 257 + _textField.borderStyle = UITextBorderStyleNone;
  258 + _textField.placeholder = @"和主播说点什么吧";
260 _textField.returnKeyType = UIReturnKeySend; 259 _textField.returnKeyType = UIReturnKeySend;
261 _textField.delegate = self; 260 _textField.delegate = self;
262 } 261 }
LiveVideoCloud/LiveVideoCloud/Classes/Sections/LiveSections/Controller/LVCLiveViewController.m
@@ -58,12 +58,14 @@ @@ -58,12 +58,14 @@
58 [self.view addSubview:self.filterView]; 58 [self.view addSubview:self.filterView];
59 59
60 // 初始化推流 60 // 初始化推流
61 - NSString *activityId = [NSString stringWithFormat:@"%d%d%d%d%d",arc4random()%9,arc4random()%9,arc4random()%9,arc4random()%9,arc4random()%9]; 61 + NSInteger time = [[NSDate date] timeIntervalSince1970];
  62 + NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time];
  63 + NSString *random = [NSString stringWithFormat:@"%d%d%d%d%d",arc4random()%9,arc4random()%9,arc4random()%9,arc4random()%9,arc4random()%9];
  64 + NSString *activityId = [NSString stringWithFormat:@"%@%@",timeString,random];
62 65
63 _kitCN = [[CNLiveGPUStreamerKit alloc] initWithDefaultConfigWithActivityId:activityId channelId:@"iOStest" isHorizontalScreen:@"0"]; 66 _kitCN = [[CNLiveGPUStreamerKit alloc] initWithDefaultConfigWithActivityId:activityId channelId:@"iOStest" isHorizontalScreen:@"0"];
64 67
65 - // _kitCN.activityName = @"iOS test";  
66 - // _kitCN.coverImgUrl = @"djfiwooa"; 68 + _kitCN.coverImgUrl = @"https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=3269891096,90190857&fm=23&gp=0.jpg";
67 69
68 // 设置推流配置 70 // 设置推流配置
69 [self setStreamerCfg]; 71 [self setStreamerCfg];
@@ -114,6 +116,7 @@ @@ -114,6 +116,7 @@
114 _liveBaseView.jumpType = JumpControllerTypePresent; 116 _liveBaseView.jumpType = JumpControllerTypePresent;
115 _liveBaseView.viewController = self; 117 _liveBaseView.viewController = self;
116 _liveBaseView.backgroundColor = [UIColor clearColor]; 118 _liveBaseView.backgroundColor = [UIColor clearColor];
  119 + [_liveBaseView.closeBtn addTarget:self action:@selector(quitBtnClick) forControlEvents:UIControlEventTouchUpInside];
117 } 120 }
118 return _liveBaseView; 121 return _liveBaseView;
119 } 122 }
@@ -121,17 +124,32 @@ @@ -121,17 +124,32 @@
121 #pragma mark - UIButton Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 124 #pragma mark - UIButton Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
122 - (void)startCapture:(UIButton *)button { // 开始推流 125 - (void)startCapture:(UIButton *)button { // 开始推流
123 126
124 - [_quitButton removeFromSuperview]; 127 + // 设置标题
  128 + if (_prepareView.titleTextField.text) {
  129 + _kitCN.activityName = _prepareView.titleTextField.text;
  130 + } else {
  131 + _kitCN.activityName = @"无名";
  132 + }
125 133
126 - _isStreaming = YES; 134 + [_openFilterButton removeFromSuperview];
  135 + [_changeCameraButton removeFromSuperview];
  136 + [_openFlashButton removeFromSuperview];
  137 + _openFilterButton = nil;
  138 + _changeCameraButton = nil;
  139 + _openFlashButton = nil;
127 140
128 [_prepareView removeFromSuperview]; 141 [_prepareView removeFromSuperview];
129 142
130 [_kitCN startStream:^{ 143 [_kitCN startStream:^{
131 NSLog(@"开启推流成功 ------- success"); 144 NSLog(@"开启推流成功 ------- success");
132 145
  146 + _isStreaming = YES;
  147 + [_quitButton removeFromSuperview];
133 [self.view insertSubview:self.liveBaseView atIndex:1]; 148 [self.view insertSubview:self.liveBaseView atIndex:1];
134 - 149 + [self.liveBaseView.animationBaseView addSubview:self.openFilterButton];
  150 + [self.liveBaseView.animationBaseView addSubview:self.changeCameraButton];
  151 + [self.liveBaseView.animationBaseView addSubview:self.openFlashButton];
  152 +
135 } failure:^(NSDictionary *errorDic) { 153 } failure:^(NSDictionary *errorDic) {
136 //NSString *str=[[NSMutableString alloc] initWithData:errorDic[@"errorMessage"] encoding:NSUTF8StringEncoding]; 154 //NSString *str=[[NSMutableString alloc] initWithData:errorDic[@"errorMessage"] encoding:NSUTF8StringEncoding];
137 NSLog(@"%@",errorDic); 155 NSLog(@"%@",errorDic);
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
@@ -11,10 +11,10 @@ @@ -11,10 +11,10 @@
11 #import "LVCLivePlayerController.h" 11 #import "LVCLivePlayerController.h"
12 #import "LVCUGCLivePlayerController.h" 12 #import "LVCUGCLivePlayerController.h"
13 #import "LVCTVLiveViewController.h" 13 #import "LVCTVLiveViewController.h"
14 -#import "LVCUGCLiveListController.h"  
15 #import "V8HorizontalPickerView.h" 14 #import "V8HorizontalPickerView.h"
16 #import "MHPagingScrollView.h" 15 #import "MHPagingScrollView.h"
17 #import "LVCTelevisionView.h" 16 #import "LVCTelevisionView.h"
  17 +#import "LVCUGCLiveListView.h"
18 18
19 @interface HomeViewController ()<V8HorizontalPickerViewDataSource, V8HorizontalPickerViewDelegate,MHPagingScrollViewDelegate,UIScrollViewDelegate> 19 @interface HomeViewController ()<V8HorizontalPickerViewDataSource, V8HorizontalPickerViewDelegate,MHPagingScrollViewDelegate,UIScrollViewDelegate>
20 { 20 {
@@ -54,7 +54,7 @@ @@ -54,7 +54,7 @@
54 [UGCLiveListBtn addTarget:self action:@selector(UGCLiveListAction) forControlEvents:UIControlEventTouchUpInside]; 54 [UGCLiveListBtn addTarget:self action:@selector(UGCLiveListAction) forControlEvents:UIControlEventTouchUpInside];
55 [self.view addSubview:UGCLiveListBtn]; 55 [self.view addSubview:UGCLiveListBtn];
56 56
57 - _titleArr = @[@"推荐",@"频道"]; 57 + _titleArr = @[@"直播",@"推荐",@"频道"];
58 CGFloat width = 0; 58 CGFloat width = 0;
59 for (NSString *title in _titleArr) { 59 for (NSString *title in _titleArr) {
60 CGSize size = [title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}]; 60 CGSize size = [title sizeWithAttributes:@{NSFontAttributeName:self.titleView.elementFont}];
@@ -90,8 +90,7 @@ @@ -90,8 +90,7 @@
90 90
91 - (void)UGCLiveListAction 91 - (void)UGCLiveListAction
92 { 92 {
93 - LVCUGCLiveListController *listVC = [[LVCUGCLiveListController alloc] init];  
94 - [self.navigationController pushViewController:listVC animated:YES]; 93 +
95 } 94 }
96 95
97 #pragma mark - V8HorizontalPickerViewDataSource 96 #pragma mark - V8HorizontalPickerViewDataSource
@@ -167,6 +166,13 @@ @@ -167,6 +166,13 @@
167 tvView = [[LVCTelevisionView alloc] init]; 166 tvView = [[LVCTelevisionView alloc] init];
168 } 167 }
169 return tvView; 168 return tvView;
  169 + }else if ([_titleArr[index] isEqualToString:@"直播"]) {
  170 +
  171 + LVCUGCLiveListView *liveListView = (LVCUGCLiveListView *)[pagingScrollView pageViewByIndex:index];
  172 + if (!liveListView) {
  173 + liveListView = [[LVCUGCLiveListView alloc] initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT - 114)];
  174 + }
  175 + return liveListView;
170 } 176 }
171 return nil; 177 return nil;
172 } 178 }
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLiveListController.h renamed to LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLiveListView.h
1 // 1 //
2 -// LVCUGCLiveListController.h 2 +// LVCUGCLiveListView.h
3 // LiveVideoCloud 3 // LiveVideoCloud
4 // 4 //
5 -// Created by cnliveJunBo on 17/3/27. 5 +// Created by cnliveJunBo on 17/3/29.
6 // Copyright © 2017年 cnlive. All rights reserved. 6 // Copyright © 2017年 cnlive. All rights reserved.
7 // 7 //
8 8
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 10
11 -@interface LVCUGCLiveListController : UIViewController 11 +@interface LVCUGCLiveListView : UIView
12 12
13 @end 13 @end
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLiveListController.m renamed to LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLiveListView.m
1 // 1 //
2 -// LVCUGCLiveListController.m 2 +// LVCUGCLiveListView.m
3 // LiveVideoCloud 3 // LiveVideoCloud
4 // 4 //
5 -// Created by cnliveJunBo on 17/3/27. 5 +// Created by cnliveJunBo on 17/3/29.
6 // Copyright © 2017年 cnlive. All rights reserved. 6 // Copyright © 2017年 cnlive. All rights reserved.
7 // 7 //
8 8
9 -#import "LVCUGCLiveListController.h" 9 +#import "LVCUGCLiveListView.h"
10 #import "LiveLIstService.h" 10 #import "LiveLIstService.h"
11 -#import "LVCUGCLiveListModel.h"  
12 #import "LVCUGCLivePlayerCell.h" 11 #import "LVCUGCLivePlayerCell.h"
  12 +#import "LVCUGCLiveListModel.h"
13 #import "LVCUGCLivePlayerModel.h" 13 #import "LVCUGCLivePlayerModel.h"
  14 +#import "LVCUGCLivePlayerController.h"
14 15
15 static NSString *cellId = @"cellId"; 16 static NSString *cellId = @"cellId";
16 17
17 -@interface LVCUGCLiveListController ()<UICollectionViewDelegate, UICollectionViewDataSource> 18 +@interface LVCUGCLiveListView()<UICollectionViewDelegate, UICollectionViewDataSource> {
  19 +
  20 + NSMutableArray *_arrayM;
  21 +}
18 22
19 @property (nonatomic, strong) UICollectionView *collectionView; 23 @property (nonatomic, strong) UICollectionView *collectionView;
20 24
  25 +
  26 +
21 @end 27 @end
22 28
23 -@implementation LVCUGCLiveListController 29 +@implementation LVCUGCLiveListView
24 30
25 -- (void)viewDidLoad {  
26 - [super viewDidLoad];  
27 - self.view.backgroundColor = [UIColor whiteColor];  
28 -  
29 - [self loadData];  
30 -  
31 - [self.view addSubview:self.collectionView]; 31 +- (instancetype)initWithFrame:(CGRect)frame
  32 +{
  33 + self = [super initWithFrame:frame];
  34 + if (self) {
  35 + self.backgroundColor = [UIColor whiteColor];
  36 +
  37 + _arrayM = [[NSMutableArray alloc] init];
  38 +
  39 + [self loadData];
  40 +
  41 + [self addSubview:self.collectionView];
  42 + }
  43 + return self;
32 } 44 }
33 45
34 - (void)loadData { 46 - (void)loadData {
@@ -44,8 +56,9 @@ static NSString *cellId = @&quot;cellId&quot;; @@ -44,8 +56,9 @@ static NSString *cellId = @&quot;cellId&quot;;
44 LVCUGCLiveListModel *model = [LVCUGCLiveListModel modelWithDic:data]; 56 LVCUGCLiveListModel *model = [LVCUGCLiveListModel modelWithDic:data];
45 57
46 NSLog(@"%@",model.activityList); 58 NSLog(@"%@",model.activityList);
  59 + _arrayM = model.activityList.mutableCopy;
47 }]; 60 }];
48 - 61 +
49 } 62 }
50 63
51 #pragma mark - UICollectionViewDelegate, UICollectionViewDataSource !!!!!!!!!!!!!!!!!!!!!!!!!!! 64 #pragma mark - UICollectionViewDelegate, UICollectionViewDataSource !!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -56,7 +69,7 @@ static NSString *cellId = @&quot;cellId&quot;; @@ -56,7 +69,7 @@ static NSString *cellId = @&quot;cellId&quot;;
56 69
57 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 70 - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
58 71
59 - return 6; 72 + return _arrayM.count;
60 } 73 }
61 74
62 - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { 75 - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
@@ -65,12 +78,18 @@ static NSString *cellId = @&quot;cellId&quot;; @@ -65,12 +78,18 @@ static NSString *cellId = @&quot;cellId&quot;;
65 78
66 NSLog(@"cell ------> %@",cell); 79 NSLog(@"cell ------> %@",cell);
67 80
68 - LVCUGCLivePlayerModel *model = [[LVCUGCLivePlayerModel alloc] init]; 81 + LVCUGCLivePlayerModel *model = _arrayM[indexPath.row];
69 cell.model = model; 82 cell.model = model;
70 83
71 return cell; 84 return cell;
72 } 85 }
73 86
  87 +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
  88 +
  89 + LVCUGCLivePlayerController *player = [[LVCUGCLivePlayerController alloc] init];
  90 + [self.viewController.navigationController pushViewController:player animated:YES];
  91 +}
  92 +
74 #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 93 #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
75 - (UICollectionView *)collectionView { 94 - (UICollectionView *)collectionView {
76 95
@@ -78,8 +97,8 @@ static NSString *cellId = @&quot;cellId&quot;; @@ -78,8 +97,8 @@ static NSString *cellId = @&quot;cellId&quot;;
78 UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; 97 UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
79 layout.minimumLineSpacing = 10; 98 layout.minimumLineSpacing = 10;
80 layout.minimumInteritemSpacing = 0; 99 layout.minimumInteritemSpacing = 0;
81 - layout.itemSize = CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT * 0.6);  
82 - _collectionView = [[UICollectionView alloc] initWithFrame:self.view.bounds collectionViewLayout:layout]; 100 + layout.itemSize = CGSizeMake(SCREEN_WIDTH, SCREEN_WIDTH + 100);
  101 + _collectionView = [[UICollectionView alloc] initWithFrame:self.bounds collectionViewLayout:layout];
83 _collectionView.backgroundColor = [UIColor lightGrayColor]; 102 _collectionView.backgroundColor = [UIColor lightGrayColor];
84 _collectionView.showsHorizontalScrollIndicator = NO; 103 _collectionView.showsHorizontalScrollIndicator = NO;
85 _collectionView.dataSource = self; 104 _collectionView.dataSource = self;
@@ -89,9 +108,5 @@ static NSString *cellId = @&quot;cellId&quot;; @@ -89,9 +108,5 @@ static NSString *cellId = @&quot;cellId&quot;;
89 return _collectionView; 108 return _collectionView;
90 } 109 }
91 110
92 -- (void)didReceiveMemoryWarning {  
93 - [super didReceiveMemoryWarning];  
94 - // Dispose of any resources that can be recreated.  
95 -}  
96 111
97 @end 112 @end
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCUGCLivePlayerController.m
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 83
84 }]; 84 }];
85 85
86 - //[self.view addSubview:self.bgView]; 86 + [self.view addSubview:self.bgView];
87 } 87 }
88 88
89 #pragma mark - UIPanGestureRecognizer !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 89 #pragma mark - UIPanGestureRecognizer !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -168,7 +168,6 @@ @@ -168,7 +168,6 @@
168 // 停止后的视图,拿到自己的加载图来显示 168 // 停止后的视图,拿到自己的加载图来显示
169 [_viewSecond addSubview:_secondLoadView]; 169 [_viewSecond addSubview:_secondLoadView];
170 170
171 - [_viewSecond removeGestureRecognizer:_pan];  
172 _viewOne.frame = CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT); 171 _viewOne.frame = CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT);
173 _tempView = _viewOne; 172 _tempView = _viewOne;
174 _viewOne = _viewSecond; 173 _viewOne = _viewSecond;
@@ -267,9 +266,11 @@ @@ -267,9 +266,11 @@
267 NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState); 266 NSLog(@"loadStateDidChange: MPMovieLoadStatePlaythroughOK: %d\n", (int)loadState);
268 267
269 } else if ((loadState & MPMovieLoadStateStalled) != 0) { 268 } else if ((loadState & MPMovieLoadStateStalled) != 0) {
  269 +
270 NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState); 270 NSLog(@"loadStateDidChange: MPMovieLoadStateStalled: %d\n", (int)loadState);
271 271
272 } else { 272 } else {
  273 +
273 NSLog(@"loadStateDidChange: ???: %d\n", (int)loadState); 274 NSLog(@"loadStateDidChange: ???: %d\n", (int)loadState);
274 } 275 }
275 } 276 }
@@ -370,7 +371,7 @@ @@ -370,7 +371,7 @@
370 if (_player.anchorStatus == 2) { // 已结束 371 if (_player.anchorStatus == 2) { // 已结束
371 372
372 } 373 }
373 - // _bgView.anchorStatus = _player.anchorStatus; 374 + _bgView.anchorStatus = _player.anchorStatus;
374 } 375 }
375 376
376 377
@@ -379,12 +380,19 @@ @@ -379,12 +380,19 @@
379 380
380 } 381 }
381 382
  383 +#pragma mark - Button Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  384 +- (void)backToList {
  385 +
  386 + [self.navigationController popViewControllerAnimated:YES];
  387 +}
  388 +
382 #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 389 #pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
383 - (LVCUGCBackgroundView *)bgView { 390 - (LVCUGCBackgroundView *)bgView {
384 391
385 if (!_bgView) { 392 if (!_bgView) {
386 _bgView = [[LVCUGCBackgroundView alloc] initWithFrame:self.view.bounds]; 393 _bgView = [[LVCUGCBackgroundView alloc] initWithFrame:self.view.bounds];
387 _bgView.hidden = YES; 394 _bgView.hidden = YES;
  395 + [_bgView.backButton addTarget:self action:@selector(backToList) forControlEvents:UIControlEventTouchUpInside];
388 } 396 }
389 return _bgView; 397 return _bgView;
390 } 398 }
@@ -392,7 +400,7 @@ @@ -392,7 +400,7 @@
392 - (UIView *)viewOne { 400 - (UIView *)viewOne {
393 if (!_viewOne) { 401 if (!_viewOne) {
394 _viewOne = [[UIView alloc] initWithFrame:CGRectMake(0, -SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)]; 402 _viewOne = [[UIView alloc] initWithFrame:CGRectMake(0, -SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)];
395 - _viewOne.backgroundColor = [UIColor orangeColor]; 403 + _viewOne.backgroundColor = [UIColor blackColor];
396 _firstLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds]; 404 _firstLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds];
397 [_viewOne addSubview:_firstLoadView]; 405 [_viewOne addSubview:_firstLoadView];
398 _oneY = -SCREEN_HEIGHT; 406 _oneY = -SCREEN_HEIGHT;
@@ -403,7 +411,7 @@ @@ -403,7 +411,7 @@
403 - (UIView *)viewSecond { 411 - (UIView *)viewSecond {
404 if (!_viewSecond) { 412 if (!_viewSecond) {
405 _viewSecond = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]; 413 _viewSecond = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)];
406 - _viewSecond.backgroundColor = [UIColor redColor]; 414 + _viewSecond.backgroundColor = [UIColor blackColor];
407 _secondLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds]; 415 _secondLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds];
408 [_viewSecond addSubview:_secondLoadView]; 416 [_viewSecond addSubview:_secondLoadView];
409 _SecondY = 0; 417 _SecondY = 0;
@@ -414,7 +422,7 @@ @@ -414,7 +422,7 @@
414 - (UIView *)viewThird { 422 - (UIView *)viewThird {
415 if (!_viewThird) { 423 if (!_viewThird) {
416 _viewThird = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)]; 424 _viewThird = [[UIView alloc] initWithFrame:CGRectMake(0, SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT)];
417 - _viewThird.backgroundColor = [UIColor blueColor]; 425 + _viewThird.backgroundColor = [UIColor blackColor];
418 _thirdLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds]; 426 _thirdLoadView = [[LVCUGCPlayerLoadingView alloc] initWithFrame:self.view.bounds];
419 [_viewThird addSubview:_thirdLoadView]; 427 [_viewThird addSubview:_thirdLoadView];
420 _ThirdY = SCREEN_HEIGHT; 428 _ThirdY = SCREEN_HEIGHT;
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LiveLIstService.m
@@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
17 NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; 17 NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time];
18 NSMutableDictionary *parameter=[@{@"platform_id": [NSBundle mainBundle].bundleIdentifier, 18 NSMutableDictionary *parameter=[@{@"platform_id": [NSBundle mainBundle].bundleIdentifier,
19 @"timestamp": timeString, 19 @"timestamp": timeString,
20 - @"appId": @"60_irn9edco29"} mutableCopy];  
21 - NSString *string = [NSString stringWithFormat:@"%@&key=%@", [self sortParameters:parameter], @"69fe70bda67e059286ad509d9f5377f815955645b52f94"]; 20 + @"appId": AppId} mutableCopy];
  21 + NSString *string = [NSString stringWithFormat:@"%@&key=%@", [self sortParameters:parameter], AppKey];
22 NSString *signString = [[self sha1:string] uppercaseString]; 22 NSString *signString = [[self sha1:string] uppercaseString];
23 [parameter setObject:signString forKey:@"sign"]; 23 [parameter setObject:signString forKey:@"sign"];
24 24
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCBackgroundView.m
@@ -57,8 +57,7 @@ @@ -57,8 +57,7 @@
57 } 57 }
58 } 58 }
59 59
60 -#pragma mark - getter !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  
61 - 60 +#pragma mark - GetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
62 - (UIImageView *)iconView { 61 - (UIImageView *)iconView {
63 62
64 if (!_iconView) { 63 if (!_iconView) {
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/View/LVCUGCLivePlayerCell.m
@@ -8,14 +8,40 @@ @@ -8,14 +8,40 @@
8 8
9 #import "LVCUGCLivePlayerCell.h" 9 #import "LVCUGCLivePlayerCell.h"
10 10
  11 +@interface LVCUGCLivePlayerCell()
  12 +
  13 +@property (nonatomic, strong) UIImageView *iconView;
  14 +
  15 +@property (nonatomic, strong) UILabel *nameLabel;
  16 +
  17 +@property (nonatomic, strong) UILabel *locationLabel;
  18 +
  19 +@property (nonatomic, strong) UILabel *countLabel;
  20 +
  21 +@property (nonatomic, strong) UILabel *lookLabel;
  22 +
  23 +@property (nonatomic, strong) UIImageView *imageView;
  24 +
  25 +@property (nonatomic, strong) UILabel *stateLabel;
  26 +
  27 +@property (nonatomic, strong) UILabel *titleLabel;
  28 +
  29 +@end
  30 +
11 @implementation LVCUGCLivePlayerCell 31 @implementation LVCUGCLivePlayerCell
12 32
13 -- (instancetype)initWithFrame:(CGRect)frame  
14 -{ 33 +- (instancetype)initWithFrame:(CGRect)frame {
  34 +
15 self = [super initWithFrame:frame]; 35 self = [super initWithFrame:frame];
16 if (self) { 36 if (self) {
17 self.contentView.backgroundColor = [UIColor whiteColor]; 37 self.contentView.backgroundColor = [UIColor whiteColor];
18 - 38 + [self.contentView addSubview:self.iconView];
  39 + [self.contentView addSubview:self.nameLabel];
  40 + [self.contentView addSubview:self.locationLabel];
  41 + [self.contentView addSubview:self.countLabel];
  42 + [self.contentView addSubview:self.lookLabel];
  43 + [self.contentView addSubview:self.imageView];
  44 + [self.contentView addSubview:self.titleLabel];
19 } 45 }
20 return self; 46 return self;
21 } 47 }
@@ -26,9 +52,99 @@ @@ -26,9 +52,99 @@
26 if (_model != model) { 52 if (_model != model) {
27 _model = model; 53 _model = model;
28 } 54 }
  55 + _titleLabel.text = model.activityName;
  56 + NSString *path = [[NSBundle mainBundle] pathForResource:@"timg" ofType:@"jpeg"];
  57 + UIImage *image = [UIImage imageWithContentsOfFile:path];
  58 + [_imageView sd_setImageWithURL:[NSURL URLWithString:model.coverImgUrl] placeholderImage:image];
29 } 59 }
30 60
31 #pragma mark - SetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 61 #pragma mark - SetMethod !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  62 +- (UIImageView *)iconView {
  63 +
  64 + if (!_iconView) {
  65 + NSString *path = [[NSBundle mainBundle] pathForResource:@"头像" ofType:@"jpg"];
  66 + UIImage *image = [UIImage imageWithContentsOfFile:path];
  67 + _iconView = [[UIImageView alloc] initWithImage:image];
  68 + _iconView.frame = CGRectMake(10, 10, 50, 50);
  69 + _iconView.layer.cornerRadius = 25;
  70 + _iconView.layer.masksToBounds = YES;
  71 + }
  72 + return _iconView;
  73 +}
  74 +
  75 +- (UILabel *)nameLabel {
  76 + if (!_nameLabel) {
  77 + _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(70, 15, SCREEN_WIDTH - 140, 20)];
  78 + _nameLabel.text = @"这是我的昵称";
  79 + _nameLabel.textColor = [UIColor grayColor];
  80 + }
  81 + return _nameLabel;
  82 +}
32 83
  84 +- (UILabel *)locationLabel {
  85 + if (!_locationLabel) {
  86 + _locationLabel = [[UILabel alloc] initWithFrame:CGRectMake(70, 40, SCREEN_WIDTH - 140, 20)];
  87 + _locationLabel.text = @"这是我的地址";
  88 + _locationLabel.font = [UIFont systemFontOfSize:13];
  89 + _locationLabel.textColor = [UIColor grayColor];
  90 + }
  91 + return _locationLabel;
  92 +}
  93 +
  94 +- (UILabel *)countLabel {
  95 + if (!_countLabel) {
  96 + _countLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 65, 15, 60, 20)];
  97 + _countLabel.text = @"13244";
  98 + _countLabel.textAlignment = NSTextAlignmentRight;
  99 + _countLabel.textColor = [UIColor orangeColor];
  100 + }
  101 + return _countLabel;
  102 +}
  103 +
  104 +- (UILabel *)lookLabel {
  105 + if (!_lookLabel) {
  106 + _lookLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 45, 35, 40, 20)];
  107 + _lookLabel.text = @"在看";
  108 + _lookLabel.font = [UIFont systemFontOfSize:13];
  109 + _lookLabel.textAlignment = NSTextAlignmentRight;
  110 + _lookLabel.textColor = [UIColor grayColor];
  111 + }
  112 + return _lookLabel;
  113 +}
  114 +
  115 +- (UIImageView *)imageView {
  116 + if (!_imageView) {
  117 + _imageView = [[UIImageView alloc] init];
  118 + _imageView.frame = CGRectMake(0, 70, SCREEN_WIDTH, SCREEN_WIDTH);
  119 + _imageView.contentMode = UIViewContentModeScaleAspectFill;
  120 + _imageView.clipsToBounds = YES;
  121 + [_imageView addSubview:self.stateLabel];
  122 + }
  123 + return _imageView;
  124 +}
  125 +
  126 +- (UILabel *)stateLabel {
  127 + if (!_stateLabel) {
  128 + _stateLabel = [[UILabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 70, 10, 60, 20)];
  129 + _stateLabel.font = [UIFont systemFontOfSize:13];
  130 + _stateLabel.textAlignment = NSTextAlignmentCenter;
  131 + _stateLabel.textColor = [UIColor whiteColor];
  132 + _stateLabel.layer.cornerRadius = 10;
  133 + _stateLabel.layer.masksToBounds = YES;
  134 + _stateLabel.text = @"直播";
  135 + _stateLabel.layer.borderColor = [UIColor whiteColor].CGColor;
  136 + _stateLabel.layer.borderWidth = 1;
  137 + }
  138 + return _stateLabel;
  139 +}
  140 +
  141 +- (UILabel *)titleLabel {
  142 + if (!_titleLabel) {
  143 + _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, SCREEN_WIDTH + 75, SCREEN_WIDTH, 20)];
  144 + _titleLabel.textColor = [UIColor grayColor];
  145 + _titleLabel.text = @"这是一个标题";
  146 + }
  147 + return _titleLabel;
  148 +}
33 149
34 @end 150 @end
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Chat/left.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "left.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  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
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Chat/left.imageset/left.png 0 → 100644

28 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Chat/right.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "right.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  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
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Chat/right.imageset/right.png 0 → 100644

27.9 KB

LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景220x40.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "背景220x40.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  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
LiveVideoCloud/LiveVideoCloud/animation.xcassets/Interaction/Gift/背景220x40.imageset/背景220x40.png 0 → 100644

1.42 KB