Re: ***UNCHECKED*** How is one supposed to use a UIPageViewController in a storyboard?
Re: ***UNCHECKED*** How is one supposed to use a UIPageViewController in a storyboard?
- Subject: Re: ***UNCHECKED*** How is one supposed to use a UIPageViewController in a storyboard?
- From: Rick Mann <email@hidden>
- Date: Tue, 24 Sep 2013 11:42:45 -0700
What is "***UNCHECKED***"?
On Sep 24, 2013, at 10:38 , Fritz Anderson <email@hidden> wrote:
> On 24 Sep 2013, at 3:03 AM, Rick Mann <email@hidden> wrote:
>
>> UIPageViewController seems very clunky. On the surface, it looks similar to UITableViewController, but in fact, it behaves very differently. There's no view associated with it, nor can you add a view to it (in the storyboard editor).
>
> That is correct. The data source for the page-view controller must feed view controllers to the page controller on demand. The page-view controller does not know, and does not care, what kind of view controller it gets from any one request. You may have different view controllers that go into pages. The design has to allow for this.
> Create XIBs or Storyboard scenes with your page-layout views. That's the best you can do.
I think you're missing what I meant. Of course it's different, in the sense that it provides view controllers instead of views. But it's incredibly cumbersome to use as a first-class citizen in a storyboard. In my case, it's a child of a tab view controller. But there's no way in IB to specify anything about the fixed view hierarchy if you instantiate it in IB (that I can see).
Perhaps you might think to create a UIViewController that you subclass. Okay, now let's put a container view into it, and then embed a UIPageViewController in that.
Well, container views are fairly useless in IB, because there's no outlet for the embedded view in the containing view controller. You'd have to iterate the children to find a UIPageViewController, but what if you have more than one? Cumbersome. And there's no way to wire the dataSource and delegate back to the containing view controller.
I'm having trouble seeing the utility of putting a UIPageViewController in a storyboard for anything but a quick demo app, and then only if you can subclass it (which the docs say you can do in 7 but imply you can't do in 6). Now we're even more like a UITableViewController, except you can't have a view hierarchy in the UIPageViewController.
Cumbersome.
--
Rick
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden