0

Here is my storyboard link. I have implemented AMSlideMenu as it was written in Documentation. I only want the Right menu slide.

My MainVC.m - segueIdentifierForIndexPathInRightMenu

  - (NSString *)segueIdentifierForIndexPathInRightMenu:(NSIndexPath *)indexPath
{
NSString *identifier = @"";
switch (indexPath.row) {
    case 0:
        identifier = @"firstRow";
        break;
    case 1:
        identifier = @"secondRow";
        break;
}

return identifier;
}

When i am pushing from the first VC - I am getting this error - [UITableViewController setMainVC:]: unrecognized selector sent to instance 0x7af58250 (As xcode6 dsnt let viewcontroller have static tableview, so i took a tableviewcontroller, but i have done it with viewcontroller also, but same error and crash)

[UITableViewController setMainVC:]: unrecognized selector sent to instance 0x7af58250

The error is hitting in the Setup method of AMSlideMenuMainViewController -

- (void)setup
{
self.view.backgroundColor = [UIColor blackColor];

self.isInitialStart = YES;

self.tapGesture = [[UITapGestureRecognizer alloc] init];
self.panGesture = [[UIPanGestureRecognizer alloc] init];

[self.tapGesture addTarget:self action:@selector(handleTapGesture:)];
[self.panGesture addTarget:self action:@selector(handlePanGesture:)];

self.tapGesture.cancelsTouchesInView = YES;
self.panGesture.cancelsTouchesInView = YES;

self.panGesture.delegate = self;


#ifndef AMSlideMenuWithoutStoryboards    
if ([self primaryMenu] == AMPrimaryMenuLeft)
{
    @try
    {
        [self performSegueWithIdentifier:@"leftMenu" sender:self];

        @try {
            [self performSegueWithIdentifier:@"rightMenu" sender:self];
        }
        @catch (NSException *exception) {

        }
    }
    @catch (NSException *exception)
    {
        [self performSegueWithIdentifier:@"rightMenu" sender:self];
        NSLog(@"WARNING: You setted primaryMenu to left , but you have no segue with identifier 'leftMenu'");
    }
}
else if ([self primaryMenu] == AMPrimaryMenuRight)
{
    @try
    {
        [self performSegueWithIdentifier:@"rightMenu" sender:self];

        @try {
            [self performSegueWithIdentifier:@"leftMenu" sender:self];
        }
        @catch (NSException *exception) {
            [self performSegueWithIdentifier:@"leftMenu" sender:self];
        }
    }
    @catch (NSException *exception)
    {
       //CODE GETTING EXCEPTION , CRASHING HERE!
    }
}

I have implemented the segue names and set its class to "AMSlideMenuRightMenuSegue" and its name as "rightMenu" for the AMSlidemenuMainVC - segue CustomClass and then as furthur identifier as "firstRow" and "secondRow" and class as "AMSlideMenuContentSegue"

Any help is appreciated

Saheb Roy
  • 5,899
  • 3
  • 23
  • 35

1 Answers1

0

As I mentioned in documentation

  1. For Right Menu: Add a UITableViewController to your storyboard and name it's class to any class that inherits from AMSlideMenuRightTableViewController.
arturdev
  • 10,884
  • 2
  • 39
  • 67