Изменение ключевого окна не вызывает вид будет / не будет / появится
Когда я изменяю ключевое окно, rootViewController(s) не получают представление будет / действительно появилось / исчезнет.
SplashViewController *screenLockViewController = [[SplashViewController alloc] initWithNibName:@"SplashViewController" bundle:nil];
[self.splashWindow.rootViewController presentViewController:splashViewController animated:NO completion:nil];
[self.splashWindow makeKeyWindow];
__weak typeof(self) welf = self;
[UIView transitionWithView:self.window
duration:0.25
options:UIViewAnimationOptionTransitionNone
animations:^{
welf.window.alpha = 0.0f;
} completion:^(BOOL finished) {
[welf.window setHidden:YES];
}];
Обновление: вызвано вручную - beginAppearanceTransition: animated: and - endAppearanceTransition с /questions/7048944/pravilnoe-vremya-dlya-vyizova-viewdidappear-vruchnuyu/7048956#7048956
SplashViewController *screenLockViewController = [[SplashViewController alloc] initWithNibName:@"SplashViewController" bundle:nil];
[self.splashWindow.rootViewController presentViewController:splashViewController animated:NO completion:nil];
[self.window.rootViewController beginAppearanceTransition:NO animated:shouldAnimate]; // call view will disappear
[self.splashWindow makeKeyWindow];
__weak typeof(self) welf = self;
[UIView transitionWithView:self.window
duration:0.25
options:UIViewAnimationOptionTransitionNone
animations:^{
welf.window.alpha = 0.0f;
[welf.window.rootViewController endAppearanceTransition]; // call view did disappear
} completion:^(BOOL finished) {
[welf.window setHidden:YES];
}];