SWIPING PAGES USING UIPAGEVIEWCONTROLLER

naomi burke

Total Post:28

Points:196
Posted by  naomi burke
 738  View(s)
Ratings:
Rate this:

I have creating an app using page view in iPhone, in this app we swiping pages like iPhone or other smartphone devices shows its main menu, and also I have created successfully and enabling transition style as Scroll on page view controller, after that its looking like this..

but here is an issue in my app, I am unable to show dots for each view on the bottom and I can't resolve this problem.
can any one who help me to solve my problem.

  1. Tarun Kumar

    Post:214

    Points:1642
    Re: Swiping pages using UIPageViewController

    Your problem is not an issue because to display dots of page views needs to implement two more methods of UIPageViewController in your code:
    these are the two methods:

    -(NSInteger) presentationCountForPageViewController:(UIPageViewController *)pageViewController{
      return 3;
    }
    //above method is responsible for displaying number of dots to be displayed

     

    -(NSInteger) presentationIndexForPageViewController:(UIPageViewController *)pageViewController{
      return 0;
    }
    // above method returns index of initial selected dot

    after using both method on your screen displaying 3 dots on screen,
    I think this is sufficient solution for your problem.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!