UIViewAnimationTransitionCurlUp 具有透明背景
我正在使用 UIViewAnimationTransitionCurlUp
实现相当标准的 UIView
动画。基本想法是,我在屏幕上有一个文件夹,上面覆盖着一堆页面,当我从一页切换到另一页时,我使用卷曲动画。每个页面都是一个子视图,约占屏幕的 70%,因此剪贴板在背景中仍然可见。
这个动画一切正常,问题是即使每个“页面”(这是一个单独的 UIViewController
和 UIView
)都有透明背景,页面背景变得可见在卷页期间。它只是稍微可见,就像 alpha 为 0.1 的黑色背景。但破坏了效果。
有什么想法吗?这是针对不会在应用商店上分发的私有应用程序,因此私有 API 是可以的。
I'm implementing a fairly standard UIView
animation, using UIViewAnimationTransitionCurlUp
. The basic idea is that I have a folder on the screen covered with a stack of pages, and as I change from page to page I use the curl up animation. Each page is a subview that takes up about 70% of the screen so that the clipboard is still visible in the background.
This animation all works fine, that problem is that even though each "page" (which is a separate UIViewController
& UIView
) has a transparent background, the page background becomes visible during the page curl. It's only slightly visible, like a black background with an alpha of 0.1. But it ruins the effect.
Any ideas? This is for a private application that will not be distributed on the app store, so private APIs are ok.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要将页面视图控制器的
view
的大小更改为页面图像的大小。从您包含的图像来看,您的页面也旋转了。您可以对视图应用旋转以匹配此旋转。这是我用来实现屏幕截图中效果的部分代码:You will need to change the size of the
view
of your page view controller to be exactly the size of your page image. It looks from your included image that your page is also rotated. You can apply a rotation to your view to match this rotation. Here is part of the code that I used to achieve the effect in the screenshot: