I’m currently using the iOS 5 SDK trying to develop my app. I’m trying to make an NSString a property, and then to synthesize it in the .m file...
Can someone explain to me in detail when I must use each attribute: nonatomic, copy, strong, weak, and so on, for a declared property, and explain what each does?...
What’s the exact reason for using dispatch_once in the shared instance accessor of a singleton under ARC? + (MyClass *)sharedInstance { // Static local predicate must be initialized to...
Is it possible to have blocks as properties using the standard property syntax? Are there any changes for ARC? 8 Answers 8
There are two new memory management attributes for properties introduced by ARC, strong and weak. Apart from copy, which is obviously something completely different, are there any differences between...
In WWDC 2014 session 403 Intermediate Swift and transcript, there was the following slide The speaker said in that case, if we don’t use [unowned self] there, it will...
I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) be strong or weak? The following: @property (nonatomic, weak) IBOutlet UIButton *button; Would get...
I’m getting the following warning by the ARC compiler: "performSelector may cause a leak because its selector is unknown". Here’s what I’m doing: [_controller performSelector:NSSelectorFromString(@"someMethod")]; Why do I get...
I am using ARC successfully in my project. However, I have encountered a few files (e.g., in unit tests and mock objects) where the rules of ARC are a...