对于此代码:
var Root = new RootElement("ConnectionView")
{
new Section("Sales")
{
new HtmlElement("Discover more about foo",
"http://foo.com")
}
}
var dvc = new DialogViewController(Root, true);
this.NavigationController.PushViewController(dvc, true);
this.AddChildViewController(dvc);
this.View.AddSubview(dvc.View);
按预期创建对话框,包含标题和元素。
但是,尽管HtmlElement按预期打开了URL,但它会将应用程序导航到网站的全屏显示,而无需使用任何导航方法返回到正确的对话框。打开视图的其他元素会按预期保留导航控制器,并且不会全屏打开。
注意:我使用DialogViewController上的标志启用Nav。
答案 0 :(得分:0)
没有做太多工作,最简单的方法是确保你的DialogViewController托管在UINAvigationController中,这将提供一种简单的返回方式。
替代方案包括继承HtmlElement并添加自己的UI来控制它。