i am facing problem, i don't know how to achieve this give me any solution.
UIView ----UIScrollview ------Imageview (minimum 10)
Every Imageview added into scrollview, and every ImageView contains UITapgesture recongizer.Tapgesture used to take the image and show into Nextviewcontroller as enlarged.
Here i am facing problem, when i scrolling the UIScrollview i want to stop scrolling right over there by touching inside or somewhere of scrollview.If i touch anywhere, its going next page.
In the page, if the UIScrollview is scrolling (without the user currently touching the screen) and then the user taps the screen, the screen should stop but no Imageview should be enlarged. Currently the screen stops, but the clicked picture is being enlarged.
Code so far...
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(singleTapAction:)];
singleTap.numberOfTapsRequired = 1;
singleTap.delegate = self;
singleTap.cancelsTouchesInView = NO;
hypeScroll.canCancelContentTouches = NO;
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
//return YES;
// if (gestureRecognizer.view.superview.tag == hypeScroll.tag) {
// return NO;
// }
return YES;
}
Give me solution, i have stuck in long time,
thanks in advance
UICollectionView
to achieve this kind of stuff!! - Ketan Parmar