【发布时间】:2016-04-30 11:35:58
【问题描述】:
我用UIView 上的一些图像创建了一个网格视图,它应该像默认的iOS Photos app Collection [Screenshot attached]
点击图片时,它应该在带有 UIPageViewController 的屏幕中显示完整的图片 我用 UIPageViewController 添加了 FullImages 但它只有两个方向,我只能从左到右和从右到左或从上到下和从下到上滚动,但我想同时做这两个
例如: 我按以下顺序有 9 张图片
1 2 3
4 5 6
7 8 9
假设我在图片5
如果我从top to bottom 滚动,我必须转到图像2
现在,如果我从 bottom to top 滚动,我必须转到图像 5
现在,如果我再次从 bottom to top 滚动,我必须转到图像 8
现在如果我从 right to left 滚动,我必须转到图像 9
现在,如果我从 top to bottom 滚动,我必须转到图像 6
现在如果我从left to right 滚动,我必须转到图像5
有人可以建议如何实现吗?
我可以使用UIPageViewController 或任何其他控件来获得此效果
【问题讨论】:
-
看看 UICollectionView(高级)或 UIScrollView(低级)。
标签: ios customization uipageviewcontroller