我怎样才能从地图视图变成简单视图

发布于 2024-09-12 02:21:59 字数 129 浏览 4 评论 0原文

我正在开发一个应用程序,其中的起点是地图,它也有一个按钮。我想要的是,如果用户单击该按钮,他将进入另一个视图,该视图只有两个或三个按钮或其他元素。

请向我提供详细的答案,以便我能够做到。

预先感谢,我将非常感激。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

空城仅有旧梦在 2024-09-19 02:22:00

只需将此代码放入您的按钮操作中并根据您的需要进行更改

YourViewControler *yourViewControler = [[YourViewControler alloc]            initWithNibName :@"YourViewControler" bundle:nil];

[self.navigationController pushViewController:yourViewControler animated:NO];

[yourViewControler release];

,您就可以在 YourViewControler 中添加任何内容。

我希望它能帮助你。

just put this code inside your button action and change it your needs

YourViewControler *yourViewControler = [[YourViewControler alloc]            initWithNibName :@"YourViewControler" bundle:nil];

[self.navigationController pushViewController:yourViewControler animated:NO];

[yourViewControler release];

and you can add anything in YourViewControler.

I hope it will help you.

時窥 2024-09-19 02:22:00

这可以通过多种方式实现。例如,您可以为您需要的每个视图使用一个控制器,并使用 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:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文