Objective c UITableView无法反弹到顶部,并且放错了位置。iOS 7问题
UITableView不会完全反弹,并在UITableView和导航栏底部之间留下空白。在我的tableview的顶部还有一个uisearchbar。 我试过了,但没用Objective c UITableView无法反弹到顶部,并且放错了位置。iOS 7问题,objective-c,uitableview,ios7,uisearchbar,Objective C,Uitableview,Ios7,Uisearchbar,UITableView不会完全反弹,并在UITableView和导航栏底部之间留下空白。在我的tableview的顶部还有一个uisearchbar。 我试过了,但没用 [self.view bringSubviewToFront:self.searchBar]; [self.tableView setClipsToBounds:YES]; if([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
[self.view bringSubviewToFront:self.searchBar];
[self.tableView setClipsToBounds:YES];
if([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0) {
CGRect statusBarViewRect = [[UIApplication sharedApplication] statusBarFrame];
float heightPadding = statusBarViewRect.size.height+self.navigationController.navigationBar.frame.size.height;
NSLog(@"%f",heightPadding);
self.tableView.contentInset = UIEdgeInsetsMake(108.0, 0.0, 0.0, 0.0);
}
您能提供一些代码来设置UITableView及其搜索栏吗?你有没有试着不使用搜索栏来查看它是否来自于此?我在故事板中做所有事情,所以没有代码。是的,它在没有搜索栏的情况下也会做同样的事情。