I know that this is a really simple question but I am getting nowhere.
I have a storyboard and all the view controllers are opened using segues which is fine, but I would like to open one of them using code when the button is pressed.
What is the line for opening the view controller called ViewControllerMonitorMenu
when the testSliders
button is pressed:
- (IBAction)testSliders:(id)sender
{
}
I have finally got it. Thanks for everyone's help:
ViewControllerMonitorMenu *monitorMenuViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewControllerMonitorMenu"];
[self presentViewController:monitorMenuViewController animated:NO completion:nil];
This code programatically created object of ViewControllerMonitorMenu
and also you can go on it.
- (IBAction)testSliders:(id)sender
{
ViewControllerMonitorMenu * object = [[ViewControllerMonitorMenu alloc] init];
[self presentViewController:object animated:YES completion:nil];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With