Closed Treverr closed 8 years ago
I've been looking into this and can't seem to replicate. Can you share some code that shows the conflict?
It looks like its mostly affecting the UISearchBar in GooglePlacesAutocomplete. It did affect mine in my customer tableview but it seems to be working now, but I'm not quite sure why it affects that one only.
If you'd like to look at the issue, https://github.com/Treverr/inSparkle/tree/PhoneNumberKitIssue11
If you type in the Phone Number field, it causes the issue and I'm not sure why. Maybe its just me. But it also causes a crash when closing out the Adding screen. Though no reason in the debugger.
If i don't type into the phone number field where it would be formatting, then it works fine.
Simulate into the Screens as follows and you'll see the issue, Schedule -> + -> Opening -> Mag glass next to Customer Name -> Add Customer -> tap address cell
Thanks @Treverr, just had a quick look...
The issue was that you returned false on func textFieldShouldEndEditing(textField: UITextField)
It meant that the phone number text field would never finish editing.
Additionally, checking which field is in the textfield delegate with an .isFirstResponder() is wrong because it might have already lost the firstResponder status. Check which one it is with an if statementt instead.
I made a pull request on your project that fixes it: https://github.com/Treverr/inSparkle/pull/37
Awesome, thanks for the word of advice! Im newer to this all still so I really appreciate it!
No worries :smile:
It seems when this is imported, the entire application can no longer use search bars.