Commit 203fb214373433e7b475c1a300acbc3eb6e34e0d
Merge branch 'master' of bj.gitlab.cnlive.com:ios-team/LiveVideoCloud
Showing
3 changed files
with
27 additions
and
17 deletions
LiveVideoCloud/LiveVideoCloud/Classes/Sections/InteractionSections/TopToolView/TopToolView.h
| @@ -14,4 +14,5 @@ | @@ -14,4 +14,5 @@ | ||
| 14 | - (instancetype _Nonnull)initWithFrame:(CGRect)frame isHost:(BOOL)isHost; | 14 | - (instancetype _Nonnull)initWithFrame:(CGRect)frame isHost:(BOOL)isHost; |
| 15 | 15 | ||
| 16 | @property (nonatomic ,strong) userInfoModel * _Nullable model; | 16 | @property (nonatomic ,strong) userInfoModel * _Nullable model; |
| 17 | + | ||
| 17 | @end | 18 | @end |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/HomeViewController.m
| @@ -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}]; |
| @@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
| 71 | [self.view addSubview:self.pageView]; | 71 | [self.view addSubview:self.pageView]; |
| 72 | [_pageView reloadPages]; | 72 | [_pageView reloadPages]; |
| 73 | [_titleView reloadData]; | 73 | [_titleView reloadData]; |
| 74 | - [self.titleView scrollToElement:1 animated:NO]; | 74 | + [self.titleView scrollToElement:0 animated:NO]; |
| 75 | 75 | ||
| 76 | } | 76 | } |
| 77 | 77 | ||
| @@ -151,15 +151,7 @@ | @@ -151,15 +151,7 @@ | ||
| 151 | 151 | ||
| 152 | - (UIView *)pagingScrollView:(MHPagingScrollView *)pagingScrollView pageForIndex:(NSUInteger)index | 152 | - (UIView *)pagingScrollView:(MHPagingScrollView *)pagingScrollView pageForIndex:(NSUInteger)index |
| 153 | { | 153 | { |
| 154 | - if ([_titleArr[index] isEqualToString:@"推荐"]) { | ||
| 155 | - | ||
| 156 | - LVCTelevisionView *tvView = (LVCTelevisionView *)[pagingScrollView pageViewByIndex:index]; | ||
| 157 | - if (!tvView) { | ||
| 158 | - tvView = [[LVCTelevisionView alloc] init]; | ||
| 159 | - } | ||
| 160 | - return tvView; | ||
| 161 | - | ||
| 162 | - }else if ([_titleArr[index] isEqualToString:@"频道"]) { | 154 | + if ([_titleArr[index] isEqualToString:@"频道"]) { |
| 163 | 155 | ||
| 164 | LVCTelevisionView *tvView = (LVCTelevisionView *)[pagingScrollView pageViewByIndex:index]; | 156 | LVCTelevisionView *tvView = (LVCTelevisionView *)[pagingScrollView pageViewByIndex:index]; |
| 165 | if (!tvView) { | 157 | if (!tvView) { |
LiveVideoCloud/LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCLivePlayerController.m
| @@ -16,7 +16,7 @@ | @@ -16,7 +16,7 @@ | ||
| 16 | #import "CNBarrageView.h" | 16 | #import "CNBarrageView.h" |
| 17 | #import "chatMsgModel.h" | 17 | #import "chatMsgModel.h" |
| 18 | 18 | ||
| 19 | -@interface LVCLivePlayerController ()<LVCPlayerDelegate,LVCInputViewDelegate,LVCChatViewDelegate> | 19 | +@interface LVCLivePlayerController ()<LVCPlayerDelegate,LVCInputViewDelegate,LVCChatViewDelegate,UIGestureRecognizerDelegate> |
| 20 | { | 20 | { |
| 21 | BOOL isHiddenStatusBar; //记录状态的隐藏显示 | 21 | BOOL isHiddenStatusBar; //记录状态的隐藏显示 |
| 22 | CGRect playerFrame; //播放器原始位置 | 22 | CGRect playerFrame; //播放器原始位置 |
| @@ -35,6 +35,7 @@ | @@ -35,6 +35,7 @@ | ||
| 35 | 35 | ||
| 36 | @property (nonatomic, strong) CNBarrageManager *barrageManager; //弹幕管理者 | 36 | @property (nonatomic, strong) CNBarrageManager *barrageManager; //弹幕管理者 |
| 37 | @property (nonatomic ,strong) UIView *barrageBaseView; //弹幕总View | 37 | @property (nonatomic ,strong) UIView *barrageBaseView; //弹幕总View |
| 38 | +@property (nonatomic, strong) UITapGestureRecognizer *tap; | ||
| 38 | 39 | ||
| 39 | @end | 40 | @end |
| 40 | 41 | ||
| @@ -87,6 +88,10 @@ | @@ -87,6 +88,10 @@ | ||
| 87 | }; | 88 | }; |
| 88 | 89 | ||
| 89 | [self.player.contentView addSubview:self.barrageBaseView]; | 90 | [self.player.contentView addSubview:self.barrageBaseView]; |
| 91 | + | ||
| 92 | + _tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)]; | ||
| 93 | + _tap.delegate = self; | ||
| 94 | + [self.view addGestureRecognizer:self.tap]; | ||
| 90 | 95 | ||
| 91 | } | 96 | } |
| 92 | - (void)addBarrageView:(CNBarrageView *)barrageView { | 97 | - (void)addBarrageView:(CNBarrageView *)barrageView { |
| @@ -307,11 +312,6 @@ | @@ -307,11 +312,6 @@ | ||
| 307 | inputView.hidden = YES; | 312 | inputView.hidden = YES; |
| 308 | } | 313 | } |
| 309 | 314 | ||
| 310 | -- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event | ||
| 311 | -{ | ||
| 312 | - [self.view endEditing:YES]; | ||
| 313 | -} | ||
| 314 | - | ||
| 315 | - (void)removeViews | 315 | - (void)removeViews |
| 316 | { | 316 | { |
| 317 | [_player removeFromSuperview]; | 317 | [_player removeFromSuperview]; |
| @@ -324,6 +324,23 @@ | @@ -324,6 +324,23 @@ | ||
| 324 | [[NSNotificationCenter defaultCenter] removeObserver:self]; | 324 | [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| 325 | } | 325 | } |
| 326 | 326 | ||
| 327 | +- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event | ||
| 328 | +{ | ||
| 329 | + [self.view endEditing:YES]; | ||
| 330 | +} | ||
| 331 | + | ||
| 332 | +- (void)dismissKeyboard | ||
| 333 | +{ | ||
| 334 | + [self.view endEditing:YES]; | ||
| 335 | +} | ||
| 336 | + | ||
| 337 | +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { | ||
| 338 | + if ([NSStringFromClass([touch.view class]) isEqualToString:@"LVCChatView"]) { | ||
| 339 | + return NO; | ||
| 340 | + } | ||
| 341 | + return YES; | ||
| 342 | +} | ||
| 343 | + | ||
| 327 | #pragma mark - | 344 | #pragma mark - |
| 328 | #pragma mark - makeConstraints | 345 | #pragma mark - makeConstraints |
| 329 | - (void)makeConstraints | 346 | - (void)makeConstraints |