Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the Drawer width of MMDrawerController to the width of the Screen using Swift 2?

I am Using MMDrawerController on my Project. I have a Menu that shows from Left to Right and It is working Properly. But my requirement is to have a drawer that have a width of the current screen Width. How can i do that Using Swift ?

Currently the screen looks like this , I need to have the White area to cover Up the Entire Screen.

enter image description here

like image 520
Joker Avatar asked Oct 13 '15 05:10

Joker


1 Answers

Use setMaximumLeftDrawerWidth property of MMDrawerController like

  centerContainer?.setMaximumLeftDrawerWidth(UIScreen.mainScreen().bounds.width, animated: true, completion: nil)  

You can check the method in MMDrawerController.h

-(void)setMaximumLeftDrawerWidth:(CGFloat)width animated:(BOOL)animated completion:(void(^)(BOOL finished))completion;
like image 163
EI Captain v2.0 Avatar answered Oct 28 '22 10:10

EI Captain v2.0