当我检查 nslog 中的数字值时,它显示“0”
NSMutableDictionary *data = [[NSMutableDictionary alloc] initWithContentsOfFile: path];
NSNumber *number=[data objectForKey:@"serial"];
NSLog(@"%@",number);
if(number ==0 )
{
imgButton.hidden=YES;
}
但是条件总是失败,我也像这样更改了代码
NSString *number=[data objectForKey:@"serial"]
NSLog(@"%@",number);
if(number == @"0" )
{
imgButton.hidden=YES;
}
但是这里的条件也失败了,这是什么问题?