antoniocasero/Panels

How to apply "modalPresentationStyle = .popover"?

Closed this issue · 2 comments

Hi,
I want to make the background screen dark like modalpresentationstype = .popover.
How can i do it?

Hi @yeonpark333 , sorry, but the dark background is not implemented.

Hi,
I want to make the background screen dark like modalpresentationstype = .popover.
How can i do it?

you can add a BackgroundView in Panels's ParentViewController before it show. If you do like this, you should remove the BackgroundView when you dismiss Panels.
I do like this, it work fine.

// show addBackground(backgroundColor: UIColor.colorWithHex(hex: "000000", alpha: 0.6)) panelManager.show(panel: panelVC, config: config, view: nil)

// dismiss panel?.dismiss() DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.4) { viewer.removeBackground() }