How can I delay splash launch screen programmatically in Swift Xcode iOS

后端 未结 6 1790
后悔当初
后悔当初 2021-01-31 19:01

I have put an image in imageView in LaunchStoreyboard. How can I delay the time of image programmatically?

Here is the Lau

6条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-31 19:56

    Create a ViewController and use NSTimer to detect the delay time. and when the timer ends push the first UIViewcontroller.

    In ViewDidLoad method..

    [NSTimer scheduledTimerWithTimeInterval:2.0 target:self selector:@selector(fireMethod) userInfo:nil repeats:NO];
    
    
    -(void)fireMethod
    {
    // push view controller here..
    }
    

提交回复
热议问题