0
这里是我在viewcontroller中使用我的appdelegate中提供的plist信息的代码。用plist填充表格推送不同的视图控制器
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.tableDataSource count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row];
cell.text = [dictionary objectForKey:@"myobject"];
这使用了在appdelegate中使用的plist,并在我的表格中填充了我的plist中有多少个入口。
我想要做的下一件事是为每个填充了相应“键”的单元格推送一个非动态viewcontoller。
所以,myobject单元格(选中时)将推动myobject viewcontroller。 yourobject单元格(选中时)将按下对象视图控制器。
All the way down.
我该怎么去做这件事?