• 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
Parent/child view controllers: when shall we use it?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parent/child view controllers: when shall we use it?


  • Subject: Parent/child view controllers: when shall we use it?
  • From: Colas B <email@hidden>
  • Date: Thu, 30 Apr 2015 20:54:20 +0000 (UTC)

Dear cocoa-dev,
When building a simple UIViewController, do I have to use addChildViewController: if this VC "owns" other VCs?(By simple VC, I mean I am not creating MyCustomNavigationController or something like that; just a "plain old" VC)
Imagine for example that I build a view controller (MyCustomVC) and its view has a small subview (fbView) for a Facebook logo and a counter. This "facebook view" is attached to a view controller (FacebookVC) that is called when fbView is touched. So, the FacebookVC definitely needs to be a @property of the MyCustomVC.In this situation, should I really use addChildViewController: and all the mechanism to declare FacebookVC to be a childController of MyCustomVC? 
My belief is that: NO, in this situation it is not to be use. IMHO, MyCustomVC is NOT a container view controller and the usage of child/parent mechanism is only for UINavigationController, TabBar, ... or if I want to create such a "general" class.
So, am I wrong or am I right ?
Thanks ;-)Colas 
_______________________________________________

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:
    • Re: Parent/child view controllers: when shall we use it?
      • From: Roland King <email@hidden>
  • Prev by Date: Re: Yet more new information. Was: Re: Weird UITableView problem
  • Next by Date: Re: Spinning the busy indicator
  • Previous by thread: Re: Issues with implementing WYWIWYG font menu
  • Next by thread: Re: Parent/child view controllers: when shall we use it?
  • Index(es):
    • Date
    • Thread