Autoscrolling in a UIScrollview

前端 未结 3 806
借酒劲吻你
借酒劲吻你 2021-01-27 19:42

I have been only using Xcode 5 for a little while now and I need help when it comes to auto scrolling a UIScrollView. I am using a single view application. I need t

3条回答
  •  执笔经年
    2021-01-27 20:19

    OK, just adding this from your duplicate question.

    I suspect the Piano Tiles game is actually using something like Sprite Kit.

    This allows a lot more control over thing like "scrolling" speed.

    Instead of using a UIScrollView you would use an SKNode as a layer with the buttons added to that parent layer.

    Then using the update game loop you can incrementally increase the speed of the movement based on the time since the game started.

    In essence... don't use UIScrollView, don't use UIKit, use SpriteKit.

提交回复
热议问题