• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Load View Controller Nib without pushing it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Load View Controller Nib without pushing it?


  • Subject: Re: Load View Controller Nib without pushing it?
  • From: Dave Carrigan <email@hidden>
  • Date: Tue, 16 Nov 2010 13:34:59 -0800

On Nov 16, 2010, at 1:29 PM, Laurent Daudelin wrote:
> Hello.
>
> I'm stomped by a strange problem. I've been working with a UIViewController subclass and it's been working fine, putting it on screen using "pushViewController:animated:".
>
> Now, I would like to load the view controller and have it perform a method before I put it on screen. However, when I do that, the nib is not loaded even though I'm still using "initWithNibName:bundle:". The view's ivars are not set and it never receives "awakeFromNib".
>
> What's this? Is there any way I can force it to load the nib? In the method I want to execute, there are a few references to nib objects but they are all set to nil after the alloc-initWithNibName:bundle:. I double-checked and the custom view controller receives the initWithNibName:bundle:. Everything works fine as long as I use pushViewController:animated:.

Why don't you just override -viewDidLoad.

--
Dave Carrigan
email@hidden
Seattle, WA, USA

_______________________________________________

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

  • Follow-Ups:
    • problem with right click jump to definition
      • From: Rajendran P <email@hidden>
    • Re: Load View Controller Nib without pushing it?
      • From: Laurent Daudelin <email@hidden>
    • add a icon to window title bar ?
      • From: Rajendran P <email@hidden>
References: 
 >Load View Controller Nib without pushing it? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Load View Controller Nib without pushing it?
  • Next by Date: add a icon to window title bar ?
  • Previous by thread: Load View Controller Nib without pushing it?
  • Next by thread: add a icon to window title bar ?
  • Index(es):
    • Date
    • Thread