想要在打开URL时显示导航栏-iPhone

发布于 2024-08-03 09:07:34 字数 294 浏览 1 评论 0原文

我一直为这个问题摸不着头脑。我希望查询标题是不言自明的。单击按钮后,我将打开如下 URL:

NSURL *girlsUrl=[NSURL URLWithString:[IMAGE_URL_GIRLS objectAtIndex:(indexValue*3 + currentPageNumber)]]; [[UIApplication 共享应用程序]openURL:girlsUrl];

它在同一视图中打开 URL,但导航栏设置为默认隐藏。我想在看到 URL

问候后添加一个导航回到顶部的选项,

提前感谢:)

I have been scratching my head for this issue. I hope the query title is self explanatory. On clicking a button i am opening URL like following:

NSURL *girlsUrl=[NSURL URLWithString:[IMAGE_URL_GIRLS objectAtIndex:(indexValue*3 + currentPageNumber)]];
[[UIApplication sharedApplication]openURL:girlsUrl];

its opening a URL in same view but navigation bar is set as default hidden. i want to add an option of navigating back at top, to application after seeing URL

Regards,

Thanks in advance :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

小矜持 2024-08-10 09:07:34

您可能不想使用 UIApplication 打开 URL,而是考虑实现 UIWebView - 自己下载 URL 上的数据,然后将其显示在 Web 视图中,并将该视图(和视图控制器)添加到导航控制器。这样,您就可以在顶部看到“后退”按钮和系统栏,同时仍然显示您想要的 URL。

Instead of opening the URL with the UIApplication, you may instead want to consider implementing a UIWebView - download the data at the URL yourself, then display it in a web view and add that view (and a view controller) to a navigation controller. That way, you get the Back button and the system bar at the top, while still displaying the URL you want.

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