iOS 7自定义TableView位于TabBar下 [英] iOS 7 Custom TableView Is Under TabBar
问题描述
我尝试将我的应用程序移植到 iOS7
,但是我的自定义 TableViewController
显示了最后一行(单元格) TabBar
:(
Im trying port my app to iOS7
, but my custom TableViewController
is showing the last row (cell) under the TabBar
:(
我正在寻找它,但我找不到任何解决方案。任何人都可以帮助我?
Im searching a lot for it, but i dont find any solution. Can anyone help me?
错误显示在屏幕截图中(仅显示最后一个产品的一部分,因为我正在向上显示标签栏下显示的隐藏产品):
The error is shown in the blow screenshot (only is showing a part of last product because im draging to up to show the hidden product under the tabbar):
谢谢。
推荐答案
我在另一篇文章中找到了你的问题的答案,由dariaa回答,在这里:
I found the answer to your question on another post, answered by dariaa, here:
我为我工作很棒。
请不要相信我,因为我不是解决它的原始人。
Please no credit for me, because I'm not the original guy who solved it.
在你的自定义TableViewController中,在[super viewDidLoad]下添加这两行:
In your custom TableViewController, add these two lines under [super viewDidLoad]:
- (void)viewDidLoad
{
[super viewDidLoad];
self.edgesForExtendedLayout = UIRectEdgeAll;
self.tableView.contentInset = UIEdgeInsetsMake(0., 0., CGRectGetHeight(self.tabBarController.tabBar.frame), 0);
}
这篇关于iOS 7自定义TableView位于TabBar下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!