3

Guys I am using UISearchDisplayController in my app and it was working fine in iOS 6 and 5. In iOS 7 I am getting this UI issue.enter image description here

The searchbar and the table view is going up a bit also the rows in the table are moving up more than the expected bounds. Any one facing the same issue?

Satheesh
  • 10,998
  • 6
  • 50
  • 93

1 Answers1

3

You can try to set the property edgesForExtendedLayout of the UITableViewController to UIRectEdgeNone for iOS 7 and above to none because by default it's UIRectEdgeAll.

#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)

- (void)viewDidLoad 
{
    [super viewDidLoad];

    if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"7.0")) 
        self.edgesForExtendedLayout = UIRectEdgeNone;
}

EDIT :

Some explication with the Apple Documentation here.

Jordan Montel
  • 8,227
  • 2
  • 35
  • 40
  • Thanks I figured the same. – Satheesh Oct 11 '13 at 06:27
  • I'm experiencing this issue, and setting the `edgesForExtendedLayout` doesn't work for me. One difference is that I'm using a `UIViewController` rather than `UITableViewController`. – tybro0103 Nov 13 '13 at 18:07
  • With `UIViewController` I use a trick with a subview and the delta for iOS 6/7. Have a look here : http://stackoverflow.com/questions/19226751/ios7-iphone-5-giving-white-space-at-the-top – Jordan Montel Nov 13 '13 at 18:42