iPhone SDK: Non-transparent subviews in transparent view

前端 未结 2 2080
别跟我提以往
别跟我提以往 2020-12-16 18:47

I have a subview that has been added to my UIView. The idea is that the subview is a hovering panel with uibuttons. The subview is given an alpha of 0.2, as the user needs

2条回答
  •  [愿得一人]
    2020-12-16 18:51

    Instead of

    topHoverView.backgroundColor = [UIColor transparentColor];
    

    , the following code is right.

    topHoverView.backgroundColor = [UIColor clearColor];
    

提交回复
热议问题