我正在尝试学习Objective-C。所以我刚刚实现了一个 ProfileViewController,这是我的头文件:
#import <UIKit/UIKit.h>
@interface ProfileViewController : UIViewController
@property (strong, nonatomic) UIScrollView *scrollView;//strong is not colored by XCode
@end
但是我有以下错误,@property
我完全坚持它:
No 'assign', 'retain' or 'copy' attribute is specified - 'assign' is assumed
Default property 'assign' not appropriate for non-gc object
在我的ProfileViewController.m
我有以下警告:Property 'scrollView' needs
setScrollViewneed to be defined
Developer Information:
Version: 4.1 (4B110)
Location: /Developer
Applications:
Xcode: 4.1 (516)
Instruments: 4.1 (4138)
Dashcode: 3.0.2 (336)
SDKs:
Mac OS X:
10,6: (10J567)
10,7: (11A511a)
iPhone OS:
4,3: (8H7)
iPhone Simulator:
4,3: (8H7)