gpt4 book ai didi

ios - iOS 文档中有关 UIView 的 alpha 属性的错误?

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:23:48 25 4
gpt4 key购买 nike

我刚刚注意到 UIView 的类引用中有些奇怪的地方。在 alpha 下它指出:

This value affects only the current view and does not affect any of its embedded subviews.

但您肯定知道,事实并非如此。如果您更改父 View 的 alpha,所有 subview 也会应用新的 alpha。

是文档有误还是我误解了?

最佳答案

This value affects only the current view and does not affect any of its embedded subviews.

我的理解是:

Changing the alpha value on a view will not change the alpha value on any subviews. As in, whilst the subviews will appear to have changed their alpha, their .alpha property value will not change when the superview's .alpha is changed.

关于ios - iOS 文档中有关 UIView 的 alpha 属性的错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13067296/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com