修改游戏模式下公屏放大缩小

This commit is contained in:
fengshuo
2022-03-24 18:40:23 +08:00
committed by chenguilong
parent f800a66a37
commit 5d43e77028
3 changed files with 47 additions and 3 deletions

View File

@@ -32,7 +32,7 @@
NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
@interface XPRoomMessageContainerView ()<UITableViewDelegate, UITableViewDataSource>
@interface XPRoomMessageContainerView ()<UITableViewDelegate, UITableViewDataSource, XPRoomMessageTableViewCellDelegate>
///
@property (nonatomic,weak) id<RoomHostDelegate> hostDelegate;
@@ -60,6 +60,8 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
@property (nonatomic, strong) NSMutableArray *trumpetQueue;
///
@property (nonatomic, strong) dispatch_source_t trumpetTimer;
///
@property (nonatomic,assign) BOOL isLarge;
@end
@@ -517,6 +519,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
if (cell == nil) {
cell = [[XPRoomMessageTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomMessageTableViewCell class])];
}
cell.delegate = self;
NSAttributedString* attr = [self.datasource objectAtIndex:indexPath.row];
NSString *bubbleStr = [self.messageBubbles objectAtIndex:indexPath.row];
cell.bubbleImageUrl = bubbleStr;
@@ -524,6 +527,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
return cell;
}
- (void)createTrumpetAnimation:(NSDictionary *)attatchment {
self.trumpetView.data = attatchment;
self.trumpetView.hidden = NO;
@@ -577,6 +581,16 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
[self.trumpetView.mainView.layer pop_addAnimation:animation2 forKey:@"animation2"];
[self.trumpetView.mainView.layer pop_addAnimation:animation3 forKey:@"animation3"];
}
#pragma mark - XPRoomMessageTableViewCellDelegate
- (void)xPRoomMessageTableViewCellDidTapEmpty:(XPRoomMessageTableViewCell *)view {
if (self.hostDelegate.getRoomInfo.type == RoomType_MiniGame) {
self.isLarge = !self.isLarge;
CGFloat height = self.isLarge ? 200 : 80;
[self mas_updateConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(height);
}];
}
}
#pragma mark - Getters And Setters
- (UITableView *)messageTableView {