• 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: Loading a view controller from a tab bar controller
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Loading a view controller from a tab bar controller


  • Subject: Re: Loading a view controller from a tab bar controller
  • From: Jonathan Hess <email@hidden>
  • Date: Thu, 2 Apr 2009 19:08:19 -0700

Are you saying that you want to load the view controller's view from a separate NIB/XIB? If so, you can use the inspector for that view controller to set the NIB Name property to the name of an XIB file in your project. In that XIB file, the file's owner's class should be set to your view controller subclass, and the view outlet of file's owner should be connected to a view in that XIB file.

When your project is built both XIB files will be compiled in to NIB files, and when the view controller in the first NIB with it's NIB name set is loaded, it will in load the specified second NIB, and get it's view from there.

Jon Hess

On Apr 2, 2009, at 4:03 PM, Weydson Lima wrote:

Hello there,

Another noob question that I couldn't find a solution yet. In my mainwindow xib file, I have a tab bar controller which has two different view controllers. However, when I create those view controllers, how can I set the view property to a view controller instead of just a view? IB doesn't let me to drag the view property of the File Owner to a view controller. Instead, it only lets me to drag it to a UIView.
But that doesn't accomplish what I want - which is to load a ViewController.


Any ideas?
_______________________________________________

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

_______________________________________________

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


References: 
 >Loading a view controller from a tab bar controller (From: Weydson Lima <email@hidden>)

  • Prev by Date: Re: Toll-free bridge type at runtime
  • Next by Date: Re: Toll-free bridge type at runtime
  • Previous by thread: Loading a view controller from a tab bar controller
  • Next by thread: Linking the "document edited" flag to the Undo menu item state
  • Index(es):
    • Date
    • Thread