I want to make a launch screen
with a animating view
so for that i have to use story board or a xib/nib
because that is not possible by using Apple's default launchScreen
.
But when I going to do this use a xib as launch screen there is anerror
like launch screen may not have connections
.
There is any other way to use a xib or storyboard as a launchScreen
.
Any help will be appreciate.
Asked
Active
Viewed 107 times
0

Subhash Sharma
- 745
- 6
- 24
-
The following link may help you: http://stackoverflow.com/questions/27998284/launch-image-or-launch-xib-storyboard – Parth Patel Sep 18 '15 at 08:59
4 Answers
1
You cannot create launch screen with animation but you can create a fake splash screen view controller and add animation on it:
Here is a sample project in which I used LaunchScreen.storyboard
as... launch screen and in which I created a FakeSplashScreenViewController
in Main.storyboard
. This view controller is the root of my window. I put an animation in the viewDidLayoutSubviews
:
[super viewDidLayoutSubviews];
[UIView animateWithDuration:3.f
animations:^{
self.myView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); // implement your anim here
} completion:^(BOOL finished) {
// Change the root view controller
UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
UIApplication *application = [UIApplication sharedApplication];
AppDelegate* appDelegate = application.delegate;
appDelegate.window.rootViewController = vc;
}];

Y.Bonafons
- 2,329
- 13
- 20
-
I ran it without any problem on XCode 7 (and simulator on iOS 9). What are the errors ? – Y.Bonafons Sep 18 '15 at 12:24
0
No, it is impossible to make by standard tools.
You may create simple screen, show animation, load remote info and call segue.
I choose this way.

Alexmelyon
- 1,168
- 11
- 18
0
You can use a view controller instead and do what ever you want to do with it. but you have to first change Main Interface from LaunchScreen.xib to Main.

Syed Faraz Haider Zaidi
- 1,367
- 14
- 39
-1
You can use below code . It may help you.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if(isAnimationShow)
{
//do code for show animation in ViewController file.
ViewController *objlogin = [STORY_BOARD instantiateViewControllerWithIdentifier:@"ViewControllerVC"];
[self pushViewController:objTimeSheetVC];
}
else
{
HomeVC *demoViewController = [STORY_BOARD instantiateViewControllerWithIdentifier:@"HomeVC"];
[self pushViewController:objTimeSheetVC];
}
}

Hardik Shekhat
- 1,680
- 12
- 21