在閱讀了一些在線教程之後,我看到了2種不同的聲明屬性的方法。 我想知道如果一個比另一個更正確:ios AppDelegate屬性聲明
選項1:
#import <UIKit/UIKit.h>
@interface AppDelegate : NSObject
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UITabBarController *mytabs;
@end
選項2:
#import <UIKit/UIKit.h>
@interface AppDelegate : NSObject {
UIWindow *window;
UITabBarController *mytabs;
}
@property (nonatomic, retain) UIWindow *window;
@property (nonatomic, retain) UITabBarController *mytabs;
@end