I have an UITableView and I did put an UISearchbar on it. What I want to achieve is that if a user is going to scroll i want the UISearchbar element to be fixed on the top, plus I want the first row of the UITableView fixed as well. Is there any sample code for this ?
So far every sample I found the UISearchbar wasn't fixed at the top, if you scroll it disappears. One way to get the UISearchbar element fixed could be, if I put an UIView under both elements (UITableView and UISearchbar) and put those two consecutively among themselves (just a thought of me don't know if this actually is working). However i'm not sure if this is the appropriate way to go and it also wouldn't fix that I want the first row fixed as well.
I'm kinda new to this stuff would be glad if someone could point me in the right direction, thank you.
For the fixed search bar: just make it a sibling of the tableView.
For the fixed first row: maybe make it the section header and have only 1 section, or make it a sibling view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With