Link a programmatic instantiation of class x in class y to a view controller of class x

Posted by Joel Derfner on Stack Overflow See other posts from Stack Overflow or by Joel Derfner
Published on 2012-12-06T22:49:08Z Indexed on 2012/12/06 23:03 UTC
Read the original article Hit count: 144

Filed under:
|

I have classes Compose and Haiku, each connected to a view controller in IB. Haiku is instantiated in Compose as ghhaiku. Haiku has an array, self.arrayOfHaiku, with 117 members. But in Compose, self.ghhaiku.arrayOfHaiku has no members.

I think the problem is that I haven't linked the instance of Haiku that has the 117-member array with the instance of Haiku created in Compose. But how do I do that?

(I could of course be totally wrong and the problem could be something else, but that seems to make intuitive sense.)

Any thoughts?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about ios