I have a MainController, it creates an object(say polygon), a controller(say,polygonViewController). PolygonViewController has two outlets:
IBOutlet Polygon* aPolygon;
IBOutlet UILabel* numOfSidesLabel;
it mediates Polygon and PolygonViewController.xib file.
How do I make sure the PolygonViewController's aPolygon is the same(instance) as polygon created in mainController?
I tried to add @property Polygon* aPolygon;
to PolygonViewController then in MainController I did polygonViewController.aPolygon = polygon;
However, aPolygon in PolygonViewController awakeFromNib method is always null.
Have you tried to use a singleton object?
You can make your aPolygon class to be a singleton object so, you will be always working with the same object in as many viewControllers as you want to use it.
Hope this will help you!
Cheers,
VFN