-2

What does this line represent? Please any one explain about | symbol?

self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
4

1 に答える 1

1

| is bitwise OR operator.

You can find more on it here.

the values of both the constanst are as, it find bitwise on them.

UIViewAutoresizingFlexibleWidth  = 1 << 1 //2

UIViewAutoresizingFlexibleHeight = 1 << 4 //16

This will be :

UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight = 18
于 2013-03-15T10:12:52.587 に答える