What does | and << mean?

前端 未结 2 1088
轮回少年
轮回少年 2021-01-18 23:37

Sorry if this is a common question but I don\'t know what it\'s called so I\'m having trouble searching for it.

How does this work:

view.autoresizing         


        
2条回答
  •  无人及你
    2021-01-19 00:31

    These are C bit level operators.

    | is binary or: 0001 | 0010 = 0011.

    << is a bit shift: 0001 << 1 = 0010.

    They are used for bitmasks.

提交回复
热议问题