0

I'm working on an IOS app. It has 3 screens(views) that'l appear in a dotted page when the app loads up. What's happening is when the app finishes loading, it'l directly start displaying at screen 1. But i want it to start at screen 2 (center screen). How can i do this? A link towards working example will be a great help.

Thanks

Community
  • 1
  • 1
Sashi
  • 533
  • 3
  • 6
  • 21

1 Answers1

1

If you're using a UIPageControl, set the currentPage = 1. Your UIControlEventValueChanged responder will handle the page change.

UIPageControl *myPageControl = [[UIPageControl alloc] init];
[myPageControl addTarget:self action:@selector(pageChanged:) forState:UIControlEventValueChanged];
[myPageControl setCurrentPage:1];
Ian MacDonald
  • 13,472
  • 2
  • 30
  • 51
  • Thank you Ian. I didn't use UIPageControl, rather i used like, initializing the **Container** and making the index as 1 there, instead as 0, also **returning 1** from **presentationIndexForPageViewController**. Thanks for the help, Now it's working as needed. – Sashi Oct 28 '14 at 21:48