I was looking for something and got in to this enum is apple UITableViewCell.h.
I am sorry if this is trivial but I wonder/curious what is the point of this.
I
It's a common trick in C to use the bitwise shift operator in enum values to allow you to combine enumeration values with the bitwise or operator.
That piece of code is equivalent to
enum {
UITableViewCellStateDefaultMask = 0,
UITableViewCellStateShowingEditControlMask = 1, // 01 in binary
UITableViewCellStateShowingDeleteConfirmationMask = 2 // 10 in binary
};
This allows you to bitwise or
two or more enumeration constants together
(UITableViewCellStateShowingEditControlMask | UITableViewCellStateShowingDeleteConfirmationMask) // == 3 (or 11 in binary)
to give a new constant that means both of those things at once. In this case, the cell is showing both an editing control and a delete confirmation control, or something like that.