How to print Boolean flag in NSLog?

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

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

11条回答
  •  难免孤独
    2020-12-02 04:38

    In Swift, you can simply print a boolean value and it will be displayed as true or false.

    let flag = true
    print(flag) //true
    

提交回复
热议问题