Scrolling in a UIScrollView without triggering touchesCancelled

后端 未结 2 2491
独厮守ぢ
独厮守ぢ 2021-02-20 18:27

Overview

I\'m working on an iPhone game whose code I inherited from another developer. The gaming grid is a UIScrollView having a contentSize of 1000x1000. The grid co

2条回答
  •  情书的邮戳
    2021-02-20 19:27

    - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated 
    

    this might do the trick.... any touchesMoved can trigger a method that would scroll with a velocity propotional to the distance between the center of the screen(or anywhere else) and last recorded position of touch until a touchesEnded.

提交回复
热议问题