ios - Remove Tap gesture from UITextField inside a UITableViewCell -
What I basically want to achieve, if there is a UITextField inside custom UITlessViewCell, this text file should be triggered only on the long press, whereas
So if the user taps on the textfield once, select the cell should be turned on with its delegate method.
So far, I added a long press on my textfield and removed all the other gestures. So when I have a long press on it, my text file gets triggered properly, but the problem is that when I just tap on the textfield, the cell is not triggered and the selection method has been Not called. If I tap out of my textfield, then the method is correctly called I I tried to do things differently with UIGestureRecognizerDelegate but none of the following works: (. Any ideas appreciated! Thx! < You should be able to accomplish this by having your activists on the cell as well, because of your You
: (NSINXAP *) indexpath {Static NSSTING * cell identifier = "customcell"; Customcell * cell = [tableview dequreablecalevillidentifier: cellindex for indepaypet: indexpath]; If (cell == blue) {cell = [[custom CL light] initWithStyle: UITableViewCellStyleDefault reuseIdentifier: CellIdentifier]; } Cell.nameTextField.gestureRecognizers = Zero; UILongPressGestureRecognizer * longPressTextField = [[UILongPressGestureRecognizer alloc] initWithTarget: Auto Actions: @Selector (Handeltextfiled Longpressed :)]; [Cell .nameTextField addGestureRecognizer: longPressTextField]; Return cell; }
UIL OnJester Characters can be found by adding
: CustomCell
objects and settings to
cell .nameTextField.userInteractionEnabled = NO;
Comments
Post a Comment