0
我正在尝试制作一个基于iPhone中的加速计值进行滚动的小球。更改UIImageView中心 - iPhone
此代码不会建:
-(void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration
{
if(difficulty == @"Easy")
{
CGFloat newX = (CGFloat)(ball.frame.origin.x + (CGFloat)acceleration.x);
CGFloat newY = (CGFloat)(ball.frame.origin.y + (CGFloat)acceleration.y);
ball.frame.origin.x = newX;
ball.frame.origin.y = newY;
}
}
它给了我所需要的分配错误的左操作数是左值。
我试过100种不同的东西,每次都失败......这只是最新的失败。
任何人有任何见解?