FAPanels icon indicating copy to clipboard operation
FAPanels copied to clipboard

[Help] How to set drop shadow on center controller?

Open Sergozh opened this issue 5 years ago • 11 comments

Please give an advice how to set drop shadow on center controller when it appears above left panel. Thank you!

Sergozh avatar Nov 07 '18 12:11 Sergozh

Can you share more details what you actually looking for? Shadow for left panel is already there.

fahidattique55 avatar Nov 07 '18 14:11 fahidattique55

You can use showDarkOverlayUnderLeftPanelOnTop and showDarkOverlayUnderRightPanelOnTop.

fahidattique55 avatar Nov 07 '18 14:11 fahidattique55

I'm trying to achieve something like this. When center panel higher than left. img_4872

Sergozh avatar Nov 07 '18 15:11 Sergozh

And how I can reload center panel ViewController when left is opened without closing it?

Sergozh avatar Nov 07 '18 15:11 Sergozh

I think the shadow is not there for this scenario. If you can implement this feature and make a merge request then it will be appreciated as I don't get enough time to add new features in this library but i will add a lot of features in it.

fahidattique55 avatar Nov 07 '18 15:11 fahidattique55

And how I can reload center panel ViewController when left is opened without closing it?

Reload means ?

fahidattique55 avatar Nov 07 '18 15:11 fahidattique55

For example some data changes from left panel needs to reload center panel so if I call panel?.center(myNewCenterController) it reloads with animation and left panel closes. The question is how to change center panel without closing left panel?

Sergozh avatar Nov 07 '18 15:11 Sergozh

You can do it using NSNotificationCenter.

fahidattique55 avatar Nov 07 '18 15:11 fahidattique55

Done already. Thanks. Just looked for another options.

Sergozh avatar Nov 07 '18 15:11 Sergozh

@Sergozh and @fahidattique55 can you guide me how can you set your custom view in center view?

I changed code in centervc.swift and also hide navigation bar from navigation controller. but still i get navigationbar on top. screenshot 2018-11-21 at 10 17 22 am

    panel!.configs = FAPanelConfigurations()
    panel!.configs.rightPanelWidth = 80
    panel!.configs.bounceOnRightPanelOpen = false
    panel!.navigationController?.setNavigationBarHidden(true, animated: false)
    panel!.delegate = self

screenshot 2018-11-21 at 10 14 24 am

Hems3112 avatar Nov 21 '18 04:11 Hems3112

This line panel!.navigationController?.setNavigationBarHidden(true, animated: false) is not correct.

As the Panel is just a container of all your centre, left and right controllers. So you need to hide navigation bar of centre controller and not the panel controller.

try using this, navigationController?.setNavigationBarHidden(true, animated: false) in view will appear of your centre controller.

fahidattique55 avatar Nov 21 '18 05:11 fahidattique55