ProfileController.m
1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//
// ProfileController.m
// DreamSleep
//
// Created by peter on 2022/4/1.
//
#import "ProfileController.h"
#import "SystemSetController.h"
@interface ProfileController ()
@property (nonatomic, strong) NSArray *tmpDatas;
@end
@implementation ProfileController
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"我的";
self.tableView.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
self.tmpDatas = @[@"注册登录信息", @"意见反馈", @"系统设置", @"邀请好友", @"关于我们", @"前往小程序", @"关注公众号", @"添加客服微信", @"失眠的认知行为疗法"];
}
#pragma mark - 导航栏日间、黑夜模式
- (NaviStyle)navigationBarStyle {
return NaviStyleDefault;
}
#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.tmpDatas.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"profileCell" forIndexPath:indexPath];
cell.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
cell.textLabel.text = self.tmpDatas[indexPath.row];
cell.textLabel.dk_textColorPicker = DKColorPickerWithKey(TEXT);
cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
switch (indexPath.row) {
case 2: // 系统设置入口
{
SystemSetController *sysVC = [SystemSetController new];
[self.navigationController pushViewController:sysVC animated:YES];
}
break;
default:
break;
}
}
@end