I have create two view controller onto storyboard I wanted to go from one view controller to another view controller programmatically. I have create a button in one view controller. I know it very easy to go from one view controller to another just drag line from button from oneviewcontroller to second view controller. but I want to do it programmatically because I have if and else conditions in button when if condition true then I want to move it to next view controller this is the code.
-(IBAction)loadView:(id)sender {
if([username.text isEqualToString:@"adnan"] && [password.text isEqualToString:@"bhatti123"] )
{
// here I want to write that code which reach me to second view controller which I implement on storyboard
}
else
{
}
}