ios - tabbarcontroller下tableview最后一行被截断

标签 ios objective-c uitableview interface-builder uitabbarcontroller

我有一个 Tabbarcontroller,在第一个 tabview 中我有一个 tableviewcontroller。现在最后一行是半可见的,其余的位于 tabbarcontroller 下方。

我在标签栏 Controller 的界面构建器中未选中扩展边缘,但没有任何变化。

我也在我的 tableview Controller 中试过这个:

self.edgesForExtendedLayout = UIRectEdgeNone;

但最后一行仍然位于标签栏下方的一半。

有人知道我该如何解决这个问题?

最佳答案

在 viewDidLoad 方法中试试这个

- (void)viewDidLoad
{
    [super viewDidLoad];

    self.edgesForExtendedLayout = UIRectEdgeAll;
    self.tableView.contentInset = UIEdgeInsetsMake(0.0f, 0.0f, CGRectGetHeight(self.tabBarController.tabBar.frame), 0.0f); 
}

关于ios - tabbarcontroller下tableview最后一行被截断,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29469267/

相关文章:

ios - 动态应用内设置

ios - 使用 SDWebImage 在服务器上更改图像时如何更新缓存中的图像

ios - 在一个 UIViewController 中实现对多个 UITableView 的 peek 和 pop

objective-c - Objective-C : How to reload tableview immediately after switching tabs?

ios - 自定义 iOS 框架文件中捆绑的 Storyboard

ios - RxSwift : Error adding RX bind to UITextField: Value of type 'Binder<String?>' has no member 'debounce'

objective-c - 拉出 UI slider 名称

ios - 以编程方式更改 iOS 上的隐私设置

c++ - 位移位和算术运算有什么区别?

ios - swift4 中的 UITextfield 验证 - 动态单元格