页面卷曲动画与透明的UIImageView(IOS) [英] page curl animation with transparent UIImageView (iOS)
问题描述
我有一个带状(书签),我想蜷缩,屏幕关闭。色带具有V切出的底部,这是一个透明的部分 - 一个透明的PNG一个UIImageView。
I have a ribbon (bookmark) that I want to curl up, off of the screen. The ribbon has a V cut out of the bottom, which is a transparent section - a UIImageView with a transparent png.
当我在功能区进行卷曲,底层的阴影重新presents整个视图(这在技术上是广场)。我试图让这个看起来尽可能真实,所以如果有人能在正确的方向指向我,那将是有益的。
When I perform a curl on the ribbon, the underlying shadow represents the entire View (which is technically square). I am trying to make this look as real as possible so if someone could point me in the right direction, that would be helpful.
我曾尝试
- 掩蔽视图
- 调整开源页面卷曲框架
- 页面卷曲过程中更换viewAtIndex
- UIView的动画
I have tried - masking the view - tweaking open source page curl frameworks - replacing the viewAtIndex during a page curl - UIView animations
但它们都导致一个方形阴影。
but they all result in a square shadow.
我目前可以提供最佳的体验是一个简单的UIView动画而淡出:
The best experience I can provide so far is a simple UIView animation while fading out the:
[UIView transitionWithView:_ribbonButton
duration:0.5f
options:UIViewAnimationOptionTransitionCurlUp
animations:^{
[_ribbonButton setAlpha:0.0f];
}
completion:^(BOOL completed){
[self animationCompleted:completed];
}];
下面是截图: http://livevision.us/word$p$ PSS /?attachment_id = 60
推荐答案
我不认为将使用UIViewAnimationOptionTransitionCurlUp成为可能。视图的动画是基于整个视图边界内,该视图的未内容
I don't think that will be possible using UIViewAnimationOptionTransitionCurlUp. The view animations are based on the entire view bounds, not the contents of the view.
我认为你将不得不code自己的东西在OpenGL或pre-渲染的翻转动画或别的东西。有一些现有的OpenGL解决方案可以下载和定制。
I think you will have to code something yourself in OpenGL or a pre-rendered flip animation or something else. There are a number of existing OpenGL solutions you can download and customize.
这篇关于页面卷曲动画与透明的UIImageView(IOS)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!