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?

4

1 回答 1

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.

于 2012-06-06T04:45:38.257 回答