问题
I am making an app where 10 images can be scrolled through using a page control. The problem is that I have absolutely no idea how to use a page control. Any help at all is appreciated.
回答1:
There is an example here, and you can read the documentation here.
Try downloading and running the example, then scanning through the documentation and the source code of the example to get an idea of what it is doing and how to use it.
I found the above two links by searching google for "uipagecontrol" and "uipagecontrol example".
回答2:
You basically need to add a scrollView and enable pagination on it. Then add content of each page you want to show. In your case that will be images.
You can find a very descriptive tutorial to add images in page control from here http://www.raywenderlich.com/10518/how-to-use-uiscrollview-to-scroll-and-zoom-content
sample code http://cdn1.raywenderlich.com/downloads/ScrollViews.zip
来源:https://stackoverflow.com/questions/3487572/how-do-i-use-a-uipagecontrol