본문 바로가기

Dev/Objective-C

NSLog BOOL값 체크 출력

    //BOOLEAN변수
    BOOL bValue1 = YES;
    NSLog(@"bValue1 : %@", (bValue1 ? @"YES" : @"NO")); //output : YES
    //문자열변수
    NSString *bValue2 = @"N";
    NSLog(@"bValue2 : %@", [bValue2 boolValue] ? @"YES" : @"NO"); //output : NO