我想让我的视图透明,以便形成当前视图,以前的视图应该稍微可见

发布于 2024-12-29 19:18:34 字数 271 浏览 1 评论 0原文

我想让我的视图透明,显示之前的视图稍微可见,我尝试了下面的一些操作,但它不起作用,我正在使用界面生成器来创建视图,请帮助我。

@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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只是偏爱你 2025-01-05 19:18:35

您确定 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)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文