I have a LoginView and in success of login I am loading Slideout menu view (SWRevealViewController) .
I am using the following to load reveal view controller with front view(Dashboard) and rear view (slidebarView) !
AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
SWRevealViewController *viewController1 = (SWRevealViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:@"next"];
[appDelegate.window setRootViewController:viewController1];
In Rear view where we have menu (Appointments, mystylist ,Barbers , Locate me and Settings ) .
In Settings we have 3 option and 3 different view controller . When i am pushing from settingsViewController to generalViewController, it loads login view controller's method !
I am using this to push !
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
NSLog(@"%@",[List objectAtIndex:indexPath.row]);
//
if (indexPath.row==0) {
UIStoryboard * storyboard = self.storyboard;
generalViewController * detail = [storyboard instantiateViewControllerWithIdentifier:@"General"];
[self.navigationController pushViewController: detail animated: YES];
}
}
Because of this , all method in loginViewController is being called !
Please help me out of this problem . How to push a viewController from frontViewController of revealViewController ?
Thanks in Advance !