我怎样才能从地图视图变成简单视图
我正在开发一个应用程序,其中的起点是地图,它也有一个按钮。我想要的是,如果用户单击该按钮,他将进入另一个视图,该视图只有两个或三个按钮或其他元素。
请向我提供详细的答案,以便我能够做到。
预先感谢,我将非常感激。
I am working on an app in which the starting point is a map and it has a button too. What i want is that if user clicks the button it will take him to another view which just have two or three buttons or other elements.
Please provide me with detail answer so that i would be able to do it.
Thanks in advance, i would really appreciate it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需将此代码放入您的按钮操作中并根据您的需要进行更改
,您就可以在 YourViewControler 中添加任何内容。
我希望它能帮助你。
just put this code inside your button action and change it your needs
and you can add anything in YourViewControler.
I hope it will help you.
这可以通过多种方式实现。例如,您可以为您需要的每个视图使用一个控制器,并使用 UINavigationController 在它们之间进行切换。使用地图控制器作为导航控制器的根,然后当用户按下按钮时只需调用pushViewController:animated:
That could be achieved in a lot of ways. For example you could use a controller for each view you need and switch between them with the use of a UINavigationController. Use the map controller as the root of the navigation controller, then when the user presses the button just call pushViewController:animated: