我正在开发xCode游戏,但我遇到了一个问题。
我能够将UIImageView
移动< -------留在iPhone屏幕上,但我希望它一旦开始移动就重复,这样它看起来就会无穷无尽。
让我们说该应用中的一块地板是UIImageView
,如何让UIImageView
在屏幕[x轴]上重复,如该应用中所示。 [不是我的APP]
-(void)whiteFloor{
whiteFloor.center = CGPointMake(whiteFloor.center.x-1);
if(whiteFloor.center.x < 130){
[self placeGround];
}
}
-(void)placeGround {
// Also would I need to make a int?
//what would write here
}
答案 0 :(得分:1)
我确信如果你使用SpriteKit有更好的方法,但如果你不想使用它,你可以一个接一个地使用2个UIImageView来创造无穷无尽的效果。