UISearchBar is not moving with Tableview when scrolling down.
I don’t want to separately place the scrollbar. Its a requirement.
Below is the code.
customSearchBar = [[UISearchBar alloc] init];
customSearchBar.delegate = self;
[customSearchBar sizeToFit];
objListTable.tableHeaderView = customSearchBar;
Need to include a View and add UISearchbar on it, or else provide height of the Header view. By default its treats as 0.0.
If you want to use
the method allocate a View with height of default
UISeachBarheight. and addUISearchBaron it.Or else add a
UIViewon your code with defaultUISearchBarheight addUISearchBaron it. It will works as you expected.