Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个子视图,我希望它完全不透明。它包含一个不透明的 UITextView 和一个 UIButton。UITextView 有一些动画。我似乎无法让子视图变得不透明。无论我尝试什么,它最终都是透明的。我尝试使用另一个包装子视图,但这并没有解决问题。我怎样才能让这个子视图不透明?
我建议重组视图,以便需要透明度的视图(它自己的子视图树是围绕组件的容器视图的兄弟,该组件应该是不透明的。
main_view `-semi-transparent_container `-some_semitrans_component `-opaque_container `-some_opaque_componenent