Loading UINavigationController subclass from a Nib
Posted
by
Rits
on Stack Overflow
See other posts from Stack Overflow
or by Rits
Published on 2011-01-03T17:49:39Z
Indexed on
2011/01/03
17:53 UTC
Read the original article
Hit count: 220
My situation is as follows: My class SettingsViewController
is a subclass of UINavigationController
. That class contains the logic of its rootViewController
. For example, it acts as the delegate and data source for two table views in that root view controller.
I have no problem setting this up programmatically. In the initializer of SettingsViewController
, I can create an additional UIViewController
to serve as the root view controller, position the table views in its view, and set their delegates and data sources to self
.
But I want to load that root view via a Nib. The problem is, I do not know how to connect that Nib with my SettingsViewController
, how to set the delegates and data sources. The SettingsViewController
is not accessible from within the Nib. 'File Owner' represents the root view controller, not the SettingsViewController
.
How do I access my UINavigationController subclass from within my root view controllers Nib?
Thanks in advance.
© Stack Overflow or respective owner