Browse Source

数据源更改为数组 包字典

hxb 8 years ago
parent
commit
eb71dc4ffd

BIN
WSCloudStorage.xcworkspace/xcuserdata/jonathanh.xcuserdatad/UserInterfaceState.xcuserstate


+ 3 - 3
WSCloudStorage.xcworkspace/xcuserdata/jonathanh.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -106,11 +106,11 @@
             ignoreCount = "0"
             continueAfterRunningActions = "No"
             filePath = "WSCloudStorage/VC/TabBarMore/PreferencesViewController.m"
-            timestampString = "523779743.24527"
+            timestampString = "523780703.876146"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "172"
-            endingLineNumber = "172"
+            startingLineNumber = "183"
+            endingLineNumber = "183"
             landmarkName = "-tableView:cellForRowAtIndexPath:"
             landmarkType = "7">
          </BreakpointContent>

+ 14 - 2
WSCloudStorage/VC/TabBarMore/PreferencesViewController.m

@@ -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