I am using MMDrawerController
to create slide menu in my iOS app. Menu is working well but i have some troubles with it. My menu is ViewController
with TableView
with very light 4 custom cells.
I have button that show my menu. Menu looks well when i open it by sliding with my finger on the screen but when i run app for first time and push this button menu opens with some visual lag. It seems that menu is not completely loaded - so it is showing first near the top of screen and then it goes down on proper place. It happens only in case when i open menu first time with button. Here is the action.
@IBAction func showMenu(sender: AnyObject)
{
var appDelegate : AppDelegate = UIApplication.sharedApplication().delegate as! AppDelegate
appDelegate.centerContainer?.toggleDrawerSide(MMDrawerSide.Left, animated: true, completion: nil)
}
How can i set width of menu? My menu is very wide, maybe it can be customized to be smaller.
To hide the status bar you can use
[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
or the swift version
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: UIStatusBarAnimation.None)
You probably do too much init stuff in the viewDidLoad
and that's why it lags a bit.
You can use the
@property (nonatomic, assign) CGFloat maximumLeftDrawerWidth;
property to set the maximum width.