I am using MfSlideviewcontroller, i have to add some labels using storyboard but when i am using story board the viewcontroller will be blank.
And when i am doing with the help of code it is showing but i dont know the autolayout using code.
can Any one tell me how to use this in storyboard and why the screen is blank?
Asked
Active
Viewed 32 times
0

user6438311
- 117
- 1
- 3
- 13
-
Could you show us your storyboard? If we can see what you're trying to achieve, we can also help with creating the constraints programmatically. – JingJingTao Sep 05 '16 at 08:06
-
when i am using storyboard the side menu view controller will be blank , nothing appears on the side menu – user6438311 Sep 05 '16 at 08:41
1 Answers
1
Have you setup your viewcontroller similar to what is done in the example in the project?
To use a storyboard, you'll need a viewcontroller and a splitviewcontroller.
For the splitviewcontroller, follow what he has done in his example,
- Create MFMasterViewController and MFDetailViewController.
- Create the splitviewcontroller and set it's delegate to MFDetailViewController.
- Create MFSideMenuContainerViewController with SideMenuViewControllers for the left and right.
For the viewcontroller, this is your initial viewcontroller or what you push to,
- Add MFSideMenuContainerViewController as a childviewcontroller.
- Add the view of MFSideMenuContainerViewController to the view of the viewcontroller.
- Setup constraints and call didMoveToParentViewController.
Example code,
[self addChildViewController:mfSideMenuContainerViewController];
[self.view addSubview:mfSideMenuContainerViewController.view];
// setup all edge constraints
[mfSideMenuContainerViewController didMoveToParentViewController:self];
Hope this helps, ask me if you need me to clarify, good luck.

JingJingTao
- 1,760
- 17
- 28