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.
我对子视图进行了子类化并将其添加到当前视图中。它通过覆盖draw方法绘制一个简单的圆。
但是子视图默认情况下具有黑色背景。如何使我的子类子视图的背景透明?
做
self.backgroundColor = [UIColor clearColor] 不起作用?
您可以将下一个代码调用到视图初始化中:
self.backgroundColor = [UIColor clearColor];