// // ChatSetViewController.m // watch // // Created by xTT on 2017/7/21. // Copyright © 2017年 xTT. All rights reserved. // #import "ChatSetViewController.h" @interface ChatSetViewController () @end @implementation ChatSetViewController @synthesize myDataSource = _myDataSource; - (NSMutableArray *)myDataSource{ if (!_myDataSource) { _myDataSource = [[NSMutableArray alloc] initWithArray:@[@[@"接收其他用户信息",@"查看绑定设备的用户"]]]; } return _myDataSource; } - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ baseCell *cell = [tableView dequeueReusableCellWithIdentifier:@"baseCell"]; NSString *title = self.myDataSource[indexPath.section][indexPath.row]; if (!cell) { cell = [[baseCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"baseCell"]; cell.textLabel.font = [myHelper fixFoneSize:20 font:cell.textLabel.font]; cell.detailTextLabel.font = [myHelper fixFoneSize:15 font:cell.detailTextLabel.font]; UISwitch *uiSwitch = [[UISwitch alloc] init]; cell.accessoryView = uiSwitch; [uiSwitch addTarget:cell action:@selector(cellClick:) forControlEvents:UIControlEventValueChanged]; cell.block = ^(UISwitch *uiSwitch, baseCell *blockCell){ }; } cell.textLabel.text = title; // UISwitch *uiSwitch = (UISwitch *)cell.accessoryView; // uiSwitch.on = [disturbBan.status boolValue]; return cell; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end