Question

I have a an app in IOS 6. Now i am try to make it compatible with IOS 7.

I have a search bar controller. All works good in IOS 6. I have used UISearch Display Controller.

But in IOS 7 content size of table view not set correctly.

While i dont search any thing :

enter image description here

But if i search any anything than click on list view and scroll i have this out put :

![enter image description here][2]

You can see the white space below.

- (NSInteger)tableView:(UITableView *)tableView1 sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index {
if (title == UITableViewIndexSearch) {
            [tblData scrollRectToVisible:self.searchDisplayController.searchBar.frame animated:NO];
            return -1;
        }
}

enter image description here

Thanks for Help

Was it helpful?

Solution

As you mentioned in the comment, you have a custom cell, maybe with custom layout and view hierarchy. Be sure to add views to the cell's contentView instead the cell, that is changed in iOS7.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top