|
|
@@ -59,7 +59,18 @@ static NSString * const kCellID = @"PreferencesViewControllerCellID";
|
|
|
}
|
|
|
-(NSArray *)tableDataArray{
|
|
|
if (!_tableDataArray) {
|
|
|
- _tableDataArray = [[NSArray alloc]initWithObjects:@"设置",@"用户反馈",@"关于", nil];
|
|
|
+ _tableDataArray = [[NSArray alloc]initWithObjects:
|
|
|
+ @{
|
|
|
+ @"title":@"设置",
|
|
|
+ @"class":@"PreferencesSettingVC"
|
|
|
+ },
|
|
|
+ @{
|
|
|
+ @"title":@"用户反馈",
|
|
|
+ @"class":@"feedBackVC"},
|
|
|
+ @{
|
|
|
+ @"title":@"关于",
|
|
|
+ @"class":@"aboutUsVC"},
|
|
|
+ nil];
|
|
|
}
|
|
|
return _tableDataArray;
|
|
|
}
|
|
|
@@ -172,11 +183,12 @@ static NSString * const kCellID = @"PreferencesViewControllerCellID";
|
|
|
if (!cell) {
|
|
|
cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:kCellID];
|
|
|
}
|
|
|
- cell.textLabel.text = self.tableDataArray[indexPath.row];
|
|
|
+ cell.textLabel.text = [self.tableDataArray[indexPath.row]objectForKey:@"title"];
|
|
|
return cell;
|
|
|
}
|
|
|
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
|
|
NSLog(@"tap %@",indexPath);
|
|
|
NSLog(@"cell text: %@",[[[tableView cellForRowAtIndexPath:indexPath]textLabel]text]);
|
|
|
+
|
|
|
}
|
|
|
@end
|