hwrdprkns
hwrdprkns

Reputation: 7585

Display Issue with UITableView

I have a UISearchBar which uses the UIScopeBar, and I am trying to get the first row of the table to display when the scope bar is not hidden.

Thanks in advance.

Here is an image of my problem(0th row is hidden):

enter image description here

Upvotes: 1

Views: 168

Answers (1)

MJeffryes
MJeffryes

Reputation: 458

You just need to change the Table View's content and scroll indicator insets when the search bar is displayed. This is achieved with the scrollIndicatorInsets and contentInsets properties on UIScrollView. Just pass a UIEdgeInsets struct with the top offset by the appropriate amount for the height of the scope bar. Set it back to 0 when the scope bar disappears.

Upvotes: 1

Related Questions