0

I'm developing an iPhone app.

All the iPhone development books I have read use nonatomic property.
And IBOutlets which xcode generates also use nonatomic keyword.

But I don't like to write nonatomic on every property because it decrease readability too much.

Are there any problem if I do not use nonatomic keyword for all properties?

If nonatomic keyword makes my app only a little bit faster, I want to delete all nonatomic keywords.
Is it good idea?

js_
  • 4,295
  • 5
  • 41
  • 61
  • if you dont use nonatomic and synthesize you can not call that variable in another class.... so it is better to use, not for all but for some. – TheTiger Jun 06 '12 at 05:01
  • 1
    http://stackoverflow.com/questions/588866/atomic-vs-nonatomic-properties http://stackoverflow.com/questions/821692/what-does-the-property-nonatomic-mean Info on what nonatomic actually means. – borrrden Jun 06 '12 at 05:14

1 Answers1

2

If you delete nonatomic from property then by default all your properties will be 'atomic'. If there are a lot of 'atomic' properties without purpose then it will slow up your app, because at compile time atomic properties generate a complex code and every time you use that property that code will be executed.

epologee
  • 10,851
  • 9
  • 64
  • 102
rishi
  • 11,482
  • 4
  • 38
  • 58