您的位置:首页 > 运维架构

Error解决:Property's synthesized getter follows Cocoa naming convention for returning 'owned'

2016-06-18 01:10 399 查看
在项目中定义了以new开头的textField,结果报错:

先看我的源码
#import <UIKit/UIKit.h>

@interface ResetPasswordViewController : UIViewController
@property (weak, nonatomic) IBOutlet UITextField *phoneTextField;
@property (weak, nonatomic) IBOutlet UITextField *oldPasswordTextField;
<span style="color:#FF0000;">@property (weak, nonatomic) IBOutlet UITextField *newPasswordTextField;</span>
@property (weak, nonatomic) IBOutlet UITextField *confirmPasswordTextField;
@property (weak, nonatomic) IBOutlet UINavigationItem *navigationItem;

@end


解决办法: 

最简单的方法是改我们定义属性的名字,不要以new、copy、alloc等关键词开头!!!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: