1如何将布尔值转为OC对象?
1把 BOOL 值包装到 NSNumber中:
NSNumber *boolNumber = [NSNumber numberWithBool:YES]
2获取BOOL值:
BOOL b = [boolNumber boolValue];
2023-10-04 18:11:04
1如何将布尔值转为OC对象?
1把 BOOL 值包装到 NSNumber中:
NSNumber *boolNumber = [NSNumber numberWithBool:YES]
2获取BOOL值:
BOOL b = [boolNumber boolValue];