I am not using LaunchScreen.xib . I am using storyboard for splashscreen. I am calling an API to get the splash image . I am doing this in app delegate. I am able to display the image on my view controller,but I couldnt able to go to another controller once i display my image.
Here is what I have in AppDelegate:
-(void)connectionDidFinishLoading:(NSURLConnection *)connection{
self.window.frame=CGRectMake(0, 200, 100,30);
[self.window addSubview:[self convertImage: image]];
//upto here everything is fine
//now i am trying to wait for 3 seconds and call another view controller
sleep(3);
ViewController *login=[[ViewController alloc]initWithNibName:@"Login" bundle:nil];
[self presentviewcontroller:....]; // not able to present another controller
}
You could use:
[[self window].rootViewController presentViewController:login animated:YES completion:nil];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With