Xcode中的EXC_ARITHMETIC错误

Jud*_*phy 0 iphone

if (([gameplay1.text intValue] % [gameplay3.text intValue]) == 0)
{
    //Do something
}
Run Code Online (Sandbox Code Playgroud)

有人可以帮我解决这个问题吗?

小智 7

你几乎没有提供任何信息,但在我看来

[gameplay3.text intValue]
Run Code Online (Sandbox Code Playgroud)

返回0.您不能除以零,因此错误.