1

In the following code:

       @interface UnitConverterViewController : UIViewController {
          UITextField     *tempText;
       }
       @property (strong, nonatomic) IBOutlet UILabel *resultLabel;
       @end

I've seen the same result achieved with out having

       {
          UITextField     *tempText;
       }

So, is this really necessary?

William Sham
  • 12,849
  • 11
  • 50
  • 67
  • possible duplicate of [Do I still need to declare the instance variable if I am using @property?](http://stackoverflow.com/questions/8459987/do-i-still-need-to-declare-the-instance-variable-if-i-am-using-property) – Brad Larson Dec 15 '11 at 17:08

1 Answers1

4

No it's not necessary as of Objective-c 2.0.

see: Do declared properties require a corresponding instance variable?

Community
  • 1
  • 1
SundayMonday
  • 19,147
  • 29
  • 100
  • 154