I added one ViewController
to my project and created one class.
After I bind this class to my ViewController
.
In another controller I have method:
- (IBAction)login:(id)sender {
// How here I can do redirect to controller
ViewController
}
I added one ViewController
to my project and created one class.
After I bind this class to my ViewController
.
In another controller I have method:
- (IBAction)login:(id)sender {
// How here I can do redirect to controller
ViewController
}
If you want to comeback to the current ViewController later then use Navigation ViewController or else just use the presentedViewController of self(your current viewController)- no going back business, like they have previously illustrated.
For a simple block of execution(demo or practice) it's all the same but for a project application it completely matters to make the correct choice.
In the storyboard give your view controller an identifier (under the Attributes Inspector) then use the following code, to bring that view forward.
IF YOU WANT TO USE PUSH THEN USE THIS CODE
IF YOU WANT TO PRESENT THEN USE THIS CODE
Note: In UIViewController please enter your view controller name which you want to push into another view.
There are two ways to push view controllers in the application.
1) by Segue
2) By View controller identifier
1) By Segue :
2) By View controller identifier :