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

后端 未结 4 344
陌清茗
陌清茗 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:11

    Yes, Both will Act Same

    Only difference would be if you want to hide some thing with animation like transparent view.

    You can set it's alpha to 0.5 than in UIView.animate with spring set it's aplha to 0.

    Rest both of them works the same.

提交回复
热议问题