To create public instance variables in the .h add a line @public and enter all public fields afterwards.
@public
NSString *str;
But why we use public instance variables in classes?
You are correct, it's best not to. It's better to create an @property and create getters and setters for a private instance variable.
I just posted as a reminder to myself how to create public instance methods and just happened to use a variable.
But why we use public instance variables in classes?
Thanks felixk......dont mind ya.....its my doubt...