TDGroupRoleVC.m 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. //
  2. // TDGroupRoleVC.m
  3. // smartRhino
  4. //
  5. // Created by niuzhen on 2020/5/8.
  6. // Copyright © 2020 tederen. All rights reserved.
  7. //
  8. #import "TDGroupRoleVC.h"
  9. #import "TDGroupInfoDetailCell.h"
  10. @interface TDGroupRoleVC ()<UITableViewDelegate,UITableViewDataSource>
  11. @property (weak, nonatomic) IBOutlet UITableView *tableView;
  12. @end
  13. @implementation TDGroupRoleVC
  14. +(TDGroupRoleVC *)initTDGroupRoleVC{
  15. TDGroupRoleVC *controller = [StoryboardManager.shared.TDGroup instantiateViewControllerWithIdentifier:@"TDGroupRoleVC"];
  16. return controller;
  17. }
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. self.fd_prefersNavigationBarHidden = YES;
  21. self.view.backgroundColor = UIColorHex(0xF1F1F1);
  22. self.tableView.delegate = self;
  23. self.tableView.dataSource = self;
  24. }
  25. #pragma mark - UITableViewDelegate
  26. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  27. {
  28. return 1;
  29. }
  30. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  31. {
  32. return 3;
  33. }
  34. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  35. {
  36. return 65.f;
  37. }
  38. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  39. {
  40. WS(weakSelf);
  41. switch (indexPath.row) {
  42. case 0:
  43. {
  44. TDGroupInfoDetailCell *cell = [TDGroupInfoDetailCell configCell2:tableView indexPath:indexPath];
  45. cell.cell2TitleL.text = @"加入小组需要管理员同意";
  46. [cell.cell2Switch setBlockForControlEvents:UIControlEventValueChanged block:^(id _Nonnull sender) {
  47. }];
  48. [cell.cell2Switch setOn:NO];
  49. return cell;
  50. }
  51. break;
  52. case 1:
  53. {
  54. TDGroupInfoDetailCell *cell = [TDGroupInfoDetailCell configCell2:tableView indexPath:indexPath];
  55. cell.cell2TitleL.text = @"只允许管理员发话题(禁言)";
  56. [cell.cell2Switch setBlockForControlEvents:UIControlEventValueChanged block:^(id _Nonnull sender) {
  57. }];
  58. [cell.cell2Switch setOn:NO];
  59. return cell;
  60. }
  61. break;
  62. default:
  63. {
  64. TDGroupInfoDetailCell *cell = [TDGroupInfoDetailCell configCell2:tableView indexPath:indexPath];
  65. cell.cell2TitleL.text = @"小组广场可见";
  66. [cell.cell2Switch setBlockForControlEvents:UIControlEventValueChanged block:^(id _Nonnull sender) {
  67. }];
  68. [cell.cell2Switch setOn:YES];
  69. return cell;
  70. }
  71. break;
  72. }
  73. }
  74. @end