xamarin.ios - 在单点触控中点击 View 时隐藏选项卡栏和导航栏

标签 xamarin.ios

我需要能够在点击 View 时隐藏导航栏和选项卡栏,并在再次点击时再次显示它。这在 Monotouch 中可能吗?

最佳答案

native 平台可以实现的任何功能都可以通过 MonoTouch 实现。

有多种方法可以实现这一目标。也许最简单的事情就是创建您自己的 UIViewController,它将仅托管您想要的信息并调用:

var myNewController = new MyNewController ()
myNewController.View.TouchDown += delegate {
    myNewController.DismissViewControllerAnimated (false);
};
PresentModalViewController (yourNewController, false);

然后您的 myNewController 必须包含一些代码来添加您想要全屏显示的实际内容。

关于xamarin.ios - 在单点触控中点击 View 时隐藏选项卡栏和导航栏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9553875/

相关文章:

facebook - Xamarin:最新 FB API 的问题

cocoa - 在 MonoTouch 中绘制带有色调的图像

ios - 自动布局按比例缩放 View

notifications - 单点触控 : Controller brought to foreground - Notification?

c# - 为了最大限度地提高 Mono 代码的可移植性,我应该注意哪些限制?

iphone - SecPKCS12Import() 在 Monotouch.Security 中可用吗?

ios - Xamarin.iOS 绑定(bind)抛出 "Error MT5212: Native linking failed, duplicate symbol"

ios - 来自 IB 的原型(prototype)单元引用

c# - UIButtons 在设计时与运行时创建时在 UIImageView 上的显示不同

c# - Xamarin iOS 同步运行具有返回值的任务