Is UIView's opaque property with a value of YES in conflict with its backgroundColor property with a value of [UIColor clearColor]?

前端 未结 2 1870
北荒
北荒 2021-01-04 12:09

such as the code:

view.opaque = YES;

and

view.backgroundColor = [UIColor clearColor];

any one who can exp

2条回答
  •  死守一世寂寞
    2021-01-04 12:49

    No, it shouldn't be. It should act clear. The color clear is completely opaque, if that even makes sense. It won't show up black or white or anything else if you change its alpha. It will be clear.

提交回复
热议问题