2010-09-17 38 views
0

我使用蘋果開發人員示例中名爲coredatabooks的項目。關於核心數據的簡單問題

 
#import 

@interface Book : NSManagedObject 
{ 
} 

@property (nonatomic, retain) NSNumber *active; 
@property (nonatomic, retain) NSString *title; 
@property (nonatomic, retain) NSString *author; 
@property (nonatomic, retain) NSDate *copyright; 

@end 

我需要使用一個布爾對象,但我不知道如何實現它在我的課。我現在使用的NSNumber,使用整數(0,1),但不是布爾...也許這將是更正確的使用此...

@property(nonatomic,retain)bool active;

但無法正常工作。

回答