I am having trouble making this work...
The object in the statusInfo array is an NSNumber. If it contains the value -2, I want the cell.detailText.text to display 2hrs West. Instead I am getting -2hrs West. I can't figure out how to get the absolute value of the integer stored in the NSNumber. I have tried a lot of different things, but the above code seems to me to be the way to do it. What am I doing wrong.
John
Code:
cell.detailTextLabel.text = [NSString stringWithFormat:@"%ihrs West",[[statusInfo objectAtIndex:indexPath.row] unsignedIntValue]];
The object in the statusInfo array is an NSNumber. If it contains the value -2, I want the cell.detailText.text to display 2hrs West. Instead I am getting -2hrs West. I can't figure out how to get the absolute value of the integer stored in the NSNumber. I have tried a lot of different things, but the above code seems to me to be the way to do it. What am I doing wrong.
John