how to fix xcode warning “Expression result unused”

前端 未结 2 892
感动是毒
感动是毒 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.

    0 讨论(0)
  • 2021-01-13 07:35

    You can't just do (@"http://188.162.17.44:8777/ICService/?RegCode=%@",code). Use [NSString stringWithFormat:@"http://188.162.17.44:8777/ICService/?RegCode=%@", tempRegCode].

    0 讨论(0)
提交回复
热议问题