Setting a flag in compiler for NSLog not to show

后端 未结 7 1670
野趣味
野趣味 2021-01-21 18:55

Is there any particular flag which can be set to not display NSLog output in either debug or release?

Thanks.

7条回答
  •  长发绾君心
    2021-01-21 19:30

    check for Debug mode using this macro

    #ifdef DEBUG
    //NSLog(@"XYZ");
    #endif
    

    Above NSLog will not get printed in Release mode

提交回复
热议问题