Assume all of the following code is written in an implementation file .Could somebody explain the difference between :
#1
@interface ViewController ()
@property (nonatomic) NSDictionary *currentAlbumData;
@end
@implementation ViewController
#2
@interface ViewController () {
NSDictionary *currentAlbumData;
}
@end
@implementation ViewController
#3
@interface ViewController
@end
@implementation ViewController {
NSDictionary *currentAlbumData;
}
- some methods here -
@end
The way I see it, the first one declares a property variable in a class extension. The second one declares an instance variable in a class extension. The third one declares an instance variable that isn't a class extension...what does this imply? How does it compare to simply declaring an ivar in a class extension?