문제

When I start to type in the searchbar my search results tableview goes 20 px top of the searchbar. Where can I set the frame's position fixed in my code? In viewdidload or searchDisplayControllerWillBeginSearch,[self.searchDisplayController.searchResultsTableView setFrame:CGRectMake(0, self.searchbar.frame.origin.y, 320, 466)]; doesn't work.

Thank you.

First 2 images, searchbar stays in the same position. But search result tableview goes up and stays there still after canceling the search. After canceling the search the searchbar goes top of the resulttableview of searchbar.

enter image description here


enter image description here


enter image description here

도움이 되었습니까?

해결책 2

It was because of I selected bottom line in the autosizing in xib. So I choose top line in autosizing and It worked.

다른 팁

try this .

you need to set delta y and delta height of tableview from xib for iOS 7.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top