It's a short form if statement and could be written:
if (gesture.direction == UISwipeGestureRecognizerDirectionRight) {
sideView.frame = CGRectMake(-swipedCell.frame.size.width, swipedCell.frame.origin.y, swipedCell.frame.size.width, swipedCell.frame.size.height);
} else {
sideView.frame = CGRectMake(swipedCell.frame.size.width, swipedCell.frame.origin.y, swipedCell.frame.size.width, swipedCell.frame.size.height);
}
==
is just the standard equivalence check. ?
is the start of a short form if operator and is completed by the :
.
As rmaddy pointed out, the above isn't strictly what's going on, it's more like:
CGFloat x;
if (gesture.direction == UISwipeGestureRecognizerDirectionRight) {
x = -swipedCell.frame.size.width;
} else {
x = swipedCell.frame.size.width;
}
sideView.frame = CGRectMake(x, swipedCell.frame.origin.y, swipedCell.frame.size.width, swipedCell.frame.size.height);