I am following the tutorial at HeadsUpUI
I just want to add extra function such as if I click on play or pause button from the hover, I will move to another view controller called NextViewController.
What I did is
1.- (IBAction)rightAction:(id)sender{
- // user touched the right button in HoverView
- [self showHoverView:NO];
- NextViewController *controller = [[NextViewController alloc] initWithNibName:@”NextViewController” bundle:nil];
- [self.navigationController pushViewController:controller animated:YES];
}
After clicking on either pause or play button, nothing happens at all. However, if i replace line 5 by
[self presentModalViewController:controller animated:YES];
and it works.
Can somebody advice me if you know what the problem is. Any comments are welcomed here.
There is no navigation controller, so you cannot ask it to push a new view controller. Any view controller can present a modal view controller, which is why your second example works.