我想让我的视图透明,以便形成当前视图,以前的视图应该稍微可见
我想让我的视图透明,显示之前的视图稍微可见,我尝试了下面的一些操作,但它不起作用,我正在使用界面生成器来创建视图,请帮助我。
@implementation CylinderBoresTotal
(void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor clearColor];
self.view.alpha = 0.2;
self.view.opaque = NO;
i want make my view transparent show the the previous view will slightly visible,i tried something below but it is not working , i am using interface builder to create view,please help me out.
@implementation CylinderBoresTotal
(void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = [UIColor clearColor];
self.view.alpha = 0.2;
self.view.opaque = NO;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您确定 self.view 下面有东西吗?
来自另一个 UIViewController 的视图不在 CylinderBoresTotal 的 self.view 之下。
您可以先捕获该视图的图像,然后将其插入到当前视图中。 (昂贵的)
Are you sure there is something underneath the
self.view
?Views from another UIViewController is not underneath the CylinderBoresTotal's
self.view
You may capture the image of that view first, and insert it into your current view instead. (expensive)