开发者

Info From plist in UITableViewController

开发者 https://www.devze.com 2023-03-26 23:46 出处:网络
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 s

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消