Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
608 views
in Technique[技术] by (71.8m points)

objective c - UIPageViewController - how Can I jump to a particular page number?

I have spent almost 8 hours finding out how to jump to a particular page number in UIPageViewController... below is what my project looks like

I want to make an app which looks like Ibooks---

I have taken the help from the code presented here - http://www.ioslearner.com/tag/uipageviewcontroller-sample-code/

I have made a plist and UITableView , I select the value from TableView and display the same on webView placed on UIPAgeiewController, but the problem is that only the page in web view changes and not the actual page number of the UIPageViewController....

If I narrow down my question it would look like --- is there a way to switch between page numbers in UIPageViewController.... ???

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You have to instantiate the view controller(s) that manage the page(s) you want to jump to and then call the page view controller's setViewControllers:direction:animated:completion: method, passing the new view controller(s).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...