What is the impact of view.alpha = 0 vs view.hidden = YES?

后端 未结 4 331
陌清茗
陌清茗 2020-12-23 17:55

Transparency is evil, on iOS devices even more so than on heavier machines. I therefore figured to use view removeFromSuperView first, if not applicable v

4条回答
  •  隐瞒了意图╮
    2020-12-23 18:17

    One advantage of setting alpha instead of the hidden property is that the alpha property plays more nicely with animations. I had an animation to show/hide my navigation bar and when I used the alpha property the navigation bar faded away while the hidden property was more abrupt.

提交回复
热议问题