iOS-此UIPageViewController是由UISegmentedControl控制还是这是什么? [英] iOS - Is this UIPageViewController controlled by UISegmentedControl, or what is this?

查看:110
本文介绍了iOS-此UIPageViewController是由UISegmentedControl控制还是这是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

3

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控制还是这是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆