我将数据保存在外部类文件中,但在将 Bool 值保存为参数时出现错误。下面是源代码 .savefile.h
-(void) saveDecreasedActivity:(NSInteger) bathing
meal:(NSInteger) meal withTitle:(NSString *)title independentItem:(BOOL)timeItem;
{
NSMutableDictionary *lDataObj = [[NSMutableDictionary alloc] init];
[lDataDict setValue:lSeqCounter forKey:@"seqCounter"];
[lDataObj setValue:timeItem forKey:@"independentItem"];
}
我已经将数据保存在其他类中
[saver saveDecreasedActivity:[self.bathingControl selectedSegmentIndex]
meal:[self.mealControl selectedSegmentIndex] withTitle:lTitle independentItem:YES];
它正在显示
timeItem is incompatible integer to pointer conversion sending "BOOL" (aka singned char) to parameter of type id
提前致谢