Blackjacx/SHSearchBar

Fix config setting

h0shy opened this issue · 2 comments

h0shy commented

Tried to fork your repo but github wouldn't let me :/

Right now you can't set the textContentType to nil on an existing searchbar. Fix suggestions:

Change

        if #available(iOS 10.0, *) {
            if let textContentType = config.textContentType {
                textField.textContentType = UITextContentType(rawValue: textContentType)
            }
        }

to

        if #available(iOS 10.0, *) {
            if let textContentType = config.textContentType {
                textField.textContentType = UITextContentType(rawValue: textContentType)
            } else {
                textField.textContentType = nil
            }
        }

Is this really/still an issue? Usually you configure your searchbar and never touch it again?

This issue will be closed due to inactivity. Please open a new issue if your problem still exists.