Jeff
Jeff

Reputation: 2065

iPhone - Accessing superviews methods?

So essentially I'm inserting "startViewController" into "mainViewController" now of course I can access startViewControllers methods from mainViewController but I was wondering how to do the opposite? Occasionally startViewController will need to call something in mainViewController and I was just wondering how I do this?

Thanks in advance.

Upvotes: 0

Views: 82

Answers (1)

Eiko
Eiko

Reputation: 25632

Add an ivar of your mainViewController to your startViewController and set this when showing the view.

Or you can design a nice clean protocol, and make one view the delegate of the other.

Upvotes: 2

Related Questions