簡體   English   中英

AMSlideMenu iOS8崩潰

[英]AMSlideMenu ios8 crash

這是我的故事板鏈接 我已經實現了AMSlideMenu,就像在文檔中所寫的那樣。 我只想要右鍵菜單幻燈片。

我的MainVC.m-segueIdentifierForIndexPathInRightMenu

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

return identifier;
}

當我從第一個VC推送時-我收到此錯誤-[UITableViewController setMainVC:]:無法識別的選擇器發送到實例0x7af58250(由於xcode6 dsnt讓viewcontroller具有靜態tableview,所以我采用了tableviewcontroller,但是我已經通過viewcontroller完成也,但相同的錯誤和崩潰)

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

在AMSlideMenuMainViewController的Setup方法中出現錯誤-

- (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!
    }
}

我已經實現了segue名稱,並將其類設置為“ AMSlideMenuRightMenuSegue”,並將其名稱設置為AMSlidemenuMainVC的“ rightMenu”-segue CustomClass,然后將其進一步的標識符設置為“ firstRow”和“ secondRow”,並將類設置為“ AMSlideMenuContentContentSegue”

任何幫助表示贊賞

正如我在文檔中提到的

  1. 對於右鍵菜單:在您的情節提要中添加一個UITableViewController,並將其類命名為從AMSlideMenuRightTableViewController繼承的任何類。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM