0

I'm using an open source class for sliding the view. The slide function works perfectly when the app launches, but when I change the view or call the segue method, and then come back to HomeViewController, the slide function stops working. It only works when the HomeVC is launched for the first time. Please help me here.

In AppDelegate.m file :

didFinishLaunchingWithOptions method is as below:

UIStoryboard *storybrd = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
HomeViewController *controller = [storybrd instantiateViewControllerWithIdentifier:@"ViewController2"];

// setup slide navigation view controller instance
MWFSlideNavigationViewController * slideNavCtl = [[MWFSlideNavigationViewController alloc] initWithRootViewController:controller];    
// slideNavCtl.panEnabled = YES;

self.window.rootViewController = slideNavCtl;
[self.window makeKeyAndVisible];
return YES;

didSelectRowAtIndexPath method is as below:

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

if(tableView == self.tableView1)
{




[self performSegueWithIdentifier: @"CommVC"
                          sender: self];
}}

prepareForSegue method is as below:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {

    CoViewController *destination =
    [segue destinationViewController];


    destination.name = _name;

 };
4

1 回答 1

0

也许当你改变viewController你做 amodalPresentation而不是做 a push。所以基本上幻灯片不起作用,因为它不再有navigationControllerasrootviewController了。

当你改变视图时,请显示你在那里做什么。

于 2013-07-06T18:26:58.103 回答