UITapGestureRecognizer and number of tabs
I add tabgesture to view using
UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)];
[tapRecognizer setNumberOfTapsRequired:1];
[tapRecognizer setDelegate:self];
[holderView a开发者_开发知识库ddGestureRecognizer:tapRecognizer];
[tapRecognizer release];
how to catch the number of tabs and rest the size of the view after to 2 tabs
best regards
You are setting number of taps required to 1, change the line to...
[tapRecognizer setNumberOfTapsRequired:2];
and it will only fire when there is a double tap.
精彩评论