matghazaryan / AMSlideMenu2

Sliding Menu for iOS (Left and Right menus). Multiple storyboards and XIBs support.
MIT License
1.2k stars 194 forks source link

Autolayout #11

Closed shinvou closed 10 years ago

shinvou commented 10 years ago

Hello. You've done great work, I saw you demo video on YT. But I have one question: In the demo video you turned off autolayout for your storyboard, does this mean AMSlideMenu is not compatible with auto layout? Thanks in advance.

arturdev commented 10 years ago

Actually I never use auto layout :) But AMSlideMenu fully compatible with auto layout.

shinvou commented 10 years ago

Ok, thank you for the answer. Then I got two questions:

  1. Can I use a View Controller with a Table View instead of a Table View Controller for leftMenu/rightMenu?
  2. If I'm not using auto layout, the first cell of the Table View Controller is under the status bar. Is there a fix you know that I can use?
arturdev commented 10 years ago
  1. No. The left/right menu must be kind of UITableViewController
  2. You can change tableView's content inset in viewDidLoad method of your left/right menu.
    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0 && ![UIApplication sharedApplication].isStatusBarHidden)
    {
       self.tableView.contentInset = UIEdgeInsetsMake(20, 0, 0, 0);
    }
    
shinvou commented 10 years ago

Thank you very much, your SlideMenu and your answers help me a lot. Keep up the good work!

arturdev commented 10 years ago

Welcome! :)