Is it possible to successful animate a moving UIButton?

前端 未结 4 1998
挽巷
挽巷 2020-12-18 13:11

I\'m trying to animate a button which moves around the screen. At any point, the user can push the button. But the button doesn\'t respond to touches. I\'ve tried an animati

4条回答
  •  轮回少年
    2020-12-18 13:54

    This sounds a bit too complicated for UIKit and CoreAnimation. It seems like you're developing something like a game. Why not use a global animation timer for let's say ~60 fps and do your drawing in Quartz2D? Then for each touch you could quickly check any hits between Quartz refreshes.

提交回复
热议问题