UIPageControl - 要去特定的点吗? [英] UIPageControl --To go to specific dot?

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

问题描述

我有两个问题,

1)如果我有10个点(UIPageControl)并且我想直接继续任何特定点,从1开始说5从而没有旅行通过2到4.我将如何做到这一点?

1) If i have 10 dots (UIPageControl) and i want to directly go on any specific dot say 5 from from 1 without traveling through 2 to 4. How i'll do that?

2)&是否有可能通过点自动旅行,比如2分钟之后视图会随着点的变化而没有用户交互(就像我们在广告中看到的那样)?

2)& Is it possible to travel automatically through dots, like after 2 min view will change with dots without user interaction (like we see in advertisements)?

推荐答案


  1. pageControl.currentPage = 5

是的,你需要设置NSTimer。

Yes you need to set an NSTimer.

myTimer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(changeDot:) userInfo:nil repeats:YES];


编辑:

NSTimer课程参考

这篇关于UIPageControl - 要去特定的点吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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