Objects in interface
- by Peter Kowalchuk
I created my own object, PKSurvey. In the interface of the View Controller I can define a pointer to it, then in a method I can alloc it and have an instance. How do I keep the instance beyond the method where it was allocated? I assign values in one method and want to be able to use those values in other methods. Should I allocate it in the viewDidLoad method or should I do it somewhere else?
@interface DIrectionalDrillerViewController : UIViewController {
PKSurvey *Survey=[PKSurvey new];
----------------
- (void)viewDidLoad {
[Survey new];