什么是处理具有如此多点的UIPageControl的最佳方式,它们并非全部适合屏幕 [英] What's the best way of handling a UIPageControl that has so many dots they don't all fit on the screen

查看:166
本文介绍了什么是处理具有如此多点的UIPageControl的最佳方式,它们并非全部适合屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序中有一个UIPageControl,看起来非常精细,大约10页(点),但是用户可以添加许多不同的视图,因此点数可以说是30。

I have a UIPageControl in my application that looks perfectly fine with around 10 pages (dots), it's possible however for the user to add many different views, and so the number of dots could become say 30.

当发生这种情况时,点刚刚从屏幕边缘消失,你不能总是看到当前选中的页面,使它看起来很糟糕。

When this happens the dots just disappear off the edge of the screen, and you can't always see the currently selected page, making it all look terrible.

是否有任何方法可以使页面控制成为多行,或者在当前可见页面消失的情况下向左或向右移动。

Is there any way to make the pagecontrol multi-line, or to shift it left or right at the moment the currently visible page disappears of the screen.

推荐答案

我创建了一个使用包含UIWebView的UIScrollView的eBook应用程序。这本书有100多页,所以UIPageControl因为你指出的问题无法处理它。我最终创建了一个自定义的滑块类型视图,其行为类似于UIPageControl但可以处理大量页面。这就是你需要做的事情。 UIPage控件无法处理任意数量的页面...

I created an eBook application that used UIScrollView that contained a UIWebView. The book had over 100 pages so UIPageControl could not handle it because of the problem you pointed out. I ended up creating a custom "slider" type view that acted similar to UIPageControl but could handle the large number of pages. That's pretty much what you will need to do. UIPage control cannot handle as many pages as you want...

这篇关于什么是处理具有如此多点的UIPageControl的最佳方式,它们并非全部适合屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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