FlowCoverView 如何更改图块(纹理)大小?

发布于 2024-11-16 22:43:30 字数 528 浏览 2 评论 0原文

我正在使用 FlowCoverView,这是 Apple 封面流程的开源(且符合 AppStore 兼容)替代品(您可以在此处找到它 http: //chaosinmotion.com/flowcover.m

如何更改图块(或库中称为的纹理)大小(至少静态)?

该代码具有静态固定的 256x256 图块大小。使用 TEXTURESIZE 定义并在代码中硬编码数字 256 可以解决此问题。 我尝试用 TEXTURESIZE 定义替换所有出现的 256 个,它可以工作......只要定义设置为 256!一旦我输入另一个值,我就会在流视图中获得白色的 256x256 图像(当然,我通过委托传递尺寸正确的 UIImages):(

我找不到代码中使用此 256 值的位置。我重复一遍:所有 256 次出现均被 TEXTURESIZE

PS 替换。 当然,改进这个漂亮库的下一步是使 TEXTURESIZE 成为一个属性,在运行时设置......

I'm using FlowCoverView, an open source (and AppStore compliant) alternative to Apple's cover flow (you can find it here http://chaosinmotion.com/flowcover.m)

How can I change the tile (or texture as it's called in the library) size (statically at least)?

The code comes with a statically fixed 256x256 tile size. This is fixed using the TEXTURESIZE define and hard coding the number 256 within the code.
I tried to replace all 256 occurrence with the TEXTURESIZE define and it works... As long as the define is set to 256! As soon as I put another value, I get white 256x256 images in the flow view (I pass the correctly dimensioned UIImages through the delegate of course) :(

I can't find where in the code this 256 value is used. I repeat: all 256 occurrences were replaced by the TEXTURESIZE constant.

PS
Of course, the next step to improve this nice library will be to make the TEXTURESIZE a property, to be set at runtime...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

旧时模样 2024-11-23 22:43:30

用这个。它比你的更容易实现。

  1. https://github.com/lucascorrea/iCarousel

Use this. It is much easier to implement then yours.

  1. https://github.com/lucascorrea/iCarousel
别靠近我心 2024-11-23 22:43:30

将 TEXTURESIZE 更改为 512 。清理构建并运行它

Change the TEXTURESIZE to 512 . clean the build and run it

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文