bohanl
bohanl

Reputation: 1925

UIScrollView - thumbnail view of UIView

In a UIViewController, I have a UIScrollView that takes half of the screen. This UIScrollView contains a collection of UIView.

In this UIViewController, I registered a UISwipeGestureRecognizer which works fine. However, I don't want the UIScrollView to be able to recognize the swipe, is there a way to do this? For example, if I swipe within any location in this UIViewController but not within the UIScrollView which is embedded within it, it should recognize the swipe.

Upvotes: 0

Views: 137

Answers (2)

Parvez Belim
Parvez Belim

Reputation: 1013

Try using this line if it works :

[self.view setExclusiveTouch:YES];

Upvotes: 0

Saurabh Passolia
Saurabh Passolia

Reputation: 8109

subclass UIScrollview say "MyScrollView" and override touchesBegin,Moved and Ended methods and leave them empty.

use MyScrollView as the class for your scrollview.

Upvotes: 1

Related Questions