Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top