iPhone - 可以在父视图中显示模式视图中的视图吗?
嘿伙计们,只是想知道这是否可能,
我有一个可以发布到 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
当然,您可以向 UIWindow 添加子视图。在应用程序委托中,将窗口设置为属性(如果还没有)。现在您可以使用“
不要忘记投射”来访问该窗口,否则窗口会给您一个警告。
在显示模式视图控制器时向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
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.
您是否尝试过通过模态视图控制器上的
parentViewController
属性访问外部视图?Have you tried accessing the outside view via the
parentViewController
property on your modal view controller?