How to print Boolean flag in NSLog?

后端 未结 11 2390
深忆病人
深忆病人 2020-12-02 04:06

Is there a way to print value of Boolean flag in NSLog?

11条回答
  •  一向
    一向 (楼主)
    2020-12-02 04:17

    Note that in Swift, you can just do

    let testBool: Bool = true
    NSLog("testBool = %@", testBool.description)
    

    This will log testBool = true

提交回复
热议问题