2

I need to create a navigation drawer. I am using swift and iOS 8. For creating navigation drawer I am using MMDrawerConroller library

It is working great. But I am facing some problems. In left drawer I put the button and as well as label both vertically and horizontally center. But look at this picture. enter image description here

My button and label are not centered in drawer. I think the library hiding some portion of view controller to give a navigation drawer effect thats why the label and button are not showing their full size. But I need to make this layout responsive. Again there is a shadow on the edge of the drawer. How can I remove this too? If it is not possible to solve then what is the alternative to create navigation drawer using swift.

asif akbar
  • 99
  • 1
  • 10

1 Answers1

1

I believe you have setup AutoLayout for the Drawer view controller. I have used MMDrawerConroller with UITableViews and they adjust fine to the change in Width.

And for the shadow, you can set

[self setShowsShadow:NO];

in the controller that derives from MMDrawerConroller or for your MMDrawerConroller instance as

[myMMDrawerConrollerInstance setShowsShadow:NO];
UditS
  • 1,936
  • 17
  • 37
  • Thanks for the answer. But I setup auto layout as I do most of the time. Could you give me some instruction how to setup autolayout to meet my UI. – asif akbar Dec 17 '15 at 04:34
  • I saw he is setting drawer width 280. When I am designing UI for navigation if my content fit in 280 then it will fit for all screen like ipad air and iphone. May be this library scaling according to screensize. So its working now. – asif akbar Dec 17 '15 at 05:22
  • Good to know its working now. So if your Original question is resolved, could you mark this as accepted answer. Or post your own if this answer didn't help you. – UditS Dec 17 '15 at 07:09