17
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iPhone 6 Plusでは高速スワイプが2点タップと誤認される事がある

Last updated at Posted at 2014-11-05

・・・かもしれない、というお話。

自作のおえかきアプリをiPhone 6 Plusで動作確認している最中、どうも「1本指でスワイプしているだけなのに2点タップ時の機能(=スクロール)が発動してしまう」・・・という現象を何度か目撃していたのですが、気のせいではないようなので、ちょこっと検証してみた結果を報告いたします。

検証方法

シングルビュープロジェクトで新規作成、ビューをマルチタッチにして、touchesBeganでは赤、touchesEndedでは青の四角を画面に出してみます。またログにも座標やタッチイベントの情報を出力します。

これをiPhone実機にて実行し、一筆書きのように高速に画面をスワイプしまくります。

  • Xcode 6.1
  • iPhone 6 Plus
  • iOS 8.1
検証用のコード
# import "ViewController.h"

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor yellowColor];
    self.view.multipleTouchEnabled = YES;
}


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    [self touches:touches color:[UIColor redColor] text:@"touchesBegan"];
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
    [self touches:touches color:[UIColor blueColor] text:@"touchesEnded"];
}

- (void)touches:(NSSet *)touches color:(UIColor *)color text:(NSString *)text {
    for (UITouch *t in touches) {
        UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 6, 6)];
        v.center = [t locationInView:self.view];
        v.backgroundColor = color;
        v.userInteractionEnabled = NO;
        [self.view addSubview:v];
        NSLog(@"%@ %p %@", text, t, NSStringFromCGPoint([t locationInView:self.view]));
    }
}

@end

結果

swipe.png

本来であれば赤と青が一つずつのはずなのですが、いくつか余計なイベントが検出されています。

このスクショとは関係ないタイミングで記録したログですが、

2014-11-05 11:07:20.588 TouchTest6[13234:1541357] touchesBegan 0x170180d00 {96, 231.33332824707031}
2014-11-05 11:08:06.349 TouchTest6[13234:1541357] touchesBegan 0x170181c70 {100, 563.33331298828125}
2014-11-05 11:08:06.350 TouchTest6[13234:1541357] touchesEnded 0x170180d00 {184.33332824707031, 344.66665649414062}
2014-11-05 11:08:07.712 TouchTest6[13234:1541357] touchesBegan 0x174181040 {232, 291.33334350585938}
2014-11-05 11:08:07.713 TouchTest6[13234:1541357] touchesEnded 0x170181c70 {221.33332824707031, 308.66665649414062}
2014-11-05 11:08:26.130 TouchTest6[13234:1541357] touchesEnded 0x174181040 {323, 229.33332824707031}

beganが二回連続で検出されている事がわかります。
スワイプしているだけで2点タップになってしまっています。

補足情報

  • 検証に使用した私物のiPhone 6 Plusには格安保護フィルムが貼ってあるため、その影響が無いとは言いきれません(うまく貼れたので剥がしたくはない・・・)。
  • iPhone 6 Plusですが、初期不良で一度交換しています。交換前の機種でも同様の症状が見られたため、個体差や不良の可能性は低いと考えています(ただ、格安保護フィルムは同じ物を貼っていたのでそちらの影響の可能性が逆に上がってしまうのかな(^_^;)
  • 一応駄目元でAppleへはバグレポートを提出済みです。
  • keynoteなどの純正アプリでも、1本高速スワイプで2点タップ時の機能が発動する事があることを確認しています。

どうしよう?

今のところこの件が話題になっているような情報は見つけていませんが、もし同様の症状に遭われた方、その他情報をお持ちの方がいらっしゃいましたらコメントなど頂ければ幸いです。

17
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
17
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?