0
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (void)saveContext;
- (NSURL *)applicationDocumentsDirectory;

@end

为什么 iOS 的自动生成的 AppDelegate 仍然声明它的成员是强大的,而我选择不使用 ARC?

4

2 回答 2

1

强大的属性不需要ARC。强是保留的同义词。

于 2013-07-28T01:32:52.297 回答
0

过渡到 ARC 发行说明

// The following declaration is a synonym for: @property(retain) MyClass *myObject;
@property(strong) MyClass *myObject;
于 2013-07-28T01:33:09.907 回答