Objective-C声明类属性

时间:2012-02-26 19:50:29

标签: objective-c properties int setter

我是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方法?或者我错误地定义了属性?

0 个答案:

没有答案