Quote:
Originally Posted by iSDK
Thats wierd. Try this I have simplified it a bit more:
Code:
if (cell.textLabel.text == @"Weapons")
{
cell.imageView.image = [UIImage imageNamed:@"box2.png"];
}
|
I used an array on the table view called rootGuide. Here is my method:
// Customize the appearance of table view cells.
- (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];
}
// Configure the cell.
if (cell.textLabel.text == @"Weapons")
{
cell.imageView.image = [UIImage imageNamed:@"#1.jpg"];
}
cell.textLabel.textColor = [UIColor whiteColor];
cell.textLabel.text = [rootGuide objectAtIndex:indexPath.row];
return cell;
}
/*