0
私はユーザーがキャンバスに指の署名を描くことを可能にするアプリケーションを開発しました。 この機能は、UIPanGestureRecognizerを使用して特定のターゲットアクションを使用してUIViewに線を描画して実装されますが、「ボイスオーバー」がアクティブなときにジェスチャ認識器の動作はそれ以上トリガされません。ボイスオーバーを有効にしたジェスチャー認識器
ジェスチャーは、アクティブな「ボイス・オーバ」とジェスチャーを使用してビューに線を描画するためにどのような方法があり、コード
UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(pan:)];
pan.maximumNumberOfTouches = pan.minimumNumberOfTouches = 1;
[self addGestureRecognizer:pan];
ジェスチャーアクションコード
- (void)pan:(UIPanGestureRecognizer *)pan {
CGPoint currentPoint = [pan locationInView:self];
CGPoint midPoint = midpoint(previousPoint, currentPoint);
if (pan.state == UIGestureRecognizerStateBegan)
{
[path moveToPoint:currentPoint];
}
else if (pan.state == UIGestureRecognizerStateChanged)
{
[path addQuadCurveToPoint:midPoint controlPoint:previousPoint];
}
previousPoint = currentPoint;
[self setNeedsDisplay];
}
を初期化?
ありがとうございました!
http://stackoverflow.com/questions/33709260/swipe-gesture-recogniser-using-voiceoverで答えをチェック – spassas