Hi, I was following a tutorial on developing a simple application involving Buttons and a text field in Cocoa. The original tutorial is here: http://www.informit.com/articles/article.aspx?p=336259.
After completing this tutorial I attempted to convert my simple Cocoa application over to an iPhone application. However, the problem that I am having is that the class and its related instance that I created in InterfaceBuilder (with my new class named Engine being a subclass of NSObject) is being dealloc-ed immediately after it is created.
I saw that someone had a similar problem here:
http://stackoverflow.com/questions/2612484/object-created-in-interface-builder-getting-dealloced-too-soon, but since I created both the class and instance in Interface Builder, I don't see any place to add an assign property.
I have added the fields and actions directly to my View class with success. But, I was hoping to follow the same model as my Cocoa application, and create my Engine class in Interface Builder.
To summarize, if I create an instance of a class in Interface Builder for an iPhone Application, how do I prevent it from being dealloc-ed before it receives its Actions?
Thanks,
James
After completing this tutorial I attempted to convert my simple Cocoa application over to an iPhone application. However, the problem that I am having is that the class and its related instance that I created in InterfaceBuilder (with my new class named Engine being a subclass of NSObject) is being dealloc-ed immediately after it is created.
I saw that someone had a similar problem here:
http://stackoverflow.com/questions/2612484/object-created-in-interface-builder-getting-dealloced-too-soon, but since I created both the class and instance in Interface Builder, I don't see any place to add an assign property.
I have added the fields and actions directly to my View class with success. But, I was hoping to follow the same model as my Cocoa application, and create my Engine class in Interface Builder.
To summarize, if I create an instance of a class in Interface Builder for an iPhone Application, how do I prevent it from being dealloc-ed before it receives its Actions?
Thanks,
James