Browse Source

add group manage code

heavyrain2012 5 years ago
parent
commit
9816b04f87

+ 40 - 0
wfuikit/WFChatUIKit.xcodeproj/project.pbxproj

@@ -314,6 +314,16 @@
 		2F55122A217F5CC300F56C26 /* WFCUUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F55108E217F5CC200F56C26 /* WFCUUtilities.h */; };
 		2F55122B217F5CC300F56C26 /* WFCUMediaMessageDownloader.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F55108F217F5CC200F56C26 /* WFCUMediaMessageDownloader.m */; };
 		2F55122C217F5CC300F56C26 /* WFCUUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F551090217F5CC200F56C26 /* WFCUUtilities.m */; };
+		2F5EB43C22C2E21A00BC8C90 /* GroupManageTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5EB43A22C2E21A00BC8C90 /* GroupManageTableViewController.h */; };
+		2F5EB43D22C2E21A00BC8C90 /* GroupManageTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F5EB43B22C2E21A00BC8C90 /* GroupManageTableViewController.m */; };
+		2F5EB44022C2E6BB00BC8C90 /* ManagerTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5EB43E22C2E6BB00BC8C90 /* ManagerTableViewController.h */; };
+		2F5EB44122C2E6BB00BC8C90 /* ManagerTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F5EB43F22C2E6BB00BC8C90 /* ManagerTableViewController.m */; };
+		2F5EB44422C2EE1900BC8C90 /* GroupMuteTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5EB44222C2EE1800BC8C90 /* GroupMuteTableViewController.h */; };
+		2F5EB44522C2EE1900BC8C90 /* GroupMuteTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F5EB44322C2EE1800BC8C90 /* GroupMuteTableViewController.m */; };
+		2F5EB44822C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5EB44622C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.h */; };
+		2F5EB44922C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F5EB44722C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.m */; };
+		2F5EB44C22C2F36A00BC8C90 /* GroupMemberControlTableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F5EB44A22C2F36A00BC8C90 /* GroupMemberControlTableViewController.h */; };
+		2F5EB44D22C2F36A00BC8C90 /* GroupMemberControlTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F5EB44B22C2F36A00BC8C90 /* GroupMemberControlTableViewController.m */; };
 		2F9CE41C21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F9CE41A21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.m */; };
 		2F9CE41D21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F9CE41B21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.h */; };
 		2F9CE42021BFE63C005E1BE1 /* WFCUChannelProfileViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F9CE41E21BFE63C005E1BE1 /* WFCUChannelProfileViewController.h */; };
@@ -643,6 +653,16 @@
 		2F55108E217F5CC200F56C26 /* WFCUUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFCUUtilities.h; sourceTree = "<group>"; };
 		2F55108F217F5CC200F56C26 /* WFCUMediaMessageDownloader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCUMediaMessageDownloader.m; sourceTree = "<group>"; };
 		2F551090217F5CC200F56C26 /* WFCUUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCUUtilities.m; sourceTree = "<group>"; };
+		2F5EB43A22C2E21A00BC8C90 /* GroupManageTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GroupManageTableViewController.h; sourceTree = "<group>"; };
+		2F5EB43B22C2E21A00BC8C90 /* GroupManageTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GroupManageTableViewController.m; sourceTree = "<group>"; };
+		2F5EB43E22C2E6BB00BC8C90 /* ManagerTableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ManagerTableViewController.h; sourceTree = "<group>"; };
+		2F5EB43F22C2E6BB00BC8C90 /* ManagerTableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ManagerTableViewController.m; sourceTree = "<group>"; };
+		2F5EB44222C2EE1800BC8C90 /* GroupMuteTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupMuteTableViewController.h; sourceTree = "<group>"; };
+		2F5EB44322C2EE1800BC8C90 /* GroupMuteTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupMuteTableViewController.m; sourceTree = "<group>"; };
+		2F5EB44622C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFCUGeneralTableViewCell.h; sourceTree = "<group>"; };
+		2F5EB44722C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCUGeneralTableViewCell.m; sourceTree = "<group>"; };
+		2F5EB44A22C2F36A00BC8C90 /* GroupMemberControlTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GroupMemberControlTableViewController.h; sourceTree = "<group>"; };
+		2F5EB44B22C2F36A00BC8C90 /* GroupMemberControlTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GroupMemberControlTableViewController.m; sourceTree = "<group>"; };
 		2F9CE41A21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFCUSearchChannelViewController.m; sourceTree = "<group>"; };
 		2F9CE41B21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFCUSearchChannelViewController.h; sourceTree = "<group>"; };
 		2F9CE41E21BFE63C005E1BE1 /* WFCUChannelProfileViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFCUChannelProfileViewController.h; sourceTree = "<group>"; };
@@ -1262,6 +1282,8 @@
 				2F551051217F5CC100F56C26 /* WFCUConversationSettingMemberCell.h */,
 				2F551052217F5CC100F56C26 /* WFCUSwitchTableViewCell.h */,
 				2F551053217F5CC100F56C26 /* WFCUConversationSettingMemberCell.m */,
+				2F5EB44622C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.h */,
+				2F5EB44722C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.m */,
 			);
 			path = Cell;
 			sourceTree = "<group>";
@@ -1273,6 +1295,14 @@
 				2F551056217F5CC100F56C26 /* WFCUConversationSettingViewController.m */,
 				2F551057217F5CC100F56C26 /* WFCUConversationSettingViewController.h */,
 				2F551058217F5CC100F56C26 /* WFCUConversationSettingMemberCollectionViewLayout.h */,
+				2F5EB43A22C2E21A00BC8C90 /* GroupManageTableViewController.h */,
+				2F5EB43B22C2E21A00BC8C90 /* GroupManageTableViewController.m */,
+				2F5EB43E22C2E6BB00BC8C90 /* ManagerTableViewController.h */,
+				2F5EB43F22C2E6BB00BC8C90 /* ManagerTableViewController.m */,
+				2F5EB44222C2EE1800BC8C90 /* GroupMuteTableViewController.h */,
+				2F5EB44322C2EE1800BC8C90 /* GroupMuteTableViewController.m */,
+				2F5EB44A22C2F36A00BC8C90 /* GroupMemberControlTableViewController.h */,
+				2F5EB44B22C2F36A00BC8C90 /* GroupMemberControlTableViewController.m */,
 			);
 			path = ViewController;
 			sourceTree = "<group>";
@@ -1544,6 +1574,7 @@
 				2F5511B0217F5CC300F56C26 /* FLAnimatedImageView+WebCache.h in Headers */,
 				2F5510B9217F5CC200F56C26 /* WFCUGroupTableViewCell.h in Headers */,
 				2F551152217F5CC200F56C26 /* KZVideoSupport.h in Headers */,
+				2F5EB44822C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.h in Headers */,
 				2F55118E217F5CC200F56C26 /* MBProgressHUD.h in Headers */,
 				2F5510EF217F5CC200F56C26 /* CCHMapClusterControllerDebugPolygon.h in Headers */,
 				2F5511F7217F5CC300F56C26 /* BubbleTipView.h in Headers */,
@@ -1581,8 +1612,10 @@
 				2F5510CA217F5CC200F56C26 /* WFCUPluginBoardView.h in Headers */,
 				2F5510FF217F5CC200F56C26 /* CCHMapTree.h in Headers */,
 				2F5510A2217F5CC200F56C26 /* WFCUVoiceCell.h in Headers */,
+				2F5EB43C22C2E21A00BC8C90 /* GroupManageTableViewController.h in Headers */,
 				2F551210217F5CC300F56C26 /* WFCUContactSelectTableViewCell.h in Headers */,
 				2F5511E0217F5CC300F56C26 /* TYAlertFadeAnimation.h in Headers */,
+				2F5EB44C22C2F36A00BC8C90 /* GroupMemberControlTableViewController.h in Headers */,
 				2F5511E4217F5CC300F56C26 /* YLImageView.h in Headers */,
 				2F5511C9217F5CC300F56C26 /* SDWebImagePrefetcher.h in Headers */,
 				2F551214217F5CC300F56C26 /* WFCUAddFriendViewController.h in Headers */,
@@ -1601,6 +1634,7 @@
 				2F5510CC217F5CC200F56C26 /* WFCUVoiceRecordView.h in Headers */,
 				2F551111217F5CC200F56C26 /* VideoPlayerView.h in Headers */,
 				9029D0FE21C5D7930002EBAA /* WFCUCreateChannelViewController.h in Headers */,
+				2F5EB44022C2E6BB00BC8C90 /* ManagerTableViewController.h in Headers */,
 				2F55109C217F5CC200F56C26 /* WFCUStickerCell.h in Headers */,
 				2F44A3A72180B48F00E74EA4 /* WFCUMentionUserTableViewController.h in Headers */,
 				2F5511EC217F5CC300F56C26 /* WFCUForwardMessageCell.h in Headers */,
@@ -1610,6 +1644,7 @@
 				2F5510A4217F5CC200F56C26 /* WFCUInformationCell.h in Headers */,
 				2F5511E3217F5CC300F56C26 /* YLGIFImage.h in Headers */,
 				2F337EE6219EE1840086B0F3 /* WFCUTextCell.h in Headers */,
+				2F5EB44422C2EE1900BC8C90 /* GroupMuteTableViewController.h in Headers */,
 				2F5511B7217F5CC300F56C26 /* SDWebImage.h in Headers */,
 				2F551114217F5CC200F56C26 /* AirplayActiveView.h in Headers */,
 				2F5511FD217F5CC300F56C26 /* WFCUSwitchTableViewCell.h in Headers */,
@@ -1761,6 +1796,7 @@
 				2F551198217F5CC200F56C26 /* SDRefreshView.m in Sources */,
 				2F5511AD217F5CC300F56C26 /* FLAnimatedImageView.m in Sources */,
 				2F551157217F5CC200F56C26 /* KZVideoSupport.m in Sources */,
+				2F5EB44122C2E6BB00BC8C90 /* ManagerTableViewController.m in Sources */,
 				2F5510F1217F5CC200F56C26 /* CCHMapClusterController.m in Sources */,
 				2F551213217F5CC300F56C26 /* WFCUAddFriendViewController.m in Sources */,
 				2F5511B4217F5CC300F56C26 /* UIImage+MultiFormat.m in Sources */,
@@ -1788,11 +1824,13 @@
 				2F55109A217F5CC200F56C26 /* WFCUVideoCell.m in Sources */,
 				2F5510ED217F5CC200F56C26 /* WFCULocationPoint.m in Sources */,
 				2F551205217F5CC300F56C26 /* WFCUConversationTableViewCell.m in Sources */,
+				2F5EB43D22C2E21A00BC8C90 /* GroupManageTableViewController.m in Sources */,
 				2F55109F217F5CC200F56C26 /* WFCULocationCell.m in Sources */,
 				2F5511E1217F5CC300F56C26 /* YLGIFImage.m in Sources */,
 				2F5511F4217F5CC300F56C26 /* AttributedLabel.m in Sources */,
 				2F551156217F5CC200F56C26 /* KZVideoListViewController.m in Sources */,
 				2F551154217F5CC200F56C26 /* KZVideoViewController.m in Sources */,
+				2F5EB44D22C2F36A00BC8C90 /* GroupMemberControlTableViewController.m in Sources */,
 				2F55120B217F5CC300F56C26 /* WFCUNewFriendTableViewCell.m in Sources */,
 				2F5510B3217F5CC200F56C26 /* WFCUSearchViewController.m in Sources */,
 				2F551097217F5CC200F56C26 /* WFCUVoiceCell.m in Sources */,
@@ -1804,6 +1842,7 @@
 				2F5510BB217F5CC200F56C26 /* WFCUInviteGroupMemberViewController.m in Sources */,
 				2F551228217F5CC300F56C26 /* WFCUFriendRequestViewController.m in Sources */,
 				2F5511D9217F5CC300F56C26 /* TYAlertDropDownAnimation.m in Sources */,
+				2F5EB44522C2EE1900BC8C90 /* GroupMuteTableViewController.m in Sources */,
 				2F55116B217F5CC200F56C26 /* AFURLRequestSerialization.m in Sources */,
 				2F5511A5217F5CC300F56C26 /* SDWebImageManager.m in Sources */,
 				2F9CE42121BFE63C005E1BE1 /* WFCUChannelProfileViewController.m in Sources */,
@@ -1813,6 +1852,7 @@
 				2F551192217F5CC200F56C26 /* SDRefreshHeaderView.m in Sources */,
 				2F5511CC217F5CC300F56C26 /* UIButton+WebCache.m in Sources */,
 				2F551113217F5CC200F56C26 /* VideoPlayerSampleView.m in Sources */,
+				2F5EB44922C2EEFC00BC8C90 /* WFCUGeneralTableViewCell.m in Sources */,
 				2F5511BE217F5CC300F56C26 /* SDWebImageDownloaderOperation.m in Sources */,
 				2F9CE41C21BFE5D9005E1BE1 /* WFCUSearchChannelViewController.m in Sources */,
 				2F5510B4217F5CC200F56C26 /* WFCUGeneralModifyViewController.m in Sources */,

+ 16 - 0
wfuikit/WFChatUIKit/ConversationSetting/Cell/WFCUGeneralTableViewCell.h

@@ -0,0 +1,16 @@
+//
+//  SwitchTableViewCell.h
+//  WildFireChat
+//
+//  Created by heavyrain lee on 27/12/2017.
+//  Copyright © 2017 WildFireChat. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <WFChatClient/WFCChatClient.h>
+
+
+@interface WFCUGeneralTableViewCell : UITableViewCell
+@property(nonatomic, assign)BOOL on;
+@property(nonatomic, strong)void (^onSwitch)(BOOL value, void (^)(BOOL success));
+@end

+ 50 - 0
wfuikit/WFChatUIKit/ConversationSetting/Cell/WFCUGeneralTableViewCell.m

@@ -0,0 +1,50 @@
+//
+//  SwitchTableViewCell.m
+//  WildFireChat
+//
+//  Created by heavyrain lee on 27/12/2017.
+//  Copyright © 2017 WildFireChat. All rights reserved.
+//
+
+#import "WFCUGeneralTableViewCell.h"
+#import "MBProgressHUD.h"
+
+
+@interface WFCUGeneralTableViewCell()
+@property(nonatomic, strong)UISwitch *valueSwitch;
+@end
+
+@implementation WFCUGeneralTableViewCell
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    if(self) {
+        self.valueSwitch = [[UISwitch alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width - 56, 8, 40, 40)];
+        [self addSubview:self.valueSwitch];
+        [self.valueSwitch addTarget:self action:@selector(onSwitch:) forControlEvents:UIControlEventValueChanged];
+    }
+    return self;
+}
+
+- (void)onSwitch:(id)sender {
+    BOOL value = _valueSwitch.on;
+    __weak typeof(self)ws = self;
+    self.onSwitch(value, ^(BOOL success) {
+        if (success) {
+            [ws.valueSwitch setOn:value];
+        } else {
+            [ws.valueSwitch setOn:!value];
+        }
+    });
+}
+
+- (void)setOn:(BOOL)on {
+    _on = on;
+    [self.valueSwitch setOn:on];
+}
+@end

+ 18 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/GroupManageTableViewController.h

@@ -0,0 +1,18 @@
+//
+//  GroupManageTableViewController.h
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <WFChatClient/WFCChatClient.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface GroupManageTableViewController : UIViewController
+@property (nonatomic, strong)WFCCGroupInfo *groupInfo;
+@end
+
+NS_ASSUME_NONNULL_END

+ 154 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/GroupManageTableViewController.m

@@ -0,0 +1,154 @@
+//
+//  GroupManageTableViewController.m
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import "GroupManageTableViewController.h"
+#import "ManagerTableViewController.h"
+#import "GroupMuteTableViewController.h"
+#import "GroupMemberControlTableViewController.h"
+
+@interface GroupManageTableViewController () <UITableViewDelegate, UITableViewDataSource>
+@property(nonatomic, strong)UITableView *tableView;
+@end
+
+@implementation GroupManageTableViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    self.title = @"群管理";
+    
+    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStyleGrouped];
+    
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    
+    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
+    [self.tableView reloadData];
+    
+    [self.view addSubview:self.tableView];
+}
+
+- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
+    if (cell == nil) {
+        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cell"];
+    }
+    
+    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+    cell.accessoryView = nil;
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    
+    cell.detailTextLabel.text = nil;
+    if (indexPath.section == 0) {
+        if (indexPath.row == 0) {
+            cell.textLabel.text = @"管理员";
+        } else if(indexPath.row == 1) {
+            cell.textLabel.text = @"设置禁言";
+        } else if(indexPath.row == 2) {
+            cell.textLabel.text = @"成员权限";
+        }
+    } else if(indexPath.section == 1) {
+        if (indexPath.row == 0) {
+            cell.textLabel.text = @"加群方式";
+            cell.detailTextLabel.text = @"需要验证加入";
+        } else if(indexPath.row == 1) {
+            cell.textLabel.text = @"查找方式";
+            cell.detailTextLabel.text = @"不允许查找";
+        }
+    }
+    
+    return cell;
+}
+
+- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    if (section == 0) {
+        return 3;//管理员,设置禁言,群成员权限
+    } else if(section == 1) {
+        return 2;//加群方式,查找权限
+    }
+    return 0;
+}
+
+-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
+    if (section == 0) {
+        return @"成员管理";
+    } else if(section == 1) {
+        return @"加群设置";
+    }
+    return nil;
+}
+-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 30.f;
+}
+-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return 0.f;
+}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 2; //成员管理,加群设置
+}
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (indexPath.section == 0) {
+        if (indexPath.row == 0) {
+            ManagerTableViewController *mtvc = [[ManagerTableViewController alloc] init];
+            mtvc.groupInfo = self.groupInfo;
+            [self.navigationController pushViewController:mtvc animated:YES];
+        } else if(indexPath.row == 1) {
+            GroupMuteTableViewController *gmtc = [[GroupMuteTableViewController alloc] init];
+            gmtc.groupInfo = self.groupInfo;
+            [self.navigationController pushViewController:gmtc animated:YES];
+        } else if(indexPath.row == 2) {
+            GroupMemberControlTableViewController *gmcvc = [[GroupMemberControlTableViewController alloc] init];
+            gmcvc.groupInfo = self.groupInfo;
+            [self.navigationController pushViewController:gmcvc animated:YES];
+        }
+    } else if(indexPath.section == 1) {
+        if (indexPath.row == 0) {
+            UIAlertController* alertController = [UIAlertController alertControllerWithTitle:@"加群方式" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
+            
+            // Create cancel action.
+            UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+                
+            }];
+            [alertController addAction:cancelAction];
+            
+            UIAlertAction *openAction = [UIAlertAction actionWithTitle:@"不需要验证" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
+                
+            }];
+            [alertController addAction:openAction];
+            
+            UIAlertAction *verifyAction = [UIAlertAction actionWithTitle:@"需要验证加入" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+                
+            }];
+            [alertController addAction:verifyAction];
+            
+            [self.navigationController presentViewController:alertController animated:YES completion:nil];
+        } else if(indexPath.row == 1) {
+            UIAlertController* alertController = [UIAlertController alertControllerWithTitle:@"查找方式" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
+            
+            // Create cancel action.
+            UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
+                
+            }];
+            [alertController addAction:cancelAction];
+            
+            UIAlertAction *openAction = [UIAlertAction actionWithTitle:@"允许查找" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
+                
+            }];
+            [alertController addAction:openAction];
+            
+            UIAlertAction *verifyAction = [UIAlertAction actionWithTitle:@"不允许查找" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
+                
+            }];
+            [alertController addAction:verifyAction];
+            
+            [self.navigationController presentViewController:alertController animated:YES completion:nil];
+        }
+    }
+    
+}
+@end

+ 18 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/GroupMemberControlTableViewController.h

@@ -0,0 +1,18 @@
+//
+//  ManagerTableViewController.h
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <WFChatClient/WFCChatClient.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface GroupMemberControlTableViewController : UIViewController
+@property (nonatomic, strong)WFCCGroupInfo *groupInfo;
+@end
+
+NS_ASSUME_NONNULL_END

+ 67 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/GroupMemberControlTableViewController.m

@@ -0,0 +1,67 @@
+//
+//  ManagerTableViewController.m
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import "GroupMemberControlTableViewController.h"
+#import "SDWebImage.h"
+#import "WFCUContactListViewController.h"
+#import "WFCUGeneralTableViewCell.h"
+
+@interface GroupMemberControlTableViewController () <UITableViewDelegate, UITableViewDataSource>
+@property(nonatomic, strong)UITableView *tableView;
+@property(nonatomic, strong)NSMutableArray<WFCCGroupMember *> *managerList;
+@end
+
+@implementation GroupMemberControlTableViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    self.title = @"群成员权限";
+    
+    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStyleGrouped];
+    
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    
+    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
+    [self.tableView reloadData];
+    
+    [self.view addSubview:self.tableView];
+}
+
+- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    WFCUGeneralTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
+    if (cell == nil) {
+        cell = [[WFCUGeneralTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
+    }
+    
+    if(indexPath.row == 0) {
+        cell.textLabel.text = @"允许普通群成员邀请好友";
+        cell.onSwitch = ^(BOOL value, void (^onDone)(BOOL success)) {
+            
+        };
+    } else {
+        cell.textLabel.text = @"允许普通群成员发起临时会话";
+        cell.onSwitch = ^(BOOL value, void (^onDone)(BOOL success)) {
+            
+        };
+    }
+    
+   
+    return cell;
+}
+
+- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return 2;
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+@end

+ 18 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/GroupMuteTableViewController.h

@@ -0,0 +1,18 @@
+//
+//  ManagerTableViewController.h
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <WFChatClient/WFCChatClient.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface GroupMuteTableViewController : UIViewController
+@property (nonatomic, strong)WFCCGroupInfo *groupInfo;
+@end
+
+NS_ASSUME_NONNULL_END

+ 63 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/GroupMuteTableViewController.m

@@ -0,0 +1,63 @@
+//
+//  ManagerTableViewController.m
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import "GroupMuteTableViewController.h"
+#import "SDWebImage.h"
+#import "WFCUContactListViewController.h"
+#import "WFCUGeneralTableViewCell.h"
+
+@interface GroupMuteTableViewController () <UITableViewDelegate, UITableViewDataSource>
+@property(nonatomic, strong)UITableView *tableView;
+@property(nonatomic, strong)NSMutableArray<WFCCGroupMember *> *managerList;
+@end
+
+@implementation GroupMuteTableViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+
+    self.title = @"群禁言管理";
+    
+    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStyleGrouped];
+    
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    
+    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
+    [self.tableView reloadData];
+    
+    [self.view addSubview:self.tableView];
+}
+
+- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    WFCUGeneralTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
+    if (cell == nil) {
+        cell = [[WFCUGeneralTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
+        cell.textLabel.text = @"全员禁言";
+        cell.onSwitch = ^(BOOL value, void (^onDone)(BOOL success)) {
+            
+        };
+    }
+    
+   
+    
+    return cell;
+}
+
+- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return 1;
+}
+
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+}
+@end

+ 18 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/ManagerTableViewController.h

@@ -0,0 +1,18 @@
+//
+//  ManagerTableViewController.h
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import <WFChatClient/WFCChatClient.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ManagerTableViewController : UIViewController
+@property (nonatomic, strong)WFCCGroupInfo *groupInfo;
+@end
+
+NS_ASSUME_NONNULL_END

+ 129 - 0
wfuikit/WFChatUIKit/ConversationSetting/ViewController/ManagerTableViewController.m

@@ -0,0 +1,129 @@
+//
+//  ManagerTableViewController.m
+//  WFChatUIKit
+//
+//  Created by heavyrain lee on 2019/6/26.
+//  Copyright © 2019 WildFireChat. All rights reserved.
+//
+
+#import "ManagerTableViewController.h"
+#import "SDWebImage.h"
+#import "WFCUContactListViewController.h"
+
+@interface ManagerTableViewController () <UITableViewDelegate, UITableViewDataSource>
+@property(nonatomic, strong)UITableView *tableView;
+@property(nonatomic, strong)NSMutableArray<WFCCGroupMember *> *managerList;
+@end
+
+@implementation ManagerTableViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    self.title = @"管理员设置";
+    
+    [self loadManagerList];
+    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStyleGrouped];
+    
+    self.tableView.delegate = self;
+    self.tableView.dataSource = self;
+    
+    self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
+    [self.tableView reloadData];
+    
+    [self.view addSubview:self.tableView];
+}
+
+- (void)loadManagerList {
+    NSArray *memberList = [[WFCCIMService sharedWFCIMService] getGroupMembers:self.groupInfo.target forceUpdate:YES];
+    self.managerList = [[NSMutableArray alloc] init];
+    for (WFCCGroupMember *member in memberList) {
+        if (member.type == Member_Type_Manager) {
+            [self.managerList addObject:member];
+        }
+    }
+}
+- (void)selectMemberToAdd {
+    WFCUContactListViewController *pvc = [[WFCUContactListViewController alloc] init];
+    pvc.selectContact = YES;
+    pvc.multiSelect = YES;
+    pvc.selectResult = ^(NSArray<NSString *> *contacts) {
+        
+    };
+    NSMutableArray *candidateUsers = [[NSMutableArray alloc] init];
+    NSArray *memberList = [[WFCCIMService sharedWFCIMService] getGroupMembers:self.groupInfo.target forceUpdate:NO];
+    for (WFCCGroupMember *member in memberList) {
+        if (member.type == Member_Type_Normal && ![member.memberId isEqualToString:self.groupInfo.owner]) {
+            [candidateUsers addObject:member.memberId];
+        }
+    }
+    pvc.candidateUsers = candidateUsers;
+    UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:pvc];
+    [self.navigationController presentViewController:navi animated:YES completion:nil];
+}
+- (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath {
+    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
+    if (cell == nil) {
+        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
+    }
+    
+    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+    cell.accessoryView = nil;
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    
+    if (indexPath.section == 0) {
+        WFCCUserInfo *owner = [[WFCCIMService sharedWFCIMService] getUserInfo:self.groupInfo.owner refresh:NO];
+        [cell.imageView sd_setImageWithURL:[NSURL URLWithString:owner.portrait]];
+        cell.textLabel.text = owner.displayName;
+    } else if(indexPath.section == 1) {
+        if (indexPath.row == self.managerList.count) {
+            cell.imageView.image = [UIImage imageNamed:@"plus"];
+            cell.textLabel.text = @"添加管理员";
+        } else {
+            WFCCUserInfo *manager = [[WFCCIMService sharedWFCIMService] getUserInfo:[self.managerList objectAtIndex:indexPath.row].memberId  refresh:NO];
+            [cell.imageView sd_setImageWithURL:[NSURL URLWithString:manager.portrait]];
+            cell.textLabel.text = manager.displayName;
+        }
+    }
+    
+    return cell;
+}
+
+- (NSInteger)tableView:(nonnull UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    if (section == 0) {
+        return 1;
+    } else if(section == 1) {
+        return self.managerList.count+1;
+    }
+    return 0;
+}
+
+-(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
+    if (section == 0) {
+        return @"群主";
+    } else if(section == 1) {
+        return @"管理员";
+    }
+    return nil;
+}
+-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    return 30.f;
+}
+-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    return 0.f;
+}
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 2; //成员管理,加群设置
+}
+-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    if (indexPath.section == 0) {
+        
+    } else if(indexPath.section == 1) {
+        if (indexPath.row == self.managerList.count) {
+            [self selectMemberToAdd];
+        } else {
+            
+        }
+    }
+}
+@end

+ 4 - 1
wfuikit/WFChatUIKit/ConversationSetting/ViewController/WFCUConversationSettingViewController.m

@@ -18,6 +18,7 @@
 #import "WFCUCreateGroupViewController.h"
 #import "WFCUProfileTableViewController.h"
 #import "WFCUCreateGroupViewController.h"
+#import "GroupManageTableViewController.h"
 
 #import "MBProgressHUD.h"
 #import "WFCUMyProfileTableViewController.h"
@@ -556,7 +557,9 @@
     
     [self.navigationController pushViewController:vc animated:YES];
   } else if ([self isGroupManageCell:indexPath]) {
-    
+      GroupManageTableViewController *gmvc = [[GroupManageTableViewController alloc] init];
+      gmvc.groupInfo = self.groupInfo;
+      [self.navigationController pushViewController:gmvc animated:YES];
   } else if ([self isSearchMessageCell:indexPath]) {
       WFCUConversationSearchTableViewController *mvc = [[WFCUConversationSearchTableViewController alloc] init];
       mvc.conversation = self.conversation;

+ 21 - 0
wfuikit/WFChatUIKit/Resources/WFChatUIKit.xcassets/plus.imageset/Contents.json

@@ -0,0 +1,21 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "universal",
+      "filename" : "icons8-plus -100.png",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

BIN
wfuikit/WFChatUIKit/Resources/WFChatUIKit.xcassets/plus.imageset/icons8-plus -100.png