I have a section of code, in which I want a different accessoryView for the TableView cell, based off the number for that cell's entry. The code I have set up is:
NSInteger warriors = [entry.prayerWarriors intValue];
if (warriors == 0) {
//Do nothing
//NSLog(@"0");
}
else if (0 < warriors < 50) {
cell.accessoryView = firstLevel;
// NSLog(@"50");
}
else if (51 < warriors < 100) {
cell.accessoryView = secondLevel;
// NSLog(@"100");
}
else if (101 < warriors < 500) {
cell.accessoryView = thirdLevel;
// NSLog(@"500");
}
else {
cell.accessoryView = fourthLevel;
// NSLog(@"A Lot");
}
However, it always returns only the first entry for warriors == 0. What am I doing wrong?