Reputation: 6471
I have searchDisplayController,which is table headerView of my tableView.My tableview scrolling works smooth and perfect and tableview consist of 3 rows.My issue is my tableView scrolls to top,then bounce back at that time my tableViewHeader(UIsearchbar) cannot seen it goes to behind the navigation bar.Then scroll to down i can see my tableViewHeader(UISearch bar). When first time view loading the contentOffset on my console is {0,0},then scroll to top and bounce back at that time my contentOffset last value on my console is {0,44}.How to solve this issue?Please help me..
Upvotes: 0
Views: 755
Reputation: 6471
In ios7,don’t set directly add 'tableHeaderView' as 'UISearchBar'.Firstly i added my 'UISearchBar' to plain 'UIView',then set my 'tableHeaderView' as plain 'UIView'.
by programatically do following code..
[self.plainView addSubview:mySearchBar];
self.mTableView.tableHeaderView = self.plainView
Upvotes: 1