daisuke310vvv / PopupController

PopupController is a controller for showing temporary popup view.
MIT License
337 stars 61 forks source link

how to make the background view cover the navigation bar when popup from a view embed in NavigationBar? #37

Open Elgins opened 8 years ago

Elgins commented 8 years ago

Hi Hansome Boy, I want ask you a question, if I want to make the background view which is the dark view cover the navigation bar as well as tabbar , how should I do?

many thks if you can tell me.

daisuke310vvv commented 8 years ago

@Elgins hi, thank you for your issue. Could you try create PopupController from your root view controller like,

if let root = UIApplication.sharedApplication().delegate?.window??.rootViewController  {
            PopupController.create(root).show(AnyViewController)
        }

or, if you have a tabbarcontroller, you can do it with your tabbarcontroller.

Elgins commented 8 years ago

I am going to try it, a li ga do go za i ma su

haroldogtf commented 6 years ago

Works for me!

Update for Swift 4

 if let root = UIApplication.shared.delegate?.window??.rootViewController {
     PopupController.create(root).show(AnyViewController)
 }