Search code examples
iosswiftmmdrawercontroller

MMDrawerController and constraints


I am using MMDrawerController to show menu in my app - i use one of my ViewControllers for this.

I have problem some problems with constraints. When my menu VC is loaded for the first time - it show all elements in left corner and after second they are placed normally.

So at first time constraints are working only after all UI elements had loaded. What can i do with it?


Solution

  • I have this problem too. I found a (dirty) workaround which consists in calling

    [drawerController bouncePreviewForDrawerSide:MMDrawerSideLeft distance:0.1f completion:nil]; // Hack for layout bug in menu
    

    to force the drawer to process its layout.