Reputation: 6068
When using storyboard, I usually set the Custom Class in Identity Inspector to be the class of my views and view controllers. This time, I created a base class that inherits from UIPageViewController
(PageViewController
) and then two other classes (ProfilePageViewController
, and ContextPageViewController
) that in turn inherit from PageViewController
.
The idea is for PageViewController
to extend the functionality of UIPageViewController
by providing mechanisms that will be common to both ProfilePageViewController
and ContextPageViewController
. So far so good.
Then I drag a couple of view controllers to the interface builder and set the classes I wrote before as Custom Class (again, that's ProfilePageViewController
, and ContextPageViewController
).
If I had used a UIPageViewController
from scratch instead, the Properties Inspector would look something like this:
But it doesn't.
One other thing. I know that if I drag a UIPageViewController
and then change the custom class, this will show properly. However, both ProfilePageViewController
and ContextPageViewController
are inside Container Views, which pretty much means that Xcode generated them automatically. That is:
UIViewController
s automaticallyUIPageViewController
.What the attributes inspector shows, instead, is just the properties for view controllers:
How can I make these properties show?
Upvotes: 0
Views: 1074
Reputation: 6068
I spent quite some time and effort trying to do this, and it turns out that it's quite simple.
Xcode will automatically replace the controller that it generated automatically. You can delete that.
Upvotes: 4