开发者

How to change touch position when passing a UITouch object?

开发者 https://www.devze.com 2023-03-10 08:56 出处:网络
- (void)tou开发者_运维知识库chesBegan:(NSSet *)touches withEvent:(UIEvent *)event { if(touchDelegate_)
- (void)tou开发者_运维知识库chesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
  if(touchDelegate_)
  {

    // before passing the event, I want to scale touch position by 2, how can i do it?

    // that is, if touch position is (5, 5), I want touchDelegate_ see it as (10, 10)        

    [touchDelegate_ touchesBegan:touches withEvent:event];

  }
}


It's not possible. UITouch is a readonly object. There is no public API that allows you to manipulate it at the moment.

0

精彩评论

暂无评论...
验证码 换一张
取 消