How do I display data from plist in a UITableViewCell?
<p>I'm trying to show data from a plist file in a custom UITableViewCell.</p>

<p>Here is my rootViewController.m</p>

<pre><code>- (void)viewDidLoad
{
    [super viewDidLoad];
    NSString *path = [[NSBundle mainBundle] pathForResource:@"projects" ofType:@"plist"];
    projects = [NSArray arrayWithContentsOfFile:path];
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
        int n = indexPath.row;
        for (n=1; n&lt;4; n = n+1) {

            NSDictionary *temp = [projects objectAtIndex:indexPath.row];
            projectCell.name.text = [temp valueForKey:@"name"];
        }
    }
    return projectCell;
}
</code></pre>

<p>The plist file i created only contains 4 dictionaries. And each one of them contains 2 strings. But I only want one of them to be in the cell. (I already created the UITableViewCell file named "ProjectCell".</p>

<p>I'm just starting, so my question might be really basic. But I spent so much time trying to figure it out.</p>

<p>Could anyone help me out?</p>

<p>EDIT: when i build and run, it always gives me a blank table</p>

<p>EDIT2: Interface of ProjectCell</p>

<pre><code>@interface ProjectCell : UITableViewCell {

IBOutlet UILabel *name;
IBOutlet UITableViewCell *theCell;

}

@property (nonatomic,retain) IBOutlet UILabel *name;
@property (nonatomic,retain) IBOutlet UITableViewCell *theCell;

@end
</code></pre>

<p>EDIT3 ProjectCell.m</p>

<pre><code>@implementation ProjectCell

@synthesize name,theCell;

@end
</code></pre>
