iOS 13 revealed `textField` on `UISearchBar`
Closed this issue ยท 3 comments
olejnjak commented
So we can use it natively instead of our hack ๐
janmisar commented
But only for 13+ ๐ฌ Removal is breaking change which is not good so I suggest just to deprecate this and we're done.
olejnjak commented
I think that the same approach as view use for view.safeArea
is optimal, at least for now.
olejnjak commented
Finally implemented in #61 in a bit different way as @LukasHromadnik suggested. The implementation is as discussed here, it uses searchTextField
on iOS 13+, on older systems it uses the old value(forKey:)
method.
In addition it is marked to be deprecated on iOS 13+, so it reports a deprecation warning if deployment target is iOS 13+ (we should do this also for the UIView.safeArea
), otherwise it compiles without any warning.