I have a plist that I am trying to pull data from to display in a UITableViewController that is acting as a DetailViewController. I know how to display data from a plist in a UIPickerView. Is it the same, or what changes should be made?
What I have is:
- (void)viewDidLoad
{
[super viewDidLoad];
NSBundle*bundle=[NSBundle mainBundle];
NSString *path = [bundle pathForResource:@"Grammar" ofType:@"plist"];
grammarArray = [[NSArray alloc] initWithContentsOfFile:path];
[self configureView];
}
- (void)tableView:(UITableView *)tableViewdidSelectRow:(NSInteger)rowinComponent:(NSInteger)component
{
}
Where do I go from here?
It’s pretty straight forward:
To be able to show data in a
UITableViewCellis done by using theUITableViewController‘s- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPathdelegate method.Inside this method you can set the various members of the current
UITableViewCell.Such as
textLabelordetailTextLabel.You can further extend a
UITableViewCelland add more features to it.