• 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: Two view controllers in one set of files (Noob question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two view controllers in one set of files (Noob question)


  • Subject: Re: Two view controllers in one set of files (Noob question)
  • From: "I. Savant" <email@hidden>
  • Date: Wed, 25 Mar 2009 20:42:43 -0400

On Mar 25, 2009, at 8:26 PM, Peter N Lewis wrote:

At 12:57 -0400 25/3/09, I. Savant wrote:
You can certainly have more than one class declared and implemented
in the same .h/.m files. You can also have multiple controllers within
the same XIB. Wherever your classes are declared/implemented, they
show up as "available" in Interface Builder as individual classes, so
when you instantiate them, they appear as if they were
declared/implemented in different files. IB does not care.

This is not strictly true - the interface for the class must be in a .h file.
Interface Builder does not appear to search implementation (.m, .mm, etc) files.


As I phrased it, it is most definitely true. You missed the part where I said, "... in the same .h/.m files". I'm not speaking of putting everything in a .m (or .mm) file. This raises more issues than it solves, IB's ability to analyze things being one.


But I'm a bit uncertain when you would have two tightly coupled controllers that could not simply be a single controller, so perhaps the OP would like to post the reason why he wants them together (the reason why you are asking a question is often helpful in determining the best answer which is not always the answer to the question posted).

Agreed.

--
I.S.


_______________________________________________

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: 
 >Two view controllers in one set of files (Noob question) (From: Weydson Lima <email@hidden>)
 >Re: Two view controllers in one set of files (Noob question) (From: "I. Savant" <email@hidden>)
 >Re: Two view controllers in one set of files (Noob question) (From: Peter N Lewis <email@hidden>)

  • Prev by Date: Re: Two view controllers in one set of files (Noob question)
  • Next by Date: Re: Implementing a many-to-many ("reflexive") relationship using bindings and an NSTableView
  • Previous by thread: Re: Two view controllers in one set of files (Noob question)
  • Next by thread: Re: Two view controllers in one set of files (Noob question)
  • Index(es):
    • Date
    • Thread