I have some code like this:
let search = searchCityName.rx.text
.filter { ($0 ?? "").count > 0 }
.flatMapLatest { text in
return ApiController.shared.currentWeather(city: text ?? "Error")
.catchErrorJustReturn(ApiController.Weather.empty)
}
.observeOn(MainScheduler.instance)
search.map { "\($0.temperature)° C" }
.bind(to: tempLabel.rx.text)
.disposed(by: bag)
I found that .bind(to:) operator make the keyboard dismissed every time user tap on Return Key button. So how can I keep the keyboard from being dismissed? Thanks