adow
adow
恩先这样做了,谢谢
不好意思啊,这个已经是好几年前写的了。我现在不记得怎么改了,可能在现在的系统下面运行的时候已经有问题了。
已经很久了,我记得应该是这里,https://github.com/adow/WKFlipsView/blob/master/WKFlipsView/WKFlipPageView/WKFlipsLayer.m#L515 https://github.com/adow/WKFlipsView/blob/master/WKFlipsView/WKFlipPageView/WKFlipsLayer.m#L515 我添加了两个 CALayer, 需要注意里面 doubleSided 属性,还有背面的应该是倒过来贴图的。 > 在 2015年6月17日,上午12:24,SummerWu [email protected] 写道: > > 请问一下,一个layer怎么做到背部也有图片的,可以说一下你哪段代码实现的吗? > > — > Reply to this email directly or view it on GitHub https://github.com/adow/WKFlipsView/issues/1.
其实就是把图片切成两半,然后计算那个图片贴到那个 layer 上面去 : https://github.com/adow/WKFlipsView/blob/master/WKFlipsView/WKFlipPageView/WKFlipsPasterService.m
这个早不记得怎么改了,我觉得现在用 SwiftUI 实现这个可能容易些吧