Disable *some* gestures in a UIScrollView?


i'm looking input here, what's best way go this.

have slideshow controller, bunch of uiimageviews along uiscrollview.

can scroll right , left using swipes when single tap start nstimer based slideshow scrolls view every repeat. single tap invalidates timer.

problem user can still swipe screen , messes slideshow animation.

need able discard gesture not tap. can't disable userinteraction, can't disable scrolling.

have tried disable gestures aren't tap recognizers
code:
  (uigesturerecognizer * gesturerecognizer in [self.scrollview gesturerecognizers]) {  		if (![gesturerecognizer iskindofclass:[uitapgesturerecognizer class]]) {  			[gesturerecognizer setenabled:no];  		}  	}  
i have tried create generic gesture , have fail taps
code:
  (uigesturerecognizer * gesturerecognizer in [self.scrollview gesturerecognizers]) {  		if (![gesturerecognizer iskindofclass:[uitapgesturerecognizer class]]) {  			[gesturerecognizer requiregesturerecognizertofail:self.gesture];  		}  	}  
 

this might trick.

code:
  //in single tap method  scrollview.scrollenabled = no;    //in timer invalidate method  scrollview.scrollenabled = yes;  
nick
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Has to be the funniest headline ive ever seen

Man Brings Goat to Apple Store and has Pizza Delivered

Elusive Ninja: The Shadowy Thief - Can you survive the fast-paced ninja chaos?