[英]how to make a UIImageView tappable while it is animating across the screen
[英]How to make a UIImageView repeat forever across the screen [x-axis]
我正在xCode上開發游戲,但遇到了問題。 我能夠使UIImageView
在iPhone屏幕上向左移動<-------,但是我希望它在開始移動后立即重復,因此它看起來很長。
可以說該應用程序中的一塊地板是UIImageView
,我如何才能使該UIImageView
在該應用程序中所示的屏幕[x軸]上重復顯示。 [不是我的應用]
-(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
}
我敢肯定,如果您使用SpriteKit,有更好的方法,但是如果您不想使用它,則可以一個接一個地使用2個UIImageView來創建無盡的效果。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.