Reputation: 125
Here is the code that I have in the viewcontroller that uses the plist information provided in my appdelegate.
- (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"];
This uses the plist that is used in the appdelegate and populates the cells in my table with exactly how many entrances I have in my plist.
The next thing I want to do is push a nondynamic viewcontoller for each cell populated with its corresponding "key".
So, the myobject cell (when selected) pushes the myobject viewcontroller. The yourobject cell (when selected) pushes the yourobject viewcontroller.
All the way down.
How could I go about doing this?
Upvotes: 0
Views: 292
Reputation: 480
Hope this helps!
Upvotes: 1