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; };