objective-c - IOS BOOl的默认值真机和模拟不一样,模拟器为:NO,真机为:YES?
ringa_lee
ringa_lee 2017-04-25 09:04:15
0
1
716

例如我声明一个局部变量,BOOL isTrue;
if(isTrue){

NSLog(@"为真");

}else{

NSLog(@"不为真");

}

结果输出:不为真

还有:我声明变量:int i;
NSLog(@"%i",i);

结果输出:1

请问这是什么情况!

ringa_lee
ringa_lee

ringa_lee

reply all(1)
淡淡烟草味

It’s not initialized yet

BOOL isTrue = YES;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template