tags:

views:

24

answers:

1

@property (nonatomic, retain)IBOutlate UITextField *userName;

this property is to connect with TextField in IB.

  1. Can we write [userName release] in dealloc to free the memory or it will be handled by IB.

  2. Can i write @property(nonatomic, copy)IBOutlate UITextField *userName;

A: 

The best way to do this is to declare your outlet as assign, rather than retain. This works for anything other than a top-level object (ie, all lower-level views are retained by their superview, so you don't have to worry about it):

@property(nonatomic, assign) IBOutlet UITextField *username;
Ben Gottlieb