SearchTextField icon indicating copy to clipboard operation
SearchTextField copied to clipboard

FilterItems frame not changing when scrolling

Open dErangaPrasad opened this issue 7 years ago • 4 comments

I have put SearchTextField in a UIScrollVeiw. but the problem is when scroll view scrolling FilterItems frame not changing. it works when I reset text in scrollViewDidScroll.

func scrollViewDidScroll(_ scrollView: UIScrollView) { acronymTextField.text = acronymTextField.text // hack for move filter screen with textfield when scrolling }

img_8495

dErangaPrasad avatar Apr 03 '17 06:04 dErangaPrasad

Hi @dErangaPrasad have you found the solution am also stuck with the same problem. if found can you share it

Gantaios avatar May 10 '17 10:05 Gantaios

I have the same problem, but i have my searchtextfield in an tableviewcell. Presumably something changed in the newer version. The problem manifests for me since i have to the swift 4.0 version of the SearchTextField.

Adarkas2302 avatar Nov 10 '17 07:11 Adarkas2302

I also have the some issue, but in tableview. Once I search & select some element then on scroll the search result is visible again when cellforindex is called. Did any one get a fix on the above case?

vin-the-dev avatar Mar 15 '18 10:03 vin-the-dev

I also have the some issue, but in tableview. Once I search & select some element then on scroll the search result is visible again when cellforindex is called. Did any one get a fix on the above case?

Hi @vinbhai4u, If you call hideResultsList() on the textField before returning your cell in cellForRowAtIndexPath it will stop the result from popping up again as you scroll and cellForRowAtIndexPath is called.

eg: cell.textField.hideResultsList() return cell

GHarte avatar Sep 14 '18 11:09 GHarte