4

I'm using a UIPageViewController to show two views, but I'm not getting dots at the bottom.

Here's the code I'm using:

- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController
{ 
    if(viewController == oneViewController) {
        self.navigationController.navigationItem.title=@"Options";
        return twoViewController;
    }
    else
    {
        self.navigationController.navigationItem.title=@"All Schedule";
        return oneViewController;
    }
} 

- (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController
{
    return 2;
}
John Parker
  • 54,048
  • 11
  • 129
  • 129
lokesh sagiraju
  • 71
  • 1
  • 1
  • 3
  • Actually i read,but iam nt getting please give exact method to show dots like(page control).Thanks in advance.. – lokesh sagiraju Aug 09 '13 at 10:40
  • You need to update your question with the code you've tried so far. (We're not here to do all the work - you need to have at least attempted to solve this yourself after reading the relevant documentation.) – John Parker Aug 09 '13 at 10:45
  • 1
    - (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { if(viewController == oneViewController) { self.navigationController.navigationItem.title=@"Options"; return twoViewController; } else { self.navigationController.navigationItem.title=@"All Schedule"; return oneViewController; } } and - (NSInteger)presentationCountForPageViewController:(UIPageViewController *)pageViewController { return 2; } – lokesh sagiraju Aug 09 '13 at 10:49
  • you need to used **PageControl** simply drag it to xib and make outlet and used it. If you haved used it from xib then see pageControlproperty and set number of pages here.. – Jitendra Aug 09 '13 at 12:11

1 Answers1

9

You can do it using just a UIPageViewController, but it will only appear when you set the transition style to UIPageViewControllerTransitionStyleScroll

Check out: this SO answer here

Community
  • 1
  • 1
user1459524
  • 3,613
  • 4
  • 19
  • 28