如何使用presentModalViewController创建透明视图 [英] How to use presentModalViewController to create a transparent view

查看:90
本文介绍了如何使用presentModalViewController创建透明视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在显示一个模态视图

I am displaying a modal view with

[self presentModalViewController:controller animated:YES];

当视图向上移动时,根据xib文件中的设置,它是透明的来自,但一旦它填满屏幕,它就会变得不透明。

When the view moves up the screen it is transparent as per the setting in the xib file it is created from, but once it fills the screen it goes opaque.

是否仍然保持视图透明?

Is there anyway of keeping the view transparent?

我怀疑放置它的视图没有渲染,而是模态视图变得不透明。

I suspect that the view it is being placed over is not being rendered rather then that the modal view is becoming opaque.

推荐答案

您的视图仍然是透明的,但是一旦您的模态控制器位于堆栈的顶部,它背后的视图就会被隐藏(就像任何最顶层的视图一样)控制器)。解决方案是自己手动为视图设置动画;那么后面的viewController将不会被隐藏(因为你不会'离开'它)。

Your view is still transparent, but once your modal controller is at the top of the stack, the view behind it is hidden (as is the case with any top-most view controller). The solution is to manually animate a view yourself; then the behind-viewController won't be hidden (since you won't have 'left' it).

这篇关于如何使用presentModalViewController创建透明视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆