// // YOUPAILZChatRoomCurrentMenberVC.m // MSYOUPAI // // Created by CY on 2022/1/7. // Copyright © 2022 MS. All rights reserved. // #import "YOUPAILZChatRoomCurrentMenberVC.h" #import "JXCategoryView.h" #import "YOUPAIJXCategoryTitleBackgroundView.h" #import "JXCategoryListContainerView.h" #import "YOUPAIHRChatRoomCurrentAudienceVC.h" @interface YOUPAILZChatRoomCurrentMenberVC () @end @implementation YOUPAILZChatRoomCurrentMenberVC - (void)viewDidLoad { [super viewDidLoad]; self.baseView.hidden = YES; [self youpaifinitUI]; } - (void)youpaifinitUI{ UIView *bgV = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, KScreenWidth, 400.0f + SafeHeight)]; bgV.backgroundColor = LCBkgColor; [LCTools clipCorner:UIRectCornerTopLeft|UIRectCornerTopRight View:bgV size:CGSizeMake(20.0f, 20.0f)]; [self.view addSubview:bgV]; [bgV mas_makeConstraints:^(MASConstraintMaker *make) { make.left.offset(0.0f); make.right.offset(0.0f); make.bottom.offset(0.0f); make.height.offset(400.0f + SafeHeight); }]; YOUPAIJXCategoryTitleBackgroundView *youpaipcategoryView = [[YOUPAIJXCategoryTitleBackgroundView alloc] init]; youpaipcategoryView.backgroundColor = LCBkgColor; youpaipcategoryView.titles = self.titles; youpaipcategoryView.delegate = self; youpaipcategoryView.titleSelectedColor = HexColorFromRGB(0xffffff);// HexColorFromRGB(0xF4003F); youpaipcategoryView.titleColor = HexColorFromRGB(0xffffff); youpaipcategoryView.titleColorGradientEnabled = YES; youpaipcategoryView.titleFont = LCFont(16.0f); youpaipcategoryView.titleSelectedFont = LCFont(16.0f); youpaipcategoryView.averageCellSpacingEnabled = YES; youpaipcategoryView.normalBackgroundColor = [UIColor clearColor]; youpaipcategoryView.selectedBackgroundColor = LCBkgColor; youpaipcategoryView.cellWidthIncrement = 0; youpaipcategoryView.normalBorderColor = [UIColor clearColor]; youpaipcategoryView.selectedBorderColor = [UIColor clearColor]; youpaipcategoryView.borderLineWidth = 0; youpaipcategoryView.backgroundCornerRadius = 0.0f; [youpaipcategoryView addLineWithColor:[[UIColor whiteColor] colorWithAlphaComponent:0.07f] lineRect:CGRectMake(0.0f, 44.5f, KScreenWidth, 0.5f)]; [bgV addSubview:youpaipcategoryView]; // JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init]; // lineView.verticalMargin = 4.0f; // lineView.indicatorHeight = 2.5f; // lineView.indicatorWidth = 8.0f; // lineView.indicatorColor = HexColorFromRGB(0xF4003F); // youpaipcategoryView.indicators = @[lineView]; JXCategoryListContainerView *pagerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_CollectionView delegate:self]; pagerView.listCellBackgroundColor = LCBkgColor; [bgV addSubview:pagerView]; youpaipcategoryView.listContainer = pagerView; [youpaipcategoryView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.top.offset(0.0f); make.height.offset(45.0f); }]; [pagerView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.bottom.offset(0.0f); make.top.equalTo(youpaipcategoryView.mas_bottom).offset(0.0f); }]; } - (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{ return self.titles.count; } - (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index{ YOUPAIHRChatRoomCurrentAudienceVC *vc = [YOUPAIHRChatRoomCurrentAudienceVC new]; vc.youpaipchatroomModel = self.youpaipchatroomModel; vc.youpaipupseatBlock = self.youpaipupseatBlock; @weakify(self); [vc setYoupaiptouchUserBlock:^(NSString * _Nonnull userId) { @strongify(self); [self dismissViewControllerAnimated:YES completion:^{ @strongify(self); self.youpaiptouchUserBlock(userId); }]; }]; return vc; } - (NSArray *)titles{ return @[@"当前观众"]; } @end