Commit 6985a45e934148f68f12a2c33685576cef48f2c0

Authored by 王军波
1 parent 119c6b6f

评论修改

LiveVideoCloud/AppDelegate/AppDelegate.m
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 // 20170327 20170328 52 // 20170327 20170328
53 53
54 54
55 - CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"2017063077" name:@"阿哈市" portrait:@"http://b.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=f0c5c08030d3d539c16807c70fb7c566/8ad4b31c8701a18bbef9f231982f07082838feba.jpg"]; 55 + CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"2017063222" name:@"阿jhsda的" portrait:@"http://b.hiphotos.baidu.com/zhidao/wh%3D450%2C600/sign=f0c5c08030d3d539c16807c70fb7c566/8ad4b31c8701a18bbef9f231982f07082838feba.jpg"];
56 56
57 57
58 [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) { 58 [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) {
LiveVideoCloud/Classes/Sections/InteractionSections/Gift/AnimQueueManager.m
@@ -85,7 +85,7 @@ @@ -85,7 +85,7 @@
85 } 85 }
86 } 86 }
87 87
88 -- (void)cancelAllGiftOperation 88 +- (void)cancelAllGiftOperations
89 { 89 {
90 [self.comboAnimationQueue cancelAllOperations]; 90 [self.comboAnimationQueue cancelAllOperations];
91 [self.expenAnimationQueue cancelAllOperations]; 91 [self.expenAnimationQueue cancelAllOperations];
LiveVideoCloud/Classes/Sections/homeSections/View/LVCCommentCell.m
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
14 @property (nonatomic, strong) UILabel *nameLabel; 14 @property (nonatomic, strong) UILabel *nameLabel;
15 @property (nonatomic, strong) UIButton *likeButton; 15 @property (nonatomic, strong) UIButton *likeButton;
16 @property (nonatomic, strong) UILabel *commentLabel; 16 @property (nonatomic, strong) UILabel *commentLabel;
  17 +@property (nonatomic, strong) UIView *lineView;
17 18
18 @end 19 @end
19 20
@@ -27,6 +28,7 @@ @@ -27,6 +28,7 @@
27 [self addSubview:self.nameLabel]; 28 [self addSubview:self.nameLabel];
28 [self addSubview:self.likeButton]; 29 [self addSubview:self.likeButton];
29 [self addSubview:self.commentLabel]; 30 [self addSubview:self.commentLabel];
  31 + [self addSubview:self.lineView];
30 } 32 }
31 return self; 33 return self;
32 } 34 }
@@ -105,6 +107,14 @@ @@ -105,6 +107,14 @@
105 return _commentLabel; 107 return _commentLabel;
106 } 108 }
107 109
  110 +- (UIView *)lineView {
  111 + if (!_lineView) {
  112 + _lineView = [[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height-1, KScreenWidth, 1)];
  113 + _lineView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
  114 + }
  115 + return _lineView;
  116 +}
  117 +
108 - (void)awakeFromNib { 118 - (void)awakeFromNib {
109 [super awakeFromNib]; 119 [super awakeFromNib];
110 // Initialization code 120 // Initialization code
LiveVideoCloud/Classes/Sections/homeSections/View/LVCCommentView.m
@@ -74,11 +74,12 @@ static NSString *commentCellId = @"commentCellId"; @@ -74,11 +74,12 @@ static NSString *commentCellId = @"commentCellId";
74 [_cellHeightArrayM addObject:@"0"]; 74 [_cellHeightArrayM addObject:@"0"];
75 } 75 }
76 } 76 }
  77 + [self.tableview reloadData];
77 } 78 }
78 79
79 - [self.tableview reloadData];  
80 } error:^(NSString *error) { 80 } error:^(NSString *error) {
81 - NSLog(@"获取评论列表失败"); 81 +
  82 + [Tools showHUDInView:self withString:@"获取评论列表失败" autoHide:YES];
82 }]; 83 }];
83 } 84 }
84 85
@@ -170,6 +171,7 @@ static NSString *commentCellId = @"commentCellId"; @@ -170,6 +171,7 @@ static NSString *commentCellId = @"commentCellId";
170 _tableview.dataSource = self; 171 _tableview.dataSource = self;
171 _tableview.showsVerticalScrollIndicator = NO; 172 _tableview.showsVerticalScrollIndicator = NO;
172 _tableview.showsHorizontalScrollIndicator = NO; 173 _tableview.showsHorizontalScrollIndicator = NO;
  174 + _tableview.separatorStyle = UITableViewCellSeparatorStyleNone;
173 [_tableview registerClass:[LVCCommentTitleCell class] forCellReuseIdentifier:titleCellId]; 175 [_tableview registerClass:[LVCCommentTitleCell class] forCellReuseIdentifier:titleCellId];
174 [_tableview registerClass:[LVCCommentCell class] forCellReuseIdentifier:commentCellId]; 176 [_tableview registerClass:[LVCCommentCell class] forCellReuseIdentifier:commentCellId];
175 } 177 }
@@ -248,18 +250,18 @@ static NSString *commentCellId = @"commentCellId"; @@ -248,18 +250,18 @@ static NSString *commentCellId = @"commentCellId";
248 #pragma mark - UITextFieldDelegate 250 #pragma mark - UITextFieldDelegate
249 - (BOOL)textFieldShouldReturn:(UITextField *)textField { 251 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
250 252
251 - textField.text = @"";  
252 - [textField resignFirstResponder];  
253 -  
254 [[CNLiveCommentManager sharedCNLiveCommentManager] commentOnProgramWithProgramId:_model.vId sid:[UserInformationModel manager].uid comment:textField.text completion:^(NSString *errorCode, NSString *errorMsg) { 253 [[CNLiveCommentManager sharedCNLiveCommentManager] commentOnProgramWithProgramId:_model.vId sid:[UserInformationModel manager].uid comment:textField.text completion:^(NSString *errorCode, NSString *errorMsg) {
255 254
256 if ([errorCode isEqualToString:@"0"]) { 255 if ([errorCode isEqualToString:@"0"]) {
257 [self getCommentListWithPid:_model.vId]; 256 [self getCommentListWithPid:_model.vId];
258 [self getCommentCountWithPid:_model.vId]; 257 [self getCommentCountWithPid:_model.vId];
259 } else { 258 } else {
260 - [Tools showHUDInView:self withString:@"发送消息失败" autoHide:YES]; 259 + [Tools showHUDInView:self withString:@"评论失败" autoHide:YES];
261 } 260 }
262 }]; 261 }];
  262 +
  263 + textField.text = @"";
  264 + [textField resignFirstResponder];
263 return YES; 265 return YES;
264 } 266 }
265 267