NavigationBar 下的 iOS UITableView 如何实现? [英] How iOS UITableView under NavigationBar?

查看:24
本文介绍了NavigationBar 下的 iOS UITableView 如何实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了

NavigationController.NavigationBar.Translucent = true;

然后添加表格并将frame设置为RootView Frame,然后:

Then add table and set frame to RootView Frame, and:

    public override void ViewDidLayoutSubviews()
        {
            base.ViewDidLayoutSubviews();
            float y = this.TopLayoutGuide.Length;
            table.ContentInset = new UIEdgeInsets (y, 0, 0, 0);
        }

但是,我在 NavigationBar 下有表格滚动条 (我使用单点触控):

But, I Have table Scroll Bar under NavigationBar (I use monotouch):

推荐答案

我用这个简单的代码解决了任务:

I solved task with this simple code:

table.ScrollIndicatorInsets = new UIEdgeInsets(64, 0, 0, 0);

这篇关于NavigationBar 下的 iOS UITableView 如何实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆