Authored by 盖剑秋

Reset UI after push end.

... ... @@ -88,7 +88,7 @@
[startButton setTitle:@"开始直播" forState:UIControlStateNormal];
UIButton *closeButton = [UIButton buttonWithType:UIButtonTypeCustom];
closeButton.frame = CGRectMake(280-18-8, 8, 18, 18);
closeButton.frame = CGRectMake(280-36, 0, 36, 36);
[closeButton setImage:[UIImage imageNamed:@"home_btn_close"] forState:UIControlStateNormal];
[bg addSubview:closeButton];
[closeButton addTarget:self action:@selector(closeButtonPressed) forControlEvents:UIControlEventTouchUpInside];
... ...
... ... @@ -115,6 +115,15 @@
}
- (void)resetAfterPushEnd {
dispatch_async(dispatch_get_main_queue(), ^{
[self.barrageViewController reset];
self.emojiCountLabel.text = @"0";
self.timeLabel.text = @"00:00:00";
self.onlineCountLabel.text = @"0";
});
}
- (YH_BarrageViewController *) barrageViewController
{
if (_barrageViewController == nil) {
... ... @@ -545,6 +554,7 @@
[[YH_NetworkAdapter adapter] setStatusWithStat:PushStatusEnd andRoomId:_currentChannel.room completion:^(BOOL flag, NSError *error) {
_currentChannel = nil;
[self resetAfterPushEnd];
}];
[_socketService logout];
_socketService=nil;
... ...
... ... @@ -84,6 +84,9 @@
[_scrollingTableViewTimer invalidate];
_scrollingTableViewTimer = nil;
}
[self resetDataMutableArray];
[self reloadData];
}
- (void)resetDataMutableArray
{
... ...