简体   繁体   English

我正在尝试使用SWRevealViewController在iOS中创建滑出菜单

[英]I am trying creating slide out menu in ios using SWRevealViewController

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if([segue isKindOfClass:[SWRevealViewControllerSegueSetController class]])
{
    SWRevealViewControllerSegueSetController *swSegue=(SWRevealViewControllerSegueSetController *)segue;
    swSegue.performBlock=^(SWRevealViewControllerSegueSetController* rvc_seque,UIViewController* svc,UIViewController* dvc)
    {
        UINavigationController *nav=(UINavigationController *)self.revealViewController.frontViewController;
        [nav setViewControllers:@[dvc] animated:NO];
        [self.revealViewController setFrontViewPosition:FrontViewPositionLeft animated:YES];
    };
}

} }

I have created slide out menu in ios using xcode 6.4 and using SWRevealViewController Class. 我已经使用xcode 6.4和SWRevealViewController类在ios中创建了滑出菜单。 I am writing above piece of code for navigation to desired view controller and but nothing happen there.Thanks 我正在编写上面的代码以导航到所需的视图控制器,但在那里什么都没发生。

Have you set a breakpoint in your prepareForSegue method? 您是否在prepareForSegue方法中设置了断点? Does it get called? 会叫吗? When it gets called, what's the class of the segue? 当它被调用时,segue的类别是什么? That would be the first thing you check, and without knowing the answer it is impossible to answer your question. 那将是您检查的第一件事,并且不知道答案就无法回答您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM