我正在为 iPad 创建一个使用 monotouch 的主细节应用程序。在我添加的主 View 中,自定义 UIViewController。这个 UIViewController 在顶部有一个工具栏和 2 个 UITableView。我只能看到第一个 UITableView。我看不到底部的工具栏和其他 UItableView。
我不确定是否需要打开任何东西或配置任何东西来启用可见性。
我为每个表格 View 和工具栏创建了 socket 。
如果有人能对此有所了解,我将不胜感激。
请看图片。
谢谢
巴兰·辛尼亚
更新:我有如下的 AppDelegate 代码
[Register ("AppDelegate")]
public partial class AppDelegate : UIApplicationDelegate
{
// class-level declarations
UIWindow window;
UISplitViewController splitViewController;
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);
var controller = new RootViewController ();
var navigationController = new UITabbedViewController();
var detailViewController = new UIDetailViewTabbedBarController();
splitViewController = new UISplitViewController ();
splitViewController.WeakDelegate = detailViewController;
splitViewController.ViewControllers = new UIViewController[] {
navigationController,
detailViewController
};
window.RootViewController = splitViewController;
navigationController.DetailViewController = detailViewController;
// make the window visible
window.MakeKeyAndVisible ();
return true;
}
}
我的导航 Controller 是 UITabbedView Controller ,它有 2 个 UIViewController。我在 UIViewController 之一中添加工具栏和 2 个表 View 。
最佳答案
我通过调整界面构建器中的自动调整大小部分来让它工作,标记左、右和上红线并取消标记底部红线,然后一切对我来说都很好。
我对 UITableView 做了同样的事情,我在顶部标记了红线。
关于ipad - 工具栏在自定义 UIViewController 中不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10688615/