iPhone - 可以在父视图中显示模式视图中的视图吗?

发布于 2024-11-02 13:58:06 字数 158 浏览 4 评论 0原文

嘿伙计们,只是想知道这是否可能,

我有一个可以发布到 tumblr 的应用程序,并且发布功能位于主视图的模态视图中。我有一个连接监听器,当应用程序从 tumblr 服务器获得响应时,它会停止在状态栏中显示活动指示器。我想显示一条消息,说明它已成功发布在主窗口中、模式视图之外。这可能吗?

Hey guys, just wondering if this one is possible

I have an app that posts to tumblr, and the posting function is within a modal view of the main view. I have a connection listener that stops displaying an activity indicator in the status bar when the app gets a response from tumblr's servers. I want to display a message saying that it was posted successfully in the main window, outside of the modal view..is this possible?

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

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

发布评论

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

评论(2

轻许诺言 2024-11-09 13:58:06

当然,您可以向 UIWindow 添加子视图。在应用程序委托中,将窗口设置为属性(如果还没有)。现在您可以使用“

((YourAppDelegate *)[[UIApplication sharedApplication] delegate]).window 

不要忘记投射”来访问该窗口,否则窗口会给您一个警告。

在显示模式视图控制器时向parentViewController添加子视图不会显示它,它位于模式视图控制器后面。

Yes of course, you can add a subview to the UIWindow. In the app delegate make the window a property, if it isn't alreay. Now you can access the window with

((YourAppDelegate *)[[UIApplication sharedApplication] delegate]).window 

Don't forget to cast, else window will give you a warning.

Adding a subview to the parentViewController while showing a modal view controller won't show it, it's behind the modal view controller.

墨小沫ゞ 2024-11-09 13:58:06

您是否尝试过通过模态视图控制器上的 parentViewController 属性访问外部视图?

Have you tried accessing the outside view via the parentViewController property on your modal view controller?

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