iPhone:隐藏/显示工具栏
我的视图顶部有一个带有后退按钮的工具栏。我希望当视图加载时显示工具栏隐藏,然后触摸按钮即可显示动画。
- 编辑 - 我没有使用导航控制器。
I have a toolbar on top of my view with a back button. I would like when the view loads to appear with the toolbar hidden and then, with a touch of the button to appear animated.
--Edit--
I am not using a Navigation Controller.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在显示视图之前:
当您按下按钮时:
Before the view is shown:
When you press the button:
给出新信息 - 没有 UINavigationController - 情况有所不同。以下是我的代码中的相关部分...
创建导航栏并将其添加到您的视图中:
布局...
创建一个函数来控制/隐藏它:
在哪里
Given new information - that there's no UINavigationController - things are different. Here are the relevant bits from my code...
Create the nav bar and add it to your view:
Lay it out..
Create a function to who it/hide it:
where
以下是 tarmes 的一些移植到 MonoTouch/c# 的代码。
Here's some of tarmes's code ported to MonoTouch/c#.