在我的应用程序中,我想在红色矩形内移动对象(使用下面的代码通过触摸)如何做到这一点
代码 :
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:[touch view]];
if (insidethepaddle) {
object1.center = CGPointMake(location.x, location.y - 50);
}
在我的应用程序中,我想在红色矩形内移动对象(使用下面的代码通过触摸)如何做到这一点
代码 :
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:[touch view]];
if (insidethepaddle) {
object1.center = CGPointMake(location.x, location.y - 50);
}