本文介绍了iOS-此UIPageViewController是由UISegmentedControl控制还是这是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
该UIPageViewController
如何由似乎是UISegmentedControl
的标头控制?
How this UIPageViewController
can be controlled by this header which seems to be UISegmentedControl
?
推荐答案
顶部的栏看起来像是带有有趣指示线的自定义控件.这可以通过将2个视图控制器并排放置在UIScrollView
上来实现.在UIScrollViewDelegate
中,实现scrollViewDidScroll
并相应地更新指示器线的偏移量.
The top bar looks like a custom control with an interesting indicator line.This could be accomplished by putting the 2 view controllers on a UIScrollView
side by side.In the UIScrollViewDelegate
implement scrollViewDidScroll
and update the indicator line offset accordingly.
这篇关于iOS-此UIPageViewController是由UISegmentedControl控制还是这是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!