0

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? in 5s it is shoing correct but in 6splus

enter image description here

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 Answers1

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,

  1. Create MFMasterViewController and MFDetailViewController.
  2. Create the splitviewcontroller and set it's delegate to MFDetailViewController.
  3. Create MFSideMenuContainerViewController with SideMenuViewControllers for the left and right.

For the viewcontroller, this is your initial viewcontroller or what you push to,

  1. Add MFSideMenuContainerViewController as a childviewcontroller.
  2. Add the view of MFSideMenuContainerViewController to the view of the viewcontroller.
  3. 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