UINavigationController subclass won't load its nib.

2013-10-11 Thread Half Activist
Hi,

To put it shortly, my UINavigationController doesn't load its assigned 
NIB at all.

I've got an UINavigationController subclass that contains the code for 
an object inspector in an app i'm writing.
It's declared as the file's owner of a nib of the same name, this nib 
helps me build the ui of the various subviews pushed as details of some 
parameter, selected on a root table view. (ie a somewhat classical way for an 
inspector on ios).
Now, I instantiate my view controller with:

[ [ MyNavController alloc ] initWithNibName: @MyNavController bundle: 
nil ];

And display it in a popover. 

The popover remains empty.
loadView is called but it doesnt not contain the root view assigned in 
IB.
None of my outlets are populated, I overloaded some setters, they 
aren't called at all.
All other objects aren't instantiated by the way...
...Therefore I guess the NIB isn't even loaded!

To rule out a potential resource loading error, I wrote a nib loading 
method of mine using UINib.
And it works, the NIB is correct, everything is correct. Except that 
UINavigationController doesn't want to load its assigned NIB.

Regards.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: UINavigationController subclass won't load its nib.

2013-10-11 Thread David Duncan
I think your approach is wrong. It doesn’t sound like you have a specialized 
navigation controller, but rather a navigation controller that has a 
specialized UI. The way to approach that problem is to load a UIViewController 
subclass with that logic in it, and create a UINavigationController with that 
custom view controller as its root view controller.

If you have further specialized logic that needs to know about both the 
navigation controller and its view controllers, then you can create an 
additional class to manage that work, but you almost certainly don’t want it to 
be a navigation controller subclass.

On Oct 11, 2013, at 2:12 AM, Half Activist halfactiv...@gmail.com wrote:

 Hi,
 
   To put it shortly, my UINavigationController doesn't load its assigned 
 NIB at all.
 
   I've got an UINavigationController subclass that contains the code for 
 an object inspector in an app i'm writing.
   It's declared as the file's owner of a nib of the same name, this nib 
 helps me build the ui of the various subviews pushed as details of some 
 parameter, selected on a root table view. (ie a somewhat classical way for an 
 inspector on ios).
   Now, I instantiate my view controller with:
   
   [ [ MyNavController alloc ] initWithNibName: @MyNavController bundle: 
 nil ];
   
   And display it in a popover. 
   
   The popover remains empty.
   loadView is called but it doesnt not contain the root view assigned in 
 IB.
   None of my outlets are populated, I overloaded some setters, they 
 aren't called at all.
   All other objects aren't instantiated by the way...
   ...Therefore I guess the NIB isn't even loaded!
 
   To rule out a potential resource loading error, I wrote a nib loading 
 method of mine using UINib.
   And it works, the NIB is correct, everything is correct. Except that 
 UINavigationController doesn't want to load its assigned NIB.
   
 Regards.
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com
 
 This email sent to david.dun...@apple.com

--
David Duncan


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com