12月 11 2009

ダブルタップの実装

Posted by dos in iphone, iphone Tips

タップのカウントの取り方を紹介したいと思います。

- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{

UITouch *touch = [touches anyObject];

NSInteger tcnt = [touch tapCount];

if (tcnt == 2) // 二回タップ

{

・・・内容

}

}

・・・たったこれだけなんです。

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>