I have several entries in a core data database. They populate a table view. On the detail view for each entry, you can press a "load image button" and either pick and image from your camera roll, take a picture, or choose a stock image.
I'd like the stock image to change based on the entry chosen. I thought I could key off the entity name.
Say there are 2 entries for my "People" entity: "Jack" and "Jill". I thought I could do this:
Code:
if (people.name == @"Jack") {
[peopleImage setImage:[UIImage imageNamed:@"jack.png"]];
}
else {
[peopleImage setImage:[UIImage imageNamed:@"jill.png"]];
}
In this case, it always loads the "jill" image.
Is "people.name == @"Jack"" right or am I doing something wrong?