个播房上下滑动
This commit is contained in:
@@ -173,6 +173,7 @@
|
|||||||
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804C27537950003DAC0C /* MessageCell.m */; };
|
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804C27537950003DAC0C /* MessageCell.m */; };
|
||||||
9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804E2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m */; };
|
9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804E2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m */; };
|
||||||
9B7D8857279C099C00785A25 /* XPSkillCardListPropCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D8856279C099C00785A25 /* XPSkillCardListPropCell.m */; };
|
9B7D8857279C099C00785A25 /* XPSkillCardListPropCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D8856279C099C00785A25 /* XPSkillCardListPropCell.m */; };
|
||||||
|
9B7D904D287BC5E20033A45E /* AnchorRoomScrollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D904C287BC5E20033A45E /* AnchorRoomScrollView.m */; };
|
||||||
9B8585D3278837CE00D7D5C6 /* NobleLevelUpModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B8585D2278837CE00D7D5C6 /* NobleLevelUpModel.m */; };
|
9B8585D3278837CE00D7D5C6 /* NobleLevelUpModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B8585D2278837CE00D7D5C6 /* NobleLevelUpModel.m */; };
|
||||||
9B8585F52788699400D7D5C6 /* FBKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B8585F42788699400D7D5C6 /* FBKVOController.m */; };
|
9B8585F52788699400D7D5C6 /* FBKVOController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B8585F42788699400D7D5C6 /* FBKVOController.m */; };
|
||||||
9B85B6D7279FDABA00A0A1AC /* XPUserCardSkillCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B85B6D6279FDABA00A0A1AC /* XPUserCardSkillCardView.m */; };
|
9B85B6D7279FDABA00A0A1AC /* XPUserCardSkillCardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B85B6D6279FDABA00A0A1AC /* XPUserCardSkillCardView.m */; };
|
||||||
@@ -1189,6 +1190,8 @@
|
|||||||
9B7D804F2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+NIMScrollToBottom.h"; sourceTree = "<group>"; };
|
9B7D804F2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UITableView+NIMScrollToBottom.h"; sourceTree = "<group>"; };
|
||||||
9B7D8855279C099C00785A25 /* XPSkillCardListPropCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardListPropCell.h; sourceTree = "<group>"; };
|
9B7D8855279C099C00785A25 /* XPSkillCardListPropCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSkillCardListPropCell.h; sourceTree = "<group>"; };
|
||||||
9B7D8856279C099C00785A25 /* XPSkillCardListPropCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardListPropCell.m; sourceTree = "<group>"; };
|
9B7D8856279C099C00785A25 /* XPSkillCardListPropCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSkillCardListPropCell.m; sourceTree = "<group>"; };
|
||||||
|
9B7D904B287BC5E20033A45E /* AnchorRoomScrollView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnchorRoomScrollView.h; sourceTree = "<group>"; };
|
||||||
|
9B7D904C287BC5E20033A45E /* AnchorRoomScrollView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnchorRoomScrollView.m; sourceTree = "<group>"; };
|
||||||
9B8585D1278837CE00D7D5C6 /* NobleLevelUpModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NobleLevelUpModel.h; sourceTree = "<group>"; };
|
9B8585D1278837CE00D7D5C6 /* NobleLevelUpModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NobleLevelUpModel.h; sourceTree = "<group>"; };
|
||||||
9B8585D2278837CE00D7D5C6 /* NobleLevelUpModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NobleLevelUpModel.m; sourceTree = "<group>"; };
|
9B8585D2278837CE00D7D5C6 /* NobleLevelUpModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NobleLevelUpModel.m; sourceTree = "<group>"; };
|
||||||
9B8585F32788699400D7D5C6 /* FBKVOController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBKVOController.h; sourceTree = "<group>"; };
|
9B8585F32788699400D7D5C6 /* FBKVOController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FBKVOController.h; sourceTree = "<group>"; };
|
||||||
@@ -3517,6 +3520,15 @@
|
|||||||
path = Session;
|
path = Session;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
9B7D904A287BC4FC0033A45E /* AnchorCycleView */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
9B7D904B287BC5E20033A45E /* AnchorRoomScrollView.h */,
|
||||||
|
9B7D904C287BC5E20033A45E /* AnchorRoomScrollView.m */,
|
||||||
|
);
|
||||||
|
path = AnchorCycleView;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
9B8585F22788699400D7D5C6 /* KVO */ = {
|
9B8585F22788699400D7D5C6 /* KVO */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@@ -5770,6 +5782,7 @@
|
|||||||
E8AEAED8271413530017FCE0 /* View */ = {
|
E8AEAED8271413530017FCE0 /* View */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
9B7D904A287BC4FC0033A45E /* AnchorCycleView */,
|
||||||
E87AE8C2284E1A6B00CAFBB3 /* NewUserGreet */,
|
E87AE8C2284E1A6B00CAFBB3 /* NewUserGreet */,
|
||||||
E8E859E628264F0000EE4857 /* BackMusic */,
|
E8E859E628264F0000EE4857 /* BackMusic */,
|
||||||
9B6E8570281AAD260041A321 /* RoomRecommend */,
|
9B6E8570281AAD260041A321 /* RoomRecommend */,
|
||||||
@@ -7186,6 +7199,7 @@
|
|||||||
E8664ED327E4258A000171BA /* RoomPKTimeItemModel.m in Sources */,
|
E8664ED327E4258A000171BA /* RoomPKTimeItemModel.m in Sources */,
|
||||||
E8412FA22779BE8F006E1101 /* XPRoomSettingViewController.m in Sources */,
|
E8412FA22779BE8F006E1101 /* XPRoomSettingViewController.m in Sources */,
|
||||||
E89D60BD271D647A001F8895 /* XPRoomPresenter.m in Sources */,
|
E89D60BD271D647A001F8895 /* XPRoomPresenter.m in Sources */,
|
||||||
|
9B7D904D287BC5E20033A45E /* AnchorRoomScrollView.m in Sources */,
|
||||||
E80DE4072775665000BE5BCB /* XPFirstRechargeCollectionViewCell.m in Sources */,
|
E80DE4072775665000BE5BCB /* XPFirstRechargeCollectionViewCell.m in Sources */,
|
||||||
E8899C822785A694007944BE /* DatingInfoModel.m in Sources */,
|
E8899C822785A694007944BE /* DatingInfoModel.m in Sources */,
|
||||||
9BB89DC327FE7F3A00586A83 /* XPAnchorFansRelationModel.m in Sources */,
|
9BB89DC327FE7F3A00586A83 /* XPAnchorFansRelationModel.m in Sources */,
|
||||||
|
@@ -49,6 +49,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// 获取房间超管列表
|
/// 获取房间超管列表
|
||||||
/// @param roomUid 房间的uid
|
/// @param roomUid 房间的uid
|
||||||
- (void)getRoomSuperAdmin:(NSString *)roomUid;
|
- (void)getRoomSuperAdmin:(NSString *)roomUid;
|
||||||
|
///获取循环的推荐房间
|
||||||
|
- (void)getCycleAnchorRoomList:(NSString *)roomId;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#import "GiftInfoModel.h"
|
#import "GiftInfoModel.h"
|
||||||
#import "XPMessageRemoteExtModel.h"
|
#import "XPMessageRemoteExtModel.h"
|
||||||
#import "RoomNewUserGreetModel.h"
|
#import "RoomNewUserGreetModel.h"
|
||||||
|
#import "XPRoomRecommendModel.h"
|
||||||
///P
|
///P
|
||||||
#import "XPRoomProtocol.h"
|
#import "XPRoomProtocol.h"
|
||||||
|
|
||||||
@@ -201,4 +202,21 @@
|
|||||||
[[self getView] getRoomSuperAdminScuccess:array];
|
[[self getView] getRoomSuperAdminScuccess:array];
|
||||||
}] roomUid:roomUid];
|
}] roomUid:roomUid];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)getCycleAnchorRoomList:(NSString *)roomId {
|
||||||
|
[Api reqeustRecommendRoom:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
|
if (code == 200) {
|
||||||
|
NSArray *array = [XPRoomRecommendModel modelsWithArray:data.data];
|
||||||
|
NSMutableArray *roomIdArray = [NSMutableArray array];
|
||||||
|
for (XPRoomRecommendModel *roomInfo in array) {
|
||||||
|
[roomIdArray addObject:[NSString stringWithFormat:@"%zd", roomInfo.uid]];
|
||||||
|
}
|
||||||
|
[[self getView] getCycleAnchorRoomListSuccess:roomIdArray];
|
||||||
|
} else {
|
||||||
|
#warning todo - guilong test
|
||||||
|
[[self getView] getCycleAnchorRoomListSuccess:@[@"1005437"]];
|
||||||
|
}
|
||||||
|
} roomId:roomId];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -23,6 +23,9 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
- (void)enterRoomFail:(NSInteger)code;
|
- (void)enterRoomFail:(NSInteger)code;
|
||||||
///获取超管成功
|
///获取超管成功
|
||||||
- (void)getRoomSuperAdminScuccess:(NSArray *)list;
|
- (void)getRoomSuperAdminScuccess:(NSArray *)list;
|
||||||
|
///获取循环的个播房列表成功
|
||||||
|
- (void)getCycleAnchorRoomListSuccess:(NSArray *)list;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -0,0 +1,33 @@
|
|||||||
|
//
|
||||||
|
// AnchorRoomScrollView.h
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/7/11.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
|
@class AnchorRoomScrollView;
|
||||||
|
|
||||||
|
@protocol AnchorRoomScrollViewDelegate <NSObject>
|
||||||
|
|
||||||
|
- (void)anchorScrollView:(AnchorRoomScrollView *)anchorScrollView currentPlayerIndex:(NSInteger)index;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@interface AnchorRoomScrollView : UIScrollView
|
||||||
|
|
||||||
|
@property (nonatomic, assign) id<AnchorRoomScrollViewDelegate> anchorScrollDelegate;
|
||||||
|
@property (nonatomic, assign) NSInteger index;
|
||||||
|
@property (nonatomic, strong) UIImageView *upperImageView;
|
||||||
|
@property (nonatomic, strong) UIImageView *middleImageView;
|
||||||
|
|
||||||
|
- (instancetype)initWithFrame:(CGRect)frame;
|
||||||
|
|
||||||
|
- (void)updateForLives:(NSMutableArray *)livesArray withCurrentIndex:(NSInteger) index;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
NS_ASSUME_NONNULL_END
|
204
xplan-ios/Main/Room/View/AnchorCycleView/AnchorRoomScrollView.m
Normal file
204
xplan-ios/Main/Room/View/AnchorCycleView/AnchorRoomScrollView.m
Normal file
@@ -0,0 +1,204 @@
|
|||||||
|
//
|
||||||
|
// AnchorRoomScrollView.m
|
||||||
|
// xplan-ios
|
||||||
|
//
|
||||||
|
// Created by GreenLand on 2022/7/11.
|
||||||
|
//
|
||||||
|
|
||||||
|
#import "AnchorRoomScrollView.h"
|
||||||
|
|
||||||
|
@interface AnchorRoomScrollView()<UIScrollViewDelegate, UIGestureRecognizerDelegate>
|
||||||
|
|
||||||
|
@property (nonatomic, strong) NSMutableArray * lives;
|
||||||
|
//@property (nonatomic, strong) NSString *live;
|
||||||
|
@property (nonatomic, strong) UIImageView *downImageView;
|
||||||
|
//@property (nonatomic, strong) NSString *upperLive, *middleLive, *downLive;
|
||||||
|
@property (nonatomic, strong) NSString *upperLive, *middleLive, *downLive;
|
||||||
|
@property (nonatomic, assign) NSInteger currentIndex;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation AnchorRoomScrollView
|
||||||
|
|
||||||
|
- (NSMutableArray *)lives
|
||||||
|
{
|
||||||
|
if (!_lives) {
|
||||||
|
_lives = [NSMutableArray array];
|
||||||
|
}
|
||||||
|
return _lives;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (instancetype)initWithFrame:(CGRect)frame
|
||||||
|
{
|
||||||
|
self = [super initWithFrame:frame];
|
||||||
|
if(self)
|
||||||
|
{
|
||||||
|
self.contentSize = CGSizeMake(0, frame.size.height * 3);
|
||||||
|
self.contentOffset = CGPointMake(0, frame.size.height);
|
||||||
|
self.pagingEnabled = YES;
|
||||||
|
self.opaque = YES;
|
||||||
|
self.backgroundColor = [UIColor yellowColor];
|
||||||
|
self.showsHorizontalScrollIndicator = NO;
|
||||||
|
self.showsVerticalScrollIndicator = NO;
|
||||||
|
self.delegate = self;
|
||||||
|
self.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||||
|
self.tag = 1000;
|
||||||
|
// self.delaysContentTouches = NO;
|
||||||
|
// self.canCancelContentTouches = NO;
|
||||||
|
|
||||||
|
|
||||||
|
// image views
|
||||||
|
// blur effect
|
||||||
|
// UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
|
||||||
|
// blur view
|
||||||
|
// UIVisualEffectView *visualEffectViewUpper = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
|
||||||
|
// UIVisualEffectView *visualEffectViewMiddle = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
|
||||||
|
// UIVisualEffectView *visualEffectViewDown = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
|
||||||
|
self.upperImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
|
||||||
|
self.middleImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, frame.size.height, frame.size.width, frame.size.height)];
|
||||||
|
self.downImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, frame.size.height*2, frame.size.width, frame.size.height)];
|
||||||
|
// add image views
|
||||||
|
[self addSubview:self.upperImageView];
|
||||||
|
[self addSubview:self.middleImageView];
|
||||||
|
[self addSubview:self.downImageView];
|
||||||
|
// visualEffectViewUpper.frame = self.upperImageView.frame;
|
||||||
|
// [self addSubview:visualEffectViewUpper];
|
||||||
|
// visualEffectViewMiddle.frame = self.middleImageView.frame;
|
||||||
|
// [self addSubview:visualEffectViewMiddle];
|
||||||
|
// visualEffectViewDown.frame = self.downImageView.frame;
|
||||||
|
// [self addSubview:visualEffectViewDown];
|
||||||
|
|
||||||
|
}
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateForLives:(NSMutableArray *)livesArray withCurrentIndex:(NSInteger)index
|
||||||
|
{
|
||||||
|
if (livesArray.count && [livesArray firstObject]) {
|
||||||
|
[self.lives removeAllObjects];
|
||||||
|
[self.lives addObjectsFromArray:livesArray];
|
||||||
|
self.currentIndex = index;
|
||||||
|
_upperLive = [[NSString alloc] init];
|
||||||
|
_middleLive = (NSString *)_lives[_currentIndex];
|
||||||
|
_downLive = [[NSString alloc] init];
|
||||||
|
|
||||||
|
if (_currentIndex == 0) {
|
||||||
|
_upperLive = (NSString *)[_lives lastObject];
|
||||||
|
} else {
|
||||||
|
_upperLive = (NSString *)_lives[_currentIndex - 1];
|
||||||
|
}
|
||||||
|
if (_currentIndex == _lives.count - 1) {
|
||||||
|
_downLive = (NSString *)[_lives firstObject];
|
||||||
|
} else {
|
||||||
|
_downLive = (NSString *)_lives[_currentIndex + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
[self prepareForImageView:self.upperImageView withLive:_upperLive];
|
||||||
|
[self prepareForImageView:self.middleImageView withLive:_middleLive];
|
||||||
|
[self prepareForImageView:self.downImageView withLive:_downLive];
|
||||||
|
}
|
||||||
|
self.scrollEnabled = livesArray.count > 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) prepareForImageView: (UIImageView *)imageView withLive:(NSString *)live
|
||||||
|
{
|
||||||
|
// download images for ImageView.
|
||||||
|
imageView.image = [UIImage imageNamed:@"room_background"];
|
||||||
|
imageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)switchPlayer:(UIScrollView*)scrollView
|
||||||
|
{
|
||||||
|
CGFloat offset = scrollView.contentOffset.y;
|
||||||
|
if (self.lives.count) {
|
||||||
|
if (offset >= 2*self.frame.size.height)
|
||||||
|
{
|
||||||
|
// slides to the down player
|
||||||
|
scrollView.contentOffset = CGPointMake(0, self.frame.size.height);
|
||||||
|
_currentIndex++;
|
||||||
|
self.upperImageView.image = self.middleImageView.image;
|
||||||
|
self.middleImageView.image = self.downImageView.image;
|
||||||
|
if (_currentIndex == self.lives.count - 1)
|
||||||
|
{
|
||||||
|
_downLive = [self.lives firstObject];
|
||||||
|
} else if (_currentIndex == self.lives.count)
|
||||||
|
{
|
||||||
|
_downLive = self.lives[1];
|
||||||
|
_currentIndex = 0;
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
_downLive = self.lives[_currentIndex+1];
|
||||||
|
}
|
||||||
|
[self prepareForImageView:self.downImageView withLive:_downLive];
|
||||||
|
if ([self.anchorScrollDelegate respondsToSelector:@selector(anchorScrollView:currentPlayerIndex:)]) {
|
||||||
|
[self.anchorScrollDelegate anchorScrollView:self currentPlayerIndex:_currentIndex];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (offset <= 0)
|
||||||
|
{
|
||||||
|
// slides to the upper player
|
||||||
|
scrollView.contentOffset = CGPointMake(0, self.frame.size.height);
|
||||||
|
_currentIndex--;
|
||||||
|
self.downImageView.image = self.middleImageView.image;
|
||||||
|
self.middleImageView.image = self.upperImageView.image;
|
||||||
|
if (_currentIndex == 0)
|
||||||
|
{
|
||||||
|
_upperLive = [self.lives lastObject];
|
||||||
|
|
||||||
|
} else if (_currentIndex == -1)
|
||||||
|
{
|
||||||
|
_upperLive = self.lives[self.lives.count - 2];
|
||||||
|
_currentIndex = self.lives.count-1;
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
_upperLive = self.lives[_currentIndex - 1];
|
||||||
|
}
|
||||||
|
[self prepareForImageView:self.upperImageView withLive:_upperLive];
|
||||||
|
if ([self.anchorScrollDelegate respondsToSelector:@selector(anchorScrollView:currentPlayerIndex:)]) {
|
||||||
|
[self.anchorScrollDelegate anchorScrollView:self currentPlayerIndex:_currentIndex];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-(void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||||
|
NSLog(@"%@", [scrollView class]);
|
||||||
|
[self switchPlayer:scrollView];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||||
|
// UIView *view = [super hitTest:point withEvent:event];
|
||||||
|
// return view == self?nil:view;
|
||||||
|
//}
|
||||||
|
|
||||||
|
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
|
||||||
|
///1000是外部的scrollView 1001是人气主播中的collectionView
|
||||||
|
if (otherGestureRecognizer.view.tag == 999) {
|
||||||
|
// self.scrollEnabled = NO;
|
||||||
|
// if (self.contentOffset.y != 0) {
|
||||||
|
// self.contentOffset = CGPointMake(0, 0);;
|
||||||
|
// }
|
||||||
|
return NO;
|
||||||
|
} else {
|
||||||
|
// self.scrollEnabled = YES;
|
||||||
|
}
|
||||||
|
return YES;
|
||||||
|
if (gestureRecognizer.state == 0) {
|
||||||
|
return YES;
|
||||||
|
} else {
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// called when a gesture recognizer attempts to transition out of UIGestureRecognizerStatePossible. returning NO causes it to transition to UIGestureRecognizerStateFailed
|
||||||
|
//- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
|
||||||
|
// return YES;
|
||||||
|
//}
|
||||||
|
|
||||||
|
@end
|
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
||||||
|
|
||||||
@interface XPRoomMessageContainerView ()<UITableViewDelegate, UITableViewDataSource, XPRoomMessageTableViewCellDelegate>
|
@interface XPRoomMessageContainerView ()<UITableViewDelegate, UITableViewDataSource, XPRoomMessageTableViewCellDelegate, UIGestureRecognizerDelegate>
|
||||||
///房间的代理
|
///房间的代理
|
||||||
@property (nonatomic,weak) id<RoomHostDelegate> hostDelegate;
|
@property (nonatomic,weak) id<RoomHostDelegate> hostDelegate;
|
||||||
|
|
||||||
@@ -840,6 +840,31 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
|
||||||
|
//// return NO;
|
||||||
|
//// - (BOOL)mainTableViewGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
|
||||||
|
// ///1000是外部的scrollView 1001是人气主播中的collectionView
|
||||||
|
// if (otherGestureRecognizer.view.tag == 1000) {
|
||||||
|
// return NO;
|
||||||
|
// }
|
||||||
|
// return [gestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]] && [otherGestureRecognizer isKindOfClass:[UIPanGestureRecognizer class]];
|
||||||
|
//}
|
||||||
|
|
||||||
|
//- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
||||||
|
// if (scrollView.contentOffset.y > 0) {
|
||||||
|
// scrollView.contentOffset = CGPointMake(0, 0);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
|
||||||
|
//- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||||
|
// UIView *view = [super hitTest:point withEvent:event];
|
||||||
|
// return view == self?nil:view;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
|
||||||
#pragma mark - Getters And Setters
|
#pragma mark - Getters And Setters
|
||||||
- (UITableView *)messageTableView {
|
- (UITableView *)messageTableView {
|
||||||
if (!_messageTableView) {
|
if (!_messageTableView) {
|
||||||
@@ -850,6 +875,9 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
|||||||
_messageTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
_messageTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||||
_messageTableView.backgroundColor = [UIColor clearColor];
|
_messageTableView.backgroundColor = [UIColor clearColor];
|
||||||
_messageTableView.showsVerticalScrollIndicator = NO;
|
_messageTableView.showsVerticalScrollIndicator = NO;
|
||||||
|
_messageTableView.tag = 999;
|
||||||
|
// _messageTableView.delaysContentTouches = NO;
|
||||||
|
_messageTableView.canCancelContentTouches = NO;
|
||||||
if (@available(iOS 11.0, *)) {
|
if (@available(iOS 11.0, *)) {
|
||||||
_messageTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
_messageTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||||
}
|
}
|
||||||
|
@@ -47,6 +47,7 @@
|
|||||||
#import "XPArrangeMicViewController.h"
|
#import "XPArrangeMicViewController.h"
|
||||||
#import "XPRoomSettingInputView.h"
|
#import "XPRoomSettingInputView.h"
|
||||||
#import "XPRoomLittleGameContainerView.h"
|
#import "XPRoomLittleGameContainerView.h"
|
||||||
|
#import "AnchorRoomScrollView.h"
|
||||||
///P
|
///P
|
||||||
#import "XPRoomPresenter.h"
|
#import "XPRoomPresenter.h"
|
||||||
#import "XPRoomProtocol.h"
|
#import "XPRoomProtocol.h"
|
||||||
@@ -59,9 +60,14 @@ UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
|
|||||||
UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
||||||
|
|
||||||
|
|
||||||
@interface XPRoomViewController ()<XPRoomProtocol, RoomHostDelegate, NIMChatroomManagerDelegate, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMLoginManagerDelegate, XPRoomSettingInputViewDelegate,XPRoomLittleGameContainerViewDelegate>
|
@interface XPRoomViewController ()<XPRoomProtocol, RoomHostDelegate, NIMChatroomManagerDelegate, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMLoginManagerDelegate, XPRoomSettingInputViewDelegate,XPRoomLittleGameContainerViewDelegate, AnchorRoomScrollViewDelegate>
|
||||||
///背景
|
///背景
|
||||||
@property (nonatomic,strong) XPRoomBackContainerView *backContainerView;
|
@property (nonatomic,strong) XPRoomBackContainerView *backContainerView;
|
||||||
|
|
||||||
|
///个播上下切换view
|
||||||
|
@property (nonatomic, strong) AnchorRoomScrollView *anchorScrollView;
|
||||||
|
///个播滚动索引
|
||||||
|
@property (nonatomic, assign) int anchorScrollIndex;
|
||||||
///房间信息
|
///房间信息
|
||||||
@property (nonatomic,strong) RoomHeaderView *roomHeaderView;
|
@property (nonatomic,strong) RoomHeaderView *roomHeaderView;
|
||||||
///坑位信息
|
///坑位信息
|
||||||
@@ -98,6 +104,11 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
@property (nonatomic,assign) BOOL isRequestSuperAdmin;
|
@property (nonatomic,assign) BOOL isRequestSuperAdmin;
|
||||||
///是否是最小化进房
|
///是否是最小化进房
|
||||||
@property (nonatomic,assign) BOOL isMiniEnter;
|
@property (nonatomic,assign) BOOL isMiniEnter;
|
||||||
|
///个播房列表
|
||||||
|
@property (nonatomic, strong) NSMutableArray *cycleAnchorList;
|
||||||
|
///是否获取了个播房列表,只需第一次加载时获取
|
||||||
|
@property (nonatomic, assign) BOOL hadGetAnchorList;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation XPRoomViewController
|
@implementation XPRoomViewController
|
||||||
@@ -258,6 +269,53 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)updateViewConstraintsOnAnchorRoom {
|
||||||
|
[self.anchorScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.mas_equalTo(self.view);
|
||||||
|
}];
|
||||||
|
[self.backContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
}];
|
||||||
|
[self.roomHeaderView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.top.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.height.mas_equalTo(kNavigationHeight);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.stageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.top.mas_equalTo(self.roomHeaderView.mas_bottom);
|
||||||
|
make.height.mas_equalTo(self.stageView.hightForStageView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.messageContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.equalTo(self.stageView.mas_bottom);
|
||||||
|
make.bottom.equalTo(self.menuContainerView.mas_top).offset(-5);
|
||||||
|
make.left.equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.right.equalTo(self.activityContainerView.mas_left).offset(-10);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.menuContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.bottom.mas_equalTo(self.anchorScrollView.middleImageView).mas_offset(-kSafeAreaBottomHeight- 8);
|
||||||
|
make.height.mas_equalTo(40);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.activityContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.mas_equalTo(self.messageContainerView);
|
||||||
|
make.right.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.bottom.mas_equalTo(self.menuContainerView.mas_top).offset(-5);
|
||||||
|
make.width.mas_equalTo(80);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.animationView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
}];
|
||||||
|
|
||||||
|
[self.functionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.edges.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)exitOldRoom {
|
- (void)exitOldRoom {
|
||||||
NSString * roomUid = [NSString stringWithFormat:@"%ld", [XPRoomMiniManager shareManager].getRoomInfo.uid];
|
NSString * roomUid = [NSString stringWithFormat:@"%ld", [XPRoomMiniManager shareManager].getRoomInfo.uid];
|
||||||
if (roomUid.integerValue > 0 && roomUid.integerValue != self.roomUid.integerValue) {
|
if (roomUid.integerValue > 0 && roomUid.integerValue != self.roomUid.integerValue) {
|
||||||
@@ -385,6 +443,38 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)changeStageViewOnAnchorRoom {
|
||||||
|
if (self.roomInfo.roomModeType == RoomModeType_Open_AcrossRoomPK_mode && ![self.stageView isKindOfClass:[AnchorPKStageView class]]) {
|
||||||
|
[self.stageView removeFromSuperview];
|
||||||
|
self.stageView = nil;
|
||||||
|
self.stageView = [[AnchorPKStageView alloc] initWithDelegate:self];
|
||||||
|
} else if(self.roomInfo.roomModeType == RoomModeType_Normal_Mode && ![self.stageView isKindOfClass:[AnchorStageView class]]) {
|
||||||
|
[self.stageView removeFromSuperview];
|
||||||
|
self.stageView = nil;
|
||||||
|
self.stageView = [[AnchorStageView alloc] initWithDelegate:self];
|
||||||
|
}
|
||||||
|
if (!self.stageView.superview) {
|
||||||
|
[self.anchorScrollView insertSubview:self.stageView belowSubview:self.roomHeaderView];
|
||||||
|
}
|
||||||
|
[self.stageView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.left.right.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.top.mas_equalTo(self.roomHeaderView.mas_bottom);
|
||||||
|
make.height.mas_equalTo(self.stageView.hightForStageView);
|
||||||
|
}];
|
||||||
|
[self.messageContainerView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.mas_equalTo(self.stageView.mas_bottom);
|
||||||
|
make.bottom.mas_equalTo(self.menuContainerView.mas_top).offset(-5);
|
||||||
|
make.left.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.right.mas_equalTo(self.activityContainerView.mas_left).offset(-10);
|
||||||
|
}];
|
||||||
|
[self.activityContainerView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||||
|
make.top.mas_equalTo(self.messageContainerView);
|
||||||
|
make.right.mas_equalTo(self.anchorScrollView.middleImageView);
|
||||||
|
make.bottom.mas_equalTo(self.menuContainerView.mas_top).offset(-5);
|
||||||
|
make.width.mas_equalTo(80);
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
|
||||||
- (void)cancelRoomArrangeMic {
|
- (void)cancelRoomArrangeMic {
|
||||||
///退出排麦
|
///退出排麦
|
||||||
if (self.roomInfo.roomModeType == RoomModeType_Open_Micro_Mode || self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
if (self.roomInfo.roomModeType == RoomModeType_Open_Micro_Mode || self.roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
||||||
@@ -490,6 +580,10 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
self.hasAnimationEffect = roomInfo.hasAnimationEffect;
|
self.hasAnimationEffect = roomInfo.hasAnimationEffect;
|
||||||
self.roomInfo = roomInfo;
|
self.roomInfo = roomInfo;
|
||||||
self.userInfo = userInfo;
|
self.userInfo = userInfo;
|
||||||
|
if (!self.hadGetAnchorList) {
|
||||||
|
[self.presenter getCycleAnchorRoomList:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
|
||||||
|
self.hadGetAnchorList = YES;
|
||||||
|
}
|
||||||
if (roomInfo.valid) { // 房间有效,直接进入房间
|
if (roomInfo.valid) { // 房间有效,直接进入房间
|
||||||
if (roomInfo.roomPwd.length > 0 && roomInfo.uid != [AccountInfoStorage instance].getUid.integerValue && [XPRoomMiniManager shareManager].getRoomInfo.uid != self.roomUid.integerValue) {//进房密码的情况
|
if (roomInfo.roomPwd.length > 0 && roomInfo.uid != [AccountInfoStorage instance].getUid.integerValue && [XPRoomMiniManager shareManager].getRoomInfo.uid != self.roomUid.integerValue) {//进房密码的情况
|
||||||
if (!self.isRequestSuperAdmin) {
|
if (!self.isRequestSuperAdmin) {
|
||||||
@@ -503,7 +597,30 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
self.roomInfo.datingState = roomInfo.roomModeType == RoomModeType_Open_Blind ? RoomDatingStateChangeType_Open : RoomDatingStateChangeType_Normal;
|
self.roomInfo.datingState = roomInfo.roomModeType == RoomModeType_Open_Blind ? RoomDatingStateChangeType_Open : RoomDatingStateChangeType_Normal;
|
||||||
[self changeStageViewOnRoomUpdate];
|
if (self.roomInfo.type == RoomType_Anchor) {
|
||||||
|
if (!self.anchorScrollView.superview) {
|
||||||
|
for (UIView *subViews in self.view.subviews) {
|
||||||
|
[subViews removeFromSuperview];
|
||||||
|
}
|
||||||
|
[self.view addSubview:self.anchorScrollView];
|
||||||
|
[self.anchorScrollView addSubview:self.backContainerView];
|
||||||
|
[self.anchorScrollView addSubview:self.stageView];
|
||||||
|
[self.anchorScrollView addSubview:self.messageContainerView];
|
||||||
|
[self.anchorScrollView addSubview:self.menuContainerView];
|
||||||
|
[self.anchorScrollView addSubview:self.activityContainerView];
|
||||||
|
[self.anchorScrollView addSubview:self.roomHeaderView];
|
||||||
|
[self.anchorScrollView addSubview:self.functionView];
|
||||||
|
[self.anchorScrollView addSubview:self.animationView];
|
||||||
|
} else {
|
||||||
|
if (!self.messageContainerView.superview) {
|
||||||
|
[self.anchorScrollView addSubview:self.messageContainerView];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self updateViewConstraintsOnAnchorRoom];
|
||||||
|
[self changeStageViewOnAnchorRoom];
|
||||||
|
} else {
|
||||||
|
[self changeStageViewOnRoomUpdate];
|
||||||
|
}
|
||||||
[self.roomHeaderView onRoomEntered];
|
[self.roomHeaderView onRoomEntered];
|
||||||
[self.activityContainerView onRoomEntered];
|
[self.activityContainerView onRoomEntered];
|
||||||
[self.menuContainerView onRoomEntered];
|
[self.menuContainerView onRoomEntered];
|
||||||
@@ -583,6 +700,17 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
self.isRequestSuperAdmin = YES;
|
self.isRequestSuperAdmin = YES;
|
||||||
self.superMangerList = list;
|
self.superMangerList = list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)getCycleAnchorRoomListSuccess:(NSArray *)list {
|
||||||
|
if (self.roomInfo.type != RoomType_Anchor) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[self.cycleAnchorList removeAllObjects];
|
||||||
|
[self.cycleAnchorList addObjectsFromArray:list];
|
||||||
|
[self.cycleAnchorList insertObject:[NSString stringWithFormat:@"%zd", self.roomInfo.uid] atIndex:0];
|
||||||
|
[self.anchorScrollView updateForLives:self.cycleAnchorList withCurrentIndex:0];
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - NIMChatroomManagerDelegate
|
#pragma mark - NIMChatroomManagerDelegate
|
||||||
- (void)chatroomBeKicked:(NIMChatroomBeKickedResult *)result {
|
- (void)chatroomBeKicked:(NIMChatroomBeKickedResult *)result {
|
||||||
if (result.reason == 2) {
|
if (result.reason == 2) {
|
||||||
@@ -665,7 +793,41 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
newRoomInfo.hadChangeRoomType = self.roomInfo.type != newRoomInfo.type;
|
newRoomInfo.hadChangeRoomType = self.roomInfo.type != newRoomInfo.type;
|
||||||
self.roomInfo = newRoomInfo;
|
self.roomInfo = newRoomInfo;
|
||||||
[self.backContainerView onRoomUpdate];
|
[self.backContainerView onRoomUpdate];
|
||||||
[self changeStageViewOnRoomUpdate];
|
if (self.roomInfo.type == RoomType_Anchor) {
|
||||||
|
if (self.anchorScrollView.superview) {
|
||||||
|
// for (UIView *view in self.anchorScrollView.upperImageView.subviews) {
|
||||||
|
// [view removeFromSuperview];
|
||||||
|
// }
|
||||||
|
} else {
|
||||||
|
for (UIView *subViews in self.view.subviews) {
|
||||||
|
[subViews removeFromSuperview];
|
||||||
|
}
|
||||||
|
[self.view addSubview:self.anchorScrollView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.backContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.stageView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.messageContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.menuContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.activityContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.roomHeaderView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.functionView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.animationView];
|
||||||
|
// [self updateViewConstraintsOnAnchorRoom];
|
||||||
|
// [self changeStageViewOnAnchorRoom];
|
||||||
|
}
|
||||||
|
// [self.anchorScrollView updateForLives:@[@"123", @"234"] withCurrentIndex:0];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.backContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.stageView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.messageContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.menuContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.activityContainerView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.roomHeaderView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.functionView];
|
||||||
|
// [self.anchorScrollView.upperImageView addSubview:self.animationView];
|
||||||
|
// [self updateViewConstraintsOnAnchorRoom];
|
||||||
|
// [self changeStageViewOnAnchorRoom];
|
||||||
|
} else {
|
||||||
|
[self changeStageViewOnRoomUpdate];
|
||||||
|
}
|
||||||
[self.stageView onRoomUpdate];
|
[self.stageView onRoomUpdate];
|
||||||
[self.menuContainerView onRoomUpdate];
|
[self.menuContainerView onRoomUpdate];
|
||||||
[self.functionView onRoomUpdate];
|
[self.functionView onRoomUpdate];
|
||||||
@@ -1004,6 +1166,31 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
[self.functionView hiddenSudGamePostionView];
|
[self.functionView hiddenSudGamePostionView];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#pragma mark - AnchorRoomScrollViewDelegate
|
||||||
|
- (void)anchorScrollView:(AnchorRoomScrollView *)anchorScrollView currentPlayerIndex:(NSInteger)index {
|
||||||
|
[self exitOldRoom];
|
||||||
|
// [self exitRoom];
|
||||||
|
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
|
||||||
|
[[XPRoomMiniManager shareManager] resetLocalMessage];
|
||||||
|
[[RtcManager instance] exitRoom];
|
||||||
|
[self.presenter reportUserOutRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.uid]];
|
||||||
|
|
||||||
|
[self.messageContainerView removeFromSuperview];
|
||||||
|
self.messageContainerView = nil;
|
||||||
|
[self exitOldRoom];
|
||||||
|
self.roomUid = self.cycleAnchorList[index];
|
||||||
|
[self.presenter initEnterRoom:self.roomUid user:[AccountInfoStorage instance].getUid];
|
||||||
|
/// 公屏 福袋礼物爆出的礼物 需要依赖 当前房间中的礼物列表 需要提前获取礼物列表 可以拿到礼物 没有想到别的方法去解决这个问题 有需要改的在修改吧
|
||||||
|
[self.presenter getNormalGiftList:self.roomUid];
|
||||||
|
///获取房间超管列表
|
||||||
|
[self.presenter getRoomSuperAdmin:self.roomUid];
|
||||||
|
|
||||||
|
// for (UIView *view in anchorScrollView.upperImageView.subviews) {
|
||||||
|
// [view removeFromSuperview];
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - XPRoomSettingInputViewDelegate
|
#pragma mark - XPRoomSettingInputViewDelegate
|
||||||
///点击了完成
|
///点击了完成
|
||||||
- (void)xPRoomSettingInputView:(XPRoomSettingInputView *)view didClickConfirm:(NSString *)text type:(RoomSettingInputType)type {
|
- (void)xPRoomSettingInputView:(XPRoomSettingInputView *)view didClickConfirm:(NSString *)text type:(RoomSettingInputType)type {
|
||||||
@@ -1098,4 +1285,20 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
return _littleGameView;
|
return _littleGameView;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (AnchorRoomScrollView *)anchorScrollView {
|
||||||
|
if (!_anchorScrollView) {
|
||||||
|
_anchorScrollView = [[AnchorRoomScrollView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
||||||
|
_anchorScrollView.anchorScrollDelegate = self;
|
||||||
|
_anchorScrollView.index = self.anchorScrollIndex;
|
||||||
|
}
|
||||||
|
return _anchorScrollView;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSMutableArray *)cycleAnchorList {
|
||||||
|
if (!_cycleAnchorList) {
|
||||||
|
_cycleAnchorList = [NSMutableArray array];
|
||||||
|
}
|
||||||
|
return _cycleAnchorList;
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Reference in New Issue
Block a user