不要使用superview alpha值更新子视图 [英] Not to update the subview with superview alpha value
本文介绍了不要使用superview alpha值更新子视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的问题是当我将视图作为子视图添加到根视图时。当我更改了根视图的alpha值时,同样在子视图中也发生了。实际上我不需要在子视图中进行更新。是否有任何解决方案要做那样。
My question is when i added a view as subview to Root view.When i changed the alpha value of root view same is occurring in subview also.Actually i don't need the updating in subview.Is there any solution to do like that.
推荐答案
这只会改变根视图的alpha而不是其他的
This will change only the alpha of the root view, not the others
self.view.backgroundColor = [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.5];
这篇关于不要使用superview alpha值更新子视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文