Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change background color of drawerContentVC #382

Open
AshutosQuickride opened this issue Apr 1, 2020 · 8 comments
Open

How to change background color of drawerContentVC #382

AshutosQuickride opened this issue Apr 1, 2020 · 8 comments

Comments

@AshutosQuickride
Copy link

pulleyDrawerVC.backgroundDimmingColor = .clear
pulleyDrawerVC.backgroundDimmingOpacity = 1.0
after setting this also background color is still setting some blur color

@amyleecodes
Copy link
Contributor

The background dimming settings don’t control the drawer. That controls the color of the background that “dims” the primary content VC when the drawer is open all the way.

If you want to remove the blur, set this to nil on PulleyViewController: drawerBackgroundVisualEffectView

You need to provide a background color in your drawer VC. Pulley won’t provide a background color for you.

@AshutosQuickride
Copy link
Author

I have set the above things but still i am getting the blur color for drawer can we remove that background color of it?

@amyleecodes
Copy link
Contributor

amyleecodes commented Apr 1, 2020

Please read my previous comment. It says what you were setting is wrong, and the correct way to remove the blur.

@AshutosQuickride
Copy link
Author

AshutosQuickride commented Apr 1, 2020

Yes according to previous comment i have removed and updated my code

let mainContentVC = UIStoryboard(name: StoryBoardIdentifiers.mapview_storyboard, bundle: nil).instantiateViewController(withIdentifier: "CreateRideHomeViewController") as! CreateRideHomeViewController
let drawerContentVC = UIStoryboard(name: StoryBoardIdentifiers.mapview_storyboard, bundle: nil).instantiateViewController(withIdentifier: "CreateRideBottomViewController") as! CreateRideBottomViewController

        let pulleyDrawerVC = PulleyViewController(contentViewController: mainContentVC, drawerViewController: drawerContentVC)

pulleyDrawerVC.drawerBackgroundVisualEffectView = nil

And still i am getting the same blur background color.

@amyleecodes
Copy link
Contributor

You need to set it after the view controller’s viewDidLoad has been called, since that’s where the built-in visual effect view is created and added.

You can force the view to load if you call loadViewIfNeeded(). Do that before you set it to nil.

@AshutosQuickride
Copy link
Author

still it does not work for me
Did you ever tried this . If you have can me share the demo with me?

@amyleecodes
Copy link
Contributor

Yes, I’ve tried this. It’s an officially supported API and has a comment in the file telling you how to do this.

I don’t have a demo I can share.

@Farazahmed90
Copy link

Did anyone get the answer on how to disable this blur effect?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants