WFCSecurityTableViewController.m 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. //
  2. // SettingTableViewController.m
  3. // WFChat UIKit
  4. //
  5. // Created by WF Chat on 2017/10/6.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCSecurityTableViewController.h"
  9. #import <WFChatClient/WFCChatClient.h>
  10. @interface WFCSecurityTableViewController () <UITableViewDataSource, UITableViewDelegate>
  11. @property (nonatomic, strong)UITableView *tableView;
  12. @end
  13. @implementation WFCSecurityTableViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. self.title = LocalizedString(@"AccountSafety");
  17. self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStyleGrouped];
  18. self.tableView.delegate = self;
  19. self.tableView.dataSource = self;
  20. self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
  21. [self.tableView reloadData];
  22. [self.view addSubview:self.tableView];
  23. }
  24. - (void)didReceiveMemoryWarning {
  25. [super didReceiveMemoryWarning];
  26. // Dispose of any resources that can be recreated.
  27. }
  28. -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  29. return 48;
  30. }
  31. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  32. if (indexPath.section == 0) {
  33. //cell.textLabel.text = @"修改密码";
  34. }
  35. }
  36. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  37. return [[UIView alloc] initWithFrame:CGRectZero];
  38. }
  39. //#pragma mark - Table view data source
  40. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  41. return 1;
  42. }
  43. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  44. if (section == 0) {
  45. return 1;
  46. }
  47. return 0;
  48. }
  49. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  50. UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"style1Cell"];
  51. if (cell == nil) {
  52. cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"style1Cell"];
  53. }
  54. cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
  55. cell.accessoryView = nil;
  56. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  57. if (indexPath.section == 0) {
  58. cell.textLabel.text = LocalizedString(@"ChangePassword");
  59. }
  60. return cell;
  61. }
  62. /*
  63. // Override to support conditional editing of the table view.
  64. - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
  65. // Return NO if you do not want the specified item to be editable.
  66. return YES;
  67. }
  68. */
  69. /*
  70. // Override to support editing the table view.
  71. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
  72. if (editingStyle == UITableViewCellEditingStyleDelete) {
  73. // Delete the row from the data source
  74. [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
  75. } else if (editingStyle == UITableViewCellEditingStyleInsert) {
  76. // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
  77. }
  78. }
  79. */
  80. /*
  81. // Override to support rearranging the table view.
  82. - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
  83. }
  84. */
  85. /*
  86. // Override to support conditional rearranging of the table view.
  87. - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
  88. // Return NO if you do not want the item to be re-orderable.
  89. return YES;
  90. }
  91. */
  92. /*
  93. #pragma mark - Navigation
  94. // In a storyboard-based application, you will often want to do a little preparation before navigation
  95. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  96. // Get the new view controller using [segue destinationViewController].
  97. // Pass the selected object to the new view controller.
  98. }
  99. */
  100. @end