Pergunta

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

Foi útil?

Solução 2

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

Outras dicas

try this .

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top