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 UITableViewCell
is done by using the UITableViewController
's
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
delegate method.
Inside this method you can set the various members of the current UITableViewCell
.
Such as textLabel
or detailTextLabel
.
You can further extend a UITableViewCell
and add more features to it.
精彩评论