gpt4 book ai didi

ios - UIPageViewController 影响 UIImage 颜色?

转载 作者:行者123 更新时间:2023-12-01 19:36:07 25 4
gpt4 key购买 nike

我在做什么 :我正在创建一个自定义 View Controller ,以鼓励用户邀请 friend 加入应用程序以换取高级功能。我通过展示 UIViewController 来做到这一点具有 UIPageViewController 的容器 View 嵌入在容器 View 中。所有高级功能的详细信息显示在嵌入式 UIPageViewController的 View Controller 。我有一些气泡的图像,这些气泡与我们的品牌颜色相匹配,位于每个 UIPageViewController 的前缘或后缘的 View Controller ,以便在每个 View Controller 之间平移时图像“连接”成一个图像。这是它的样子:

enter image description here

我的问题 : 这种方法的问题在于,当在 UIPageViewController 的两个之间平移一半时的 View Controller ,各个 View Controller 之间气泡的颜色 不匹配 :



请注意,图像在各个 View Controller 之间相遇的蓝色阴影 是不一样的阴影。

尽管为每个 View Controller 使用了相同的“气泡”图像,但它看起来像这样:



更新
我决定继续创建一个 cocoapod,它可以执行上述问题中提出的相同操作。 Feel free to check it out!

enter image description here

最佳答案

既然你只有几页要展示,那就放弃UIPageViewController,把整个滑动界面配置成一个大的连续分页的UIScrollView的内容。作为奖励,您不必计算气泡图像的拆分。

关于ios - UIPageViewController 影响 UIImage 颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60065778/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com