当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - SlideNavigationController access current controller from side menu

问题描述:

I'm using SlideNavigationController https://github.com/aryaxt/iOS-Slide-Menu.

So, the thing is that in the side menu I have a button. When I tap on this button I want to show a loading view MBProgressHUD in the main controller. I tried adding the loading view to the main window, or [SlideNavigationController sharedInstance].view and stuff like that, but the loading view always appears behind the main controller and above the side menu controller, so it is only visible when the side menu is opened.

Is there a way to add this view somehow, so it always appears above everything?

网友答案:

Add it to self.view.window.

  • [SlideNavigationController sharedInstance] - it is a UINavigationController
  • main controller - it is rootController of [SlideNavigationController sharedInstance]
  • side menu - it is a UIView added to keyWindow

Thats why you have to add to keyWindow too.

分享给朋友:
您可能感兴趣的文章:
随机阅读: