Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <pre><code>NSArray *viewControllers = @[startingViewController]; // &lt;--what does it mean??? </code></pre> </blockquote> <p>Everything is explained in the <code>UIPageViewController</code> documentation, especially <a href="https://developer.apple.com/library/ios/documentation/uikit/reference/UIPageViewControllerClassReferenceClassRef/UIPageViewControllerClassReference.html#//apple_ref/doc/uid/TP40010891-CH1-SW2" rel="nofollow">here in the <code>setViewControllers:direction:animated:completion:</code> method</a>. <strong>See the table that explain every possible case</strong>.</p> <p>In particular, an <code>UIPageViewController</code> presents either one or two View Controllers, depending on if they are one or two-sided. That's why the property is an array, as it expects an <code>NSArray</code> of either one or two ViewController(s) to display.</p> <hr> <p>[EDIT] As you edited your post to add questions on about every line of the code, we can't answer them all in one simple SO answer. There is simply too many concepts here.</p> <p>You will probably need either to get a book about iOS Programming to <strong>explain all the basic concepts here</strong>, or read the "View Controller Programming Guide" documentation on Apple website, and all the other Apple documentation on each concepts, like:</p> <ul> <li>What is a Storyboard (see User Interfaces Programming Guide)</li> <li>What are the concepts of a delegate and a dataSource (see Apple's DevPedia and Design Patters Programming Guide)</li> <li>What are the concepts of subviews and how does the View Hierarchy work in Cocoa (see the "View Programming Guide") and how the coordinate system of views work (like bounds and frames, see same documentation)</li> <li>How does View Controller Containers work (see the View Controller Programming Guide)</li> <li>How do Touch detection and Gestures work (see Touch and Gestures Programming Guide)</li> </ul> <p><strong>That's really a lot to explain and to ask in one SO question, and that's also a lot of questions about some very basics of CocoaTouch and iOS programming, better explained in dedicated tutorial or books and Programming Guides for each subject each!!</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload