房间设置-管理员黑名单

This commit is contained in:
fengshuo
2021-12-29 19:57:31 +08:00
parent ea7bb61e47
commit c65fd80ac5
8 changed files with 510 additions and 1 deletions

View File

@@ -219,6 +219,9 @@
E84BF7CA277AF79D00EF8877 /* XPRoomSettingTagCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84BF7C9277AF79D00EF8877 /* XPRoomSettingTagCell.m */; };
E84BF7D1277BFCDD00EF8877 /* RoomTagModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84BF7D0277BFCDD00EF8877 /* RoomTagModel.m */; };
E84BF7D4277C383700EF8877 /* XPRoomSettingInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84BF7D3277C383700EF8877 /* XPRoomSettingInputView.m */; };
E84BF7D7277C6E2100EF8877 /* XPRoomRoleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E84BF7D6277C6E2100EF8877 /* XPRoomRoleViewController.m */; };
E84BF7DA277C72AC00EF8877 /* XPRoomRoleTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84BF7D9277C72AC00EF8877 /* XPRoomRoleTableViewCell.m */; };
E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84BF7DC277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m */; };
E86596432701611A00846EBD /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = E86596412701611A00846EBD /* UIImage+ImageEffects.m */; };
E86596512701A1C000846EBD /* StatisticsService.m in Sources */ = {isa = PBXBuildFile; fileRef = E86596502701A1C000846EBD /* StatisticsService.m */; };
E86596542701A55500846EBD /* StatisticsServiceHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E86596532701A55500846EBD /* StatisticsServiceHelper.m */; };
@@ -837,6 +840,12 @@
E84BF7D0277BFCDD00EF8877 /* RoomTagModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RoomTagModel.m; sourceTree = "<group>"; };
E84BF7D2277C383700EF8877 /* XPRoomSettingInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomSettingInputView.h; sourceTree = "<group>"; };
E84BF7D3277C383700EF8877 /* XPRoomSettingInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomSettingInputView.m; sourceTree = "<group>"; };
E84BF7D5277C6E2100EF8877 /* XPRoomRoleViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomRoleViewController.h; sourceTree = "<group>"; };
E84BF7D6277C6E2100EF8877 /* XPRoomRoleViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomRoleViewController.m; sourceTree = "<group>"; };
E84BF7D8277C72AC00EF8877 /* XPRoomRoleTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomRoleTableViewCell.h; sourceTree = "<group>"; };
E84BF7D9277C72AC00EF8877 /* XPRoomRoleTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomRoleTableViewCell.m; sourceTree = "<group>"; };
E84BF7DB277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomRoleEmptyTableViewCell.h; sourceTree = "<group>"; };
E84BF7DC277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomRoleEmptyTableViewCell.m; sourceTree = "<group>"; };
E86596412701611A00846EBD /* UIImage+ImageEffects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ImageEffects.m"; sourceTree = "<group>"; };
E86596422701611A00846EBD /* UIImage+ImageEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ImageEffects.h"; sourceTree = "<group>"; };
E865964F2701A1C000846EBD /* StatisticsService.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = StatisticsService.h; sourceTree = "<group>"; };
@@ -2328,6 +2337,8 @@
E87AE7F8277AABE50037823A /* XPRoomTagListViewController.m */,
E84BF7D2277C383700EF8877 /* XPRoomSettingInputView.h */,
E84BF7D3277C383700EF8877 /* XPRoomSettingInputView.m */,
E84BF7D5277C6E2100EF8877 /* XPRoomRoleViewController.h */,
E84BF7D6277C6E2100EF8877 /* XPRoomRoleViewController.m */,
);
path = View;
sourceTree = "<group>";
@@ -2359,6 +2370,10 @@
E8412FA52779BED1006E1101 /* XPRoomSettingTableViewCell.m */,
E84BF7C8277AF79D00EF8877 /* XPRoomSettingTagCell.h */,
E84BF7C9277AF79D00EF8877 /* XPRoomSettingTagCell.m */,
E84BF7D8277C72AC00EF8877 /* XPRoomRoleTableViewCell.h */,
E84BF7D9277C72AC00EF8877 /* XPRoomRoleTableViewCell.m */,
E84BF7DB277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.h */,
E84BF7DC277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
@@ -3589,6 +3604,7 @@
files = (
181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */,
18EE3FF12750D2AD00A452BF /* NIMTimeUtils.m in Sources */,
E84BF7DA277C72AC00EF8877 /* XPRoomRoleTableViewCell.m in Sources */,
E839532D276A030F00CF2F24 /* XPMineDressUpListViewController.m in Sources */,
E8B846D826FDE17300A777FE /* XPMineRechargeProtocol.h in Sources */,
E82D5C7D276B343300858D6D /* YYAnimatedImageView+ImageShow.m in Sources */,
@@ -3607,6 +3623,7 @@
E89DA66427005932008483C1 /* XPIAPHelper.m in Sources */,
E824545E26F5EF2200BE8163 /* XPMineVerifIdentityProtocol.h in Sources */,
E824545326F5CEAD00BE8163 /* XPMineModifPayProtocol.h in Sources */,
E84BF7D7277C6E2100EF8877 /* XPRoomRoleViewController.m in Sources */,
E824544826F5945300BE8163 /* XPMinePayPwdProtocol.h in Sources */,
E824543A26F5880E00BE8163 /* XPLoginVerifBindPhoneProtocol.h in Sources */,
E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */,
@@ -3741,6 +3758,7 @@
184862CE27213FD7005FC5DC /* ZegoRtcImpl.m in Sources */,
9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */,
E8C6FFD027548256004DC9F0 /* XPHomeListCollectionViewCell.m in Sources */,
E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */,
E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */,
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */,
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,

View File

@@ -0,0 +1,16 @@
//
// XPRoomRoleEmptyTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/29.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomRoleEmptyTableViewCell : UITableViewCell
@property (nonatomic,strong, readonly) UILabel *titleLabel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,70 @@
//
// XPRoomRoleEmptyTableViewCell.m
// xplan-ios
//
// Created by on 2021/12/29.
//
#import "XPRoomRoleEmptyTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "ThemeColor.h"
#import "UIImageConstant.h"
@interface XPRoomRoleEmptyTableViewCell ()
@property (nonatomic,strong) UIImageView *emptyImageView;
@property (nonatomic,strong) UILabel *titleLabel;
@end
@implementation XPRoomRoleEmptyTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.emptyImageView];
[self.contentView addSubview:self.titleLabel];
}
- (void)initSubViewConstraints {
[self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.contentView).offset(150);
make.centerX.mas_equalTo(self.contentView);
make.size.mas_equalTo(CGSizeMake(200, 200));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.emptyImageView.mas_bottom).offset(20);
make.left.right.mas_equalTo(self.contentView);
}];
}
#pragma mark - Getters And Setters
- (UIImageView *)emptyImageView {
if (!_emptyImageView) {
_emptyImageView = [[UIImageView alloc] init];
_emptyImageView.userInteractionEnabled = YES;
_emptyImageView.image = [UIImageConstant defalutEmptyPlaceholder];
_emptyImageView.layer.masksToBounds = YES;
_emptyImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _emptyImageView;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = @"暂无数据";
_titleLabel.font = [UIFont systemFontOfSize:16];
_titleLabel.textAlignment = NSTextAlignmentCenter;
_titleLabel.textColor = [ThemeColor secondTextColor];
}
return _titleLabel;
}
@end

View File

@@ -0,0 +1,28 @@
//
// XPRoomRoleTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/29.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class NIMChatroomMember, XPRoomRoleTableViewCell;
@protocol XPRoomRoleTableViewCellDelegate <NSObject>
///点击了member
- (void)xPRoomRoleTableViewCell:(XPRoomRoleTableViewCell *)view didClickMember:(NIMChatroomMember *)member;
@end
@interface XPRoomRoleTableViewCell : UITableViewCell
///分割线
@property (nonatomic,strong, readonly) UIView * lineView;
///云信用户实体
@property (strong, nonatomic) NIMChatroomMember *member;
///代理
@property (nonatomic,weak) id<XPRoomRoleTableViewCellDelegate> delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,153 @@
//
// XPRoomRoleTableViewCell.m
// xplan-ios
//
// Created by on 2021/12/29.
//
#import "XPRoomRoleTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h>
///Tool
#import "NetImageView.h"
#import "ThemeColor.h"
#import "UIImage+Utils.h"
#import "XPMessageRemoteExtModel.h"
@interface XPRoomRoleTableViewCell ()
///
@property (nonatomic,strong) NetImageView *avatarImageView;
///
@property (nonatomic,strong) UIImageView *sexImageView;
///
@property (nonatomic,strong) UILabel *nickLabel;
///
@property (nonatomic,strong) UIButton *removeButton;
///线
@property (nonatomic,strong) UIView * lineView;
@end
@implementation XPRoomRoleTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
[self initSubViews];
[self initSubViewConstraints];
}
return self;
}
#pragma mark - Private Method
- (void)initSubViews {
self.backgroundColor = [ThemeColor appCellBackgroundColor];
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self.contentView addSubview:self.avatarImageView];
[self.contentView addSubview:self.nickLabel];
[self.contentView addSubview:self.sexImageView];
[self.contentView addSubview:self.removeButton];
[self.contentView addSubview:self.lineView];
}
- (void)initSubViewConstraints {
[self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.contentView).offset(15);
make.width.height.mas_equalTo(40);
make.centerY.mas_equalTo(self.contentView.mas_centerY);
}];
[self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self);
make.left.mas_equalTo(self.avatarImageView.mas_right).offset(10);
}];
[self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self);
make.left.mas_equalTo(self.nickLabel.mas_right).offset(10);
}];
[self.removeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView.mas_centerY);
make.right.mas_equalTo(self.contentView).offset(-15);
make.width.mas_equalTo(65);
make.height.mas_equalTo(30);
}];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.nickLabel);
make.right.mas_equalTo(self.removeButton);
make.bottom.mas_equalTo(self.contentView);
make.height.mas_equalTo(1);
}];
}
#pragma mark - Event Response
- (void)removeButtonAction:(UIButton *)sender {
if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomRoleTableViewCell:didClickMember:)]) {
[self.delegate xPRoomRoleTableViewCell:self didClickMember:self.member];
}
}
#pragma mark - Getters And Setters
- (void)setMember:(NIMChatroomMember *)member {
_member = member;
if (_member) {
self.avatarImageView.imageUrl = _member.roomAvatar;
self.nickLabel.text = _member.roomNickname;
}
}
- (NetImageView *)avatarImageView {
if (!_avatarImageView) {
NetImageConfig * config = [[NetImageConfig alloc]init];
config.imageType = ImageTypeUserIcon;
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
_avatarImageView = [[NetImageView alloc] initWithConfig:config];
_avatarImageView.layer.masksToBounds = YES;
_avatarImageView.layer.cornerRadius = 40/2;
_avatarImageView.layer.borderColor = [ThemeColor appMainColor].CGColor;
}
return _avatarImageView;
}
- (UIImageView *)sexImageView {
if (!_sexImageView) {
_sexImageView = [[UIImageView alloc] init];
_sexImageView.userInteractionEnabled = YES;
}
return _sexImageView;
}
- (UILabel *)nickLabel {
if (!_nickLabel) {
_nickLabel = [[UILabel alloc] init];
_nickLabel.font = [UIFont systemFontOfSize:15];
_nickLabel.textColor = [ThemeColor mainTextColor];
}
return _nickLabel;
}
- (UIButton *)removeButton {
if (!_removeButton) {
_removeButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_removeButton setTitle:@"移除" forState:UIControlStateNormal];
[_removeButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
_removeButton.titleLabel.font = [UIFont systemFontOfSize:15];
[_removeButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientStartColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
_removeButton.layer.masksToBounds = YES;
_removeButton.layer.cornerRadius = 15;
[_removeButton addTarget:self action:@selector(removeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
}
return _removeButton;
}
- (UIView *)lineView {
if (!_lineView) {
_lineView = [[UIView alloc] init];
_lineView.backgroundColor = [ThemeColor dividerColor];
}
return _lineView;
}
@end

View File

@@ -0,0 +1,25 @@
//
// XPRoomRoleViewController.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/29.
//
#import "BaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, RoomRoleListType) {
///管理员
RoomRoleListType_Manager = 1,
RoomRoleListType_Black,
};
@interface XPRoomRoleViewController : BaseViewController
///房间的id
@property (nonatomic,copy) NSString *roomId;
///类型
@property (nonatomic,assign) RoomRoleListType type;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,182 @@
//
// XPRoomRoleViewController.m
// xplan-ios
//
// Created by on 2021/12/29.
//
#import "XPRoomRoleViewController.h"
///Third
#import <Masonry/Masonry.h>
#import <NIMSDK/NIMSDK.h>
#import "XPMacro.h"
#import "XPRoomRoleTableViewCell.h"
#import "XPRoomRoleEmptyTableViewCell.h"
@interface XPRoomRoleViewController ()<UITableViewDelegate, UITableViewDataSource, XPRoomRoleTableViewCellDelegate>
///
@property (nonatomic,strong) NSMutableArray *originArray;
///
@property (nonatomic,strong) NSMutableArray *datasource;
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NIMChatroomMember *lastMember;
@end
@implementation XPRoomRoleViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self initSubViews];
[self initSubViewConstraints];
}
#pragma mark - Private Method
- (void)initSubViews {
[self.view addSubview:self.tableView];
}
- (void)initSubViewConstraints {
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.view);
}];
}
- (void)loadChatRoomRegularMemberList {
NIMChatroomMemberRequest *request = [[NIMChatroomMemberRequest alloc] init];
request.roomId = self.roomId;
request.type = NIMChatroomFetchMemberTypeRegular;
request.lastMember = self.lastMember;
request.limit = 200;
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembers:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
if (error == nil) {
self.lastMember = members.lastObject;
[members enumerateObjectsUsingBlock:^(NIMChatroomMember * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (self.type == RoomRoleListType_Black) {
if (obj.isInBlackList) {
[self.datasource addObject:obj];
}
} else if(self.type == RoomRoleListType_Manager) {
if (obj.type == NIMChatroomMemberTypeManager) {
[self.datasource addObject:obj];
}
}
}];
[self.tableView reloadData];
if (members.count > 0) {
[self loadChatRoomRegularMemberList];
}
}
}];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.datasource.count > 0 ? self.datasource.count : 1;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
XPRoomRoleTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomRoleTableViewCell class])];
if (cell == nil) {
cell = [[XPRoomRoleTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomRoleTableViewCell class])];
}
cell.delegate = self;
cell.member = [self.datasource objectAtIndex:indexPath.row];
if (indexPath.row == (self.datasource.count -1)) {
cell.lineView.hidden = YES;
} else {
cell.lineView.hidden = NO;
}
return cell;
}
XPRoomRoleEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomRoleEmptyTableViewCell class])];
if (cell == nil) {
cell = [[XPRoomRoleEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomRoleEmptyTableViewCell class])];
}
if (self.type == RoomRoleListType_Black) {
cell.titleLabel.text = @"暂没有设置黑名单";
} else {
cell.titleLabel.text = @"暂没有设置管理员";
}
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
return 55;
}
return KScreenHeight - kNavigationHeight;
}
#pragma mark - XPRoomRoleTableViewCellDelegate
- (void)xPRoomRoleTableViewCell:(NSString *)view didClickMember:(NIMChatroomMember *)member {
if (self.type == RoomRoleListType_Black) {
NIMChatroomMemberUpdateRequest *request = [[NIMChatroomMemberUpdateRequest alloc]init];
request.roomId = self.roomId;
request.userId = member.userId;
request.enable = NO;
[[NIMSDK sharedSDK].chatroomManager updateMemberBlack:request completion:^(NSError * _Nullable error) {
if (error == nil) {
[self.datasource removeObject:member];
[self.tableView reloadData];
}
}];
} else if(self.type == RoomRoleListType_Manager) {
NIMChatroomMemberUpdateRequest *request = [[NIMChatroomMemberUpdateRequest alloc]init];
request.roomId = self.roomId;
request.userId = member.userId;
request.enable = NO;
[[NIMSDK sharedSDK].chatroomManager markMemberManager:request completion:^(NSError * _Nullable error) {
if (error == nil) {
[self.datasource removeObject:member];
[self.tableView reloadData];
}
}];
}
}
#pragma mark - Getters And Setters
- (void)setType:(RoomRoleListType)type {
_type = type;
if (_type == RoomRoleListType_Black) {
self.title = @"黑名单";
} else {
self.title = @"管理员";
}
[self loadChatRoomRegularMemberList];
}
- (UITableView *)tableView {
if (!_tableView) {
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.tableFooterView = [UIView new];
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
_tableView.backgroundColor = [UIColor clearColor];
_tableView.rowHeight = 60;
if (@available(iOS 11.0, *)) {
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
[_tableView registerClass:[XPRoomRoleTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPRoomRoleTableViewCell class])];
[_tableView registerClass:[XPRoomRoleEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPRoomRoleEmptyTableViewCell class])];
}
return _tableView;
}
- (NSMutableArray *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -30,7 +30,7 @@
#import "XPRoomSettingProtocol.h"
///VC
#import "XPRoomTagListViewController.h"
#import "XPRoomRoleViewController.h"
@interface XPRoomSettingViewController ()<UITableViewDelegate, UITableViewDataSource, XPRoomSettingProtocol, XPRoomSettingTableViewCellDelegate, XPRoomSettingInputViewDelegate>
///
@@ -223,6 +223,23 @@ XPRoomSettingItemModel * itemModel = [[self.datasource objectAtIndex:indexPath.s
titleView.placeHolder = roomPwd;
[TTPopup popupView:titleView style:TTPopupStyleAlert];
}
break;
case RoomSettingItemType_Manager_List:
{
XPRoomRoleViewController * managerVC = [[XPRoomRoleViewController alloc] init];
managerVC.roomId = roomId;
managerVC.type = RoomRoleListType_Manager;
[self.navigationController pushViewController:managerVC animated:YES];
}
break;
case RoomSettingItemType_Black_List:
{
XPRoomRoleViewController * managerVC = [[XPRoomRoleViewController alloc] init];
managerVC.roomId = roomId;
managerVC.type = RoomRoleListType_Black;
[self.navigationController pushViewController:managerVC animated:YES];
}
break;
default:
break;
}