1. 程式人生 > >iOS:“warning:comparison between pointer and integer”

iOS:“warning:comparison between pointer and integer”

  if (num == 0) { //提示 Comparison between pointer and integer ('id _Nullable' and 'int')
    轉換下就好了
 if ([num intValue] == 0) {