I have a UITableView and I put a UISearchbar on it. I want to make sure that if the user scrolls, I want the UISearchbar element to be fixed on top, plus I also want the first line of the UITableView to be fixed. Is there any sample code for this?
Until now, every sample that I found that the UISearchbar was not fixed at the top, if you scroll it, it will disappear. One way to eliminate the UISearchbar element could be if I placed the UIView under both elements (UITableView and UISearchbar) and put the two in a row between themselves (just the idea that I don't know if this actually works). However, I am not sure if this is a suitable way, and it also wonβt fix that I want the first line to be fixed.
I'm a little new to this stuff, would be glad if someone could point me in the right direction, thanks.
source
share