IOS 5 Implementing a page controller with storyboards in an existing application

I have an application that should display a series of graphs (using Core Plot). I would like each of these graphs to be displayed in their own view, preferably using a paged controller. I have 8 graphs.

Can someone direct me to a resource that shows how to implement something like this in iOS 5 with downstream versions? I can't seem to find anything that explains this with the storyboard in general.

Thanks,

Jack

+6
source share
1 answer

This is pretty easy. You just need to drag and drop the UIScrollView into your controller, select it and select the "Paging Enabled" checkbox. You can also drag the page control and set yourself as a delegate to the UIScrollViewDelegate protocol and update it when the UIScrollView calls the -scrollViewDidScroll: method.

Remember to set the UIScrollView delegate using Control + Drag from UIScrollView to ViewController.

Great guide to UIScrollView (scroll down to “Paging with UIScrollView”).
Apple Documentation with PageControl example.

+8
source

Source: https://habr.com/ru/post/912747/


All Articles