I'm using navigation controller:
So, from my first view to I go second view through push view controller
And form second view to I go third view through present model view controller
Now my problem is that, on third view I want to go fourth view through push view controller but nothing happen when I try to push for fourth view, what I do now?
I'm using this code
in my delegate.h file i make a property of navigation controller:
@property (strong, nonatomic) UINavigationController *navigationControler;
@property (strong, nonatomic) ViewController *loginViewController;
and in my delegate.m file:
self.loginViewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
self.navigationControler = [[UINavigationController alloc] initWithRootViewController:self.loginViewController];
self.window.rootViewController = self.navigationControler;
[self.window makeKeyAndVisible];
and when i go third view through presetmodelviewcontroller like this:
Redeem *redeem = [[Redeem alloc] init];
[self presentViewController:redeem animated:YES completion:nil];
and after reached to second view i want to go third view with push view like this
[self dismissViewControllerAnimated:YES completion:^(void){
MyPurchaseCards *mypurchase = [[MyPurchaseCards alloc] init];
[self.navigationController presentViewController:mypurchase animated:YES completion:nil];
}];
but nothing happen and also when i try to get all previous controller like this
NSArray *arr = self.navigationController.viewControllers;
NSLog(@"%@",arr);
but array show me null value. WHY?????