Tips and Tricks in iPhone Development

How to clear xCode compiled cache?

To clear cache of compiled code goto,

Build -> Clean All Targets

That's all.

Assigning Variables

self.textField = [[UITextField alloc] int];

Do you think this is a good practice. It looks simple, but there is a hidden danger. After this step what is the retain counter for Text Field, that you have just created? Did you say it is one. No it is two already. Because it is retained by the setTextField property method and alloc method when it is created.

Correct it like this,

UITextField textField = [[UITextField alloc] int];
self.textField = textField;
[textField release];

Or assuming that you have textField_ variable as the name of the instance varibale,

textField_ = [[UITextField alloc] int];