swiftxcodeuitextfielduitextviewautocorrect

Unable to select AutoSuggestions loading in UITextfield and UItextview in IOS


We are unable to select auto-suggestion when loading in UITextfields and UITextviews. We are using IQkeyboardManager for auto-scroll UItextfield visibility.enter image description here


Solution

  • This issue is by gestureRecognizer

    Example:

    public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
       
            let className = String(describing: self.classForCoder)
            if className == "TUIPredictionView" {
                return true
            }
            return (touch.view == self)
            
        }