1 -(IBAction)btnRegisterClicked:(id)sender 2 { 3 if(secondViewController==nil) 4 { 5 secondViewController = [[SecondViewController alloc] initWithNibName:nil bundle:nil]; 6 } 7 8 [self.view.superview addSubview:secondViewController.view]; 9 [self.view removeFromSuperview]; 10 }