Resolved UITextView and Event Handling/Gesture recognizers


i have uitextview takes entire screen (so it's hit-test view guess). when don't want user edit text view, set editable property no. still allows user scroll text view (i want scrolling!).

textview.editable = no;

when text view un-editable, add tap gesture recognizer parent view detect double taps.
code:
  self.doubletaprecognizer = [[uitapgesturerecognizer alloc] initwithtarget:self action:@selector(recognizeddoubletap:)];  self.doubletaprecognizer.numberoftapsrequired = 2;  [self.view addgesturerecognizer:self.doubletaprecognizer];  
however, parent view never seems receive double tap gesture. seems text view and/or 9 gesture recognizers gobbling touch events when it's un-editable (i logged names of text view's 9 gesture recognizers: favorite uitapandahalfrecognizer).

have iterated through text view's 9 gesture recognizers , regulated delivery of touches parent view receive touches:
code:
          nsarray *gestures = [textview gesturerecognizers];                    (int = 0; < 9; i++) {              [[gestures objectatindex:i] setcancelstouchesinview:no];              [[gestures objectatindex:i] setdelaystouchesended:no];          }    
unfortunately, parent view still doesn't receive double taps. suggestions? keep in mind want text view scroll. therefore, don't want set text view's userinteractionenabled property no.
 

you've tagged thread resolved. it? seems unclear whether you've solved problem or not.
 


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

Rogue - the old text based game. I can't find it!

RAID in Early 2009 Mac Pro

NBC Releases Summer Olympics iOS Apps, Offering Livestreaming of All 302 Events