Possible Duplicate:
What does the question mark and the colon (?: ternary operator) mean in objective-c?
I understand that we're setting oldRow
equal to some index path. I have never seen this syntax and can't find explanation in the book I'm using. What is the purpose of the ?
in the code below and what exactly does this code do?
int oldRow = (lastIndexPath != nil) ? [lastIndexPath row] : -1;