ios - 切换跟控制器后。上一个控制器presentViewController子控制器的VIew还在。为什么?
PHPz
PHPz 2017-04-18 09:27:54
0
1
301
        UIViewController *red = [[UIViewController alloc]init];
        red.view.backgroundColor = [UIColor redColor];
        //当前控制器 presentViewController 一个子控制器
        [self presentViewController:red animated:YES completion:nil];
        
        [UIApplication sharedApplication].keyWindow.rootViewController = [[ViewController alloc]init];

        [[UIApplication sharedApplication].keyWindow sendSubviewToBack:[UIApplication sharedApplication].keyWindow.rootViewController.view];
        
        //在 ViewController 加载完毕后。red.view也在window中。为什么没有伴随上一个控制器一起被销毁呢?
PHPz
PHPz

学习是最好的投资!

répondre à tous(1)
刘奇
 [[UIApplication sharedApplication].keyWindow makeKeyAndVisible]
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal