我是Objective-C的全新手,所以请耐心等待:-)。我正在为我想要存储在NSMutableArray
中的记录结构定义一个类。代码如下:
@interface CustSuppListItem : NSObject
{
NSString *acCode;
NSString *acCompany;
NSString *acContact;
double osBalBase;
int acAccStatus;
}
@property (nonatomic, copy, readwrite) NSString *acCode;
@property (nonatomic, copy, readwrite) NSString *acCompany;
@property (nonatomic, copy, readwrite) NSString *acContact;
@property (nonatomic, assign, readwrite) double osBalBase;
@property (nonatomic, assign, readwrite) int acAccStatus;
@end
@implementation CustSuppListItem
@synthesize acCode, acCompany, acContact, osBalBase, acAccStatus;
@end
在我的项目中使用类时,setter方法出现在Intellisense中,而acAccStatus
属性除了似乎没有给出setter方法。然而,我可以使用点符号看到它:object.acAccStatus
。
是否有一些关于int属性的特殊内容意味着它们没有给出getter / setter方法?或者我错误地定义了属性?