mnbayan / AutocompleteTextfieldSwift

Simple and straightforward sublass of UITextfield to manage string suggestions
MIT License
290 stars 66 forks source link

newSuperView ni pointer - semi-resolved issue #53

Open cjarman opened 7 years ago

cjarman commented 7 years ago

Changed this line as once the parent viewController was dismissed a nil pointer error was being thrown after returning to the previous viewController.

While the fix works i'm not sure as to what is the underlying issue.

open override func willMove(toSuperview newSuperview: UIView?) { super.willMove(toSuperview: newSuperview) commonInit() //Changed this if (newSuperview != nil){ setupAutocompleteTable(newSuperview!) } }