IBOutlets deallocated after modal view controller
I have a couple of IBOutlets in my ViewController class, declared like this:
@property (nonatomic, retain) IBOutlet UILabel* labelHostStatus; @property (nonatomic, retain) IBOutlet UIButton* connectButton; @property (nonatomic, retain) IBOutlet UITextField* fieldAddress; @property (nonatomic, retain) IBOutlet UITextField* fieldPort;
(and of course @synthesize'd)
Everything is working great, and I can access the IBOutlets in code, and get/set texts and stuff.
At some point I decide to present a modal view controller, which goes OK. However, after dismissing the modal view controller and coming back to the main controller, I can't seem to access the above mentioned outlets anymore. I get excepctions and crashes when trying to do so:
2013-05-13 22:39:47.359 [7267:c07] -[__NSCFString text]: unrecognized selector sent to instance 0x885aa30
Whats wrong? :(
Oh my, nevermind. Just figured I've released the parent view in the modal view controller class after it's been dismissed. D'oh!