A
A
anonymous222013-12-10 19:14:03
Objective-C
anonymous22, 2013-12-10 19:14:03

Why is the searchBar acting weird?

I am using UISearchDisplayController in my ViewControllere for table search
iS29s.png
Everything works fine (search, display results.). There is one problem - when you click on the search searchBar becomes larger and changes its position - YPdEFL.gif.
Any guesses what could be the problem? I don't change frame search bara, only search is used in the code. Thank you!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
anonymous22, 2013-12-10
@anonymous22

Changing edgesForExtendedLayout helped:

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

Resource:
StackOverflow

R
Rikcon, 2013-12-10
@Rikcon

Is it only in the emulator or on a real device the same way?
Maybe just an emulator bug.

C
corristo, 2013-12-10
@corristo

What is set as searchContentsController on UISearchDisplayController? I had a similar experience when I assigned this property nested in the main view controller an instance of UITableViewController

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question