-->

折叠/卷曲的UIImageView的边缘(Fold/curl edge of UIImageView

2019-09-22 14:46发布

我需要折叠/展开的UIImageView的边缘标记为收藏。 我搜索跨多个站点,但还没有找到任何事情。 我附加了一些示例图像,并且,如果可能的话,带动画效果。

谢谢!!

Answer 1:

做到这一点的方法之一是动画视图usign的OpenGL。 没有为那个叫一个漂亮的图书馆XBPageCurl

但是,你可以通过创建卷曲效果口罩实现轻得多的解决方案,而过渡到以动画视图。 下面是它会是什么样子

[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3];

UIImage *maskedImage = [yourImage imageMaskedWithImage:yourMask];
[yourImageView setImage:maskedImage];

[UIView commitAnimations];

要知道如何掩盖的图像,看看这里http://mobiledevelopertips.com/cocoa/how-to-mask-an-image.html



Answer 2:

是可以做到UIViewControllerpresentModalViewController:animated:和设置modalTransistionStyleUIModalTransitionStylePartialCurl 。 请参阅苹果的文档 。



文章来源: Fold/curl edge of UIImageView