6

I created a @property by right-clicking and dragging from ViewController.xib into ViewController.h, but @synthesize is not being automatically created in ViewController.m.

This post said that @synthesize is no longer necessary, but I'm wondering if auto-complete needs @synthesize for it to work correctly.

Q: Do I need to include @synthesize?

Community
  • 1
  • 1
Phillip Senn
  • 46,771
  • 90
  • 257
  • 373

3 Answers3

10

In a word, no. Xcode 4.5 is fully aware of the fact that @synthesize is no longer required. You're good to go without!

WDUK
  • 18,870
  • 3
  • 64
  • 72
  • 2
    @Phillip If my answer was sufficient for your needs, could you please accept it? Thanks – WDUK Nov 03 '12 at 20:49
1

When using ARC @synthesize auto appears. outside ARC you have to add it. Adrian

Adrian P
  • 6,479
  • 4
  • 38
  • 55
1

Yes, you are good to go but make sure you specify it like this: self.textInput.text=@"Hello world" Without the self it is not recognized.