presentViewController in AppDelegate with delay in iOS8

前端 未结 5 809
长发绾君心
长发绾君心 2021-02-02 10:02

So I had a full working solution in iOS7 that displays a LoginViewController via presentViewController in the AppDelegate\'s didFinishLaunching.

Basically I am doing so

5条回答
  •  不要未来只要你来
    2021-02-02 10:35

    I have a quick hacky fix:

    //Make a screenshot of the ViewController first, or use a real image if you want
    
    __block UIImageView *fakeImageView = [[UIImageView alloc] initWithImage:image];
    fakeImageView.frame = vc.view.frame;
    [self.view addSubview:fakeImageView];
    
    [self presentViewController:vc animated:animated completion:^{
        [fakeImageView removeFromSuperview];
        fakeImageView = nil;
    }];
    

    It is not good for long term, but can quickly fix this issue without changing too much code.

    Waiting for better solutions.

提交回复
热议问题