我可以访问这样声明的属性:
@property (nonatomic, assign, getter = isPrivateSickDay) BOOL privateSickDay;
- (BOOL)isPrivateShortDay;
使用以下内容:
int sick = aModel.privateSickDay;
NSLog(@"zero for not sick, one for sick %d", sick);
但是,当我尝试使用该方法时,我的 NSLog 中出现了一个倒置的问号:
BOOL shortness = [aModel isPrivateShortDay];
NSLog(@"shortness: %c", shortness);
所以,我将一些 NSLogs 放入方法本身......
- (BOOL)isPrivateShortDay {
NSLog(@"Shortness called");
NSLog(@"FfDateStatus_ShortWorkingDay_Private: %d",FfDateStatus_ShortWorkingDay_Private);
NSLog(@"_shortnessStatus: %c",self->_shortnessStatus);
return (FfDateStatus_ShortWorkingDay_Private == self->_shortnessStatus);
}
并且_shortnessStatus:
还返回一个倒置的问号。这是什么意思,我该如何解决?