I make a transition if I failed to load the data, I get into the loop and gives a warning: Warning!
In this case, the transition does not work.

PS The same transition works when you press a button.

@implementation ViewControllerTable - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. // Загрузка _lineNameProfile = [[NSUserDefaults standardUserDefaults] stringForKey:@"lineNameProfile"]; _linePassword = [[NSUserDefaults standardUserDefaults] stringForKey:@"linePassword"]; if(_lineNameProfile.length == 0){ ViewController *viewControllerConnect = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewControllerConnect"]; [self presentViewController:viewControllerConnect animated:YES completion:nil]; } } 

    1 answer 1

    viewDidLoad is called when vc.view has just been created. It may not be added to the screen yet. Replace this method with viewWillAppear (called before displaying the current controller). Or on viewDidAppear, animation can be so beautiful.

    PS: when you press a button, the controller is already created, loaded and added to the screen. In this case, it is already possible to fully work with the child controllers.