How can I designate an original view using AMSlideMenu without using a table row?

68 views Asked by At

Right now, my initial view just opens up as whatever view controller is connected to the 0th row index for my left menu. This happens to be the home page for the app. How can I uncouple this from the table/menu? I want to create a home page that will load initially, but I do not want to use up a row in my menu. I still want to be able to pull up the menu to go to other parts of the app though and then have a separate home button. I'm using the storyboard version of AMSlideMenu. I've tried rearranging the home view controller, so that it comes before the menu in my storyboard to no avail. The app just gets a thread error and crashes. Can someone please tell me how to do this properly?

1

There are 1 answers

0
user3576382 On

You can override the following methods in MainVC.m

  • (NSIndexPath *)initialIndexPathForLeftMenu;
  • (NSIndexPath *)initialIndexPathForRightMenu;

AMSlideMenuMainViewController.m This will change from 0 to any custom number you provide

- (NSIndexPath *)initialIndexPathForRightMenu
{
    return [NSIndexPath indexPathForRow:<50>  inSection:0];
}

RightMenuTVC.m

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    UINavigationController *nvc;
    UIViewController *rootVC;
    switch (indexPath.row) {
        case <50> :
        {

... }