UIPageControl 本身无用吗?

Is UIPageControl Useless By Itself?(UIPageControl 本身无用吗?)

本文介绍了UIPageControl 本身无用吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究将 UIPageControl 用于应用程序的滚动部分,我想知道它是如何工作的.文档显示了更改页面、设置页数等的方法,但页面控件本身不包含任何类型的滚动视图.

I've been looking into using the UIPageControl for a scrolling part of an application, and I was wondering how it works. The docs show methods for changing pages, setting the number of pages etc., but by itself the page control doesn't encompass any kind of scroll view.

UIPageControl 和 UIScrollView 类是否应该在想要显示页面指示器时结合使用(例如在 iPhone 的主屏幕上显示应用页面)?

Are the UIPageControl and UIScrollView classes supposed to be used in conjunction when one wants to show the page indicator (like on the home screen of the iPhone with the app pages)?

推荐答案

分页位其实是通过在UIScrollView上设置分页属性来完成的.页面控件只是一个有用的 UI 结构,但实际上与分页本身没有任何关系.

The paging bit is actually done by setting the paging property on the UIScrollView. The page control is simply a useful UI construct, but doesn't actually do anything to do with paging itself.

这篇关于UIPageControl 本身无用吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:UIPageControl 本身无用吗?

基础教程推荐