Skip to content
This repository was archived by the owner on Nov 21, 2022. It is now read-only.

请教问题 #1

Open
SummerWu opened this issue Jun 16, 2015 · 3 comments
Open

请教问题 #1

SummerWu opened this issue Jun 16, 2015 · 3 comments

Comments

@SummerWu
Copy link

请问一下,一个layer怎么做到背部也有图片的,可以说一下你哪段代码实现的吗?

@adow
Copy link
Owner

adow commented Jun 16, 2015

已经很久了,我记得应该是这里,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 #1.

@SummerWu
Copy link
Author

你一个界面分成了上下两个layer,然后每个layer都有正面和反面,对吗,
但有个疑问,上面的layer反面是上一个界面的图片,而下面的layer反面是下一个界面的,这是哪里实现的呢?

@adow
Copy link
Owner

adow commented Jun 17, 2015

其实就是把图片切成两半,然后计算那个图片贴到那个 layer 上面去 : https://github.com/adow/WKFlipsView/blob/master/WKFlipsView/WKFlipPageView/WKFlipsPasterService.m

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants