romaonthego / REFrostedViewController

iOS 7/8 style blurred view controller that appears on top of your view controller.
MIT License
2.96k stars 494 forks source link

Slide menu Custom Width #124

Open cliffgr opened 9 years ago

cliffgr commented 9 years ago

hello

First of all thanks and gratz for the great lib

I want to customize this lib because i dont want the slide menu takes 90% of the screen. Look my screenshoot.

Thanks

screen shot 2015-01-29 at 9 59 43 am

bill350 commented 9 years ago

If it happens at the first display, see me reply and fix here : https://github.com/romaonthego/REFrostedViewController/issues/30

"To fix that, after created your frostedViewController, call resizeMenuViewControllerToSize with your size and all will going right."

dimohamdy commented 8 years ago

to change size of menu size in REFrostedContainerViewController add at end of viewWillAppear these lines self.frostedViewController.menuViewSize = CGSizeMake(195,self.frostedViewController.menuViewController.view.frame.size.height); [self.frostedViewController resizeMenuViewControllerToSize:CGSizeMake(195,self.frostedViewController.menuViewController.view.frame.size.height)];

saad-ansari commented 7 years ago

in REFrostedViewController : 1 - Line # 83

Change

_automaticSize = YES ;

_limitMenuViewSize = NO; to

_automaticSize = NO; _limitMenuViewSize = YES;

2- Line # 189

Change

self.calculatedMenuViewSize = CGSizeMake(_menuViewSize.width > 0 ? _menuViewSize.width : self.contentViewController.view.frame.size.width,_menuViewSize.height > 0 ? _menuViewSize.height : self.contentViewController.view.frame.size.height);

to

self.calculatedMenuViewSize = CGSizeMake(280,_menuViewSize.height > 0 ? _menuViewSize.height : self.contentViewController.view.frame.size.height);