how to fix xcode warning “Expression result unused”

前端 未结 2 902
感动是毒
感动是毒 2021-01-13 07:01

I am doing a registration process with my app where the user enters in a number that I check against my db.. anyway long story short where I pass code into

2条回答
  •  星月不相逢
    2021-01-13 07:34

    It's because of the parenthesis. By writing (blabla) it becomes an expression, which you are not using as an expressing, hence the compiler complains.

    Change to [NSString stringWithFormat: ...]; and it becomes a method.

提交回复
热议问题