0

i'm using UISearchDisplayController in my ViewController: enter image description here

search bar is part of my tableView:

enter image description here

All works fine (search,search results) but i have one issue: when i'm pressing search her it becomes bigger, and after i'm pressing cancel button it changes his position and returns to initial position, please check this Picture. What am i missing? I just hooked up my searchDisplayController with storyboard, and using some code for search, i'm not changing size or position of my searchBar.

Vlad Z.
  • 3,401
  • 3
  • 32
  • 60

1 Answers1

0

Setting edgesForExtendedLayout in viewDidLoad helped me:

if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) 
    self.edgesForExtendedLayout = UIRectEdgeLeft | UIRectEdgeBottom | UIRectEdgeRight;
else
    [self respondsToSelector:@selector(edgesForExtendedLayout)];

WARNING: This only works on iOS >= 7

Source:

Community
  • 1
  • 1
Vlad Z.
  • 3,401
  • 3
  • 32
  • 60