Is there any way to access this without creating a new instance? As I want to perform a segue using:
[self performSegueWithIdentifier:@"loginSegue" sender:sender];
However if I try and create an instance, the compiler says that the segue doesn’t exist. The reason I have to create a new instance is because I’m calling a method of the ViewController class from another class. Is there a way to run the method from the instance that is created in the first place?
Are you creating
UIViewControllerinstance using[UIStoryboard instantiateViewControllerWithIdentifier:]method? If you instantiate with alloc-init, it will not instantiate the instance from storyboard, so it will not connect to the segue.Here is reference to UIStoryboard class.
http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIStoryboard_Class/Reference/Reference.html