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.
A control that displays a horizontal series of dots, each of which corresponds to a page in the app's document or other data-model entity.
Enter Swift as Language and choose Next. For this tutorial some images are needed, so download the movies posters and drag them to the Assets Library. Go to the Storyboard and drag a Scroll View from the Object Library to the main view. Next, drag a Page Control from the Object Library below the scroll View.
iOS, iPadOS A page control can adjust the appearance of indicators to provide more information about the list. For example, the control highlights the indicator of the current page so people can estimate the page's relative position in the list.
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".
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With