是否可以将动画视图用作launchScreen?

时间:2015-09-18 08:48:26

标签: ios objective-c storyboard xib launch-screen

我想使用launch screen制作animating view,因此我必须使用story board or a xib/nib因为使用Apple's default launchScreen无法做到这一点。 但是当我这样做时,使用xib作为启动画面,有一个error,如launch screen may not have connections。 还有其他方法可以将xib或storyboard用作launchScreen。 任何帮助将不胜感激。

4 个答案:

答案 0 :(得分:1)

您无法使用动画创建启动画面,但您可以创建虚假的闪屏视图控制器并在其上添加动画:

Here是一个示例项目,我在其中使用$scope.data = [ { a: 'some stuff', b: 'other stuff', c: 123, d: 'I am text' }, { a: 'next object', b: undefined, c: 999, d: 'Written in stone' }, { a: 'Cool', b: 'table', c: 13.2354, d: 'I am text' } ]; $scope.displayedColumns = [ { property: 'a', title: 'The A column' }, { property: 'b', title: 'The B column' } ]; 作为...启动画面,我在LaunchScreen.storyboard中创建了FakeSplashScreenViewController。这个视图控制器是我窗口的根。我在Main.storyboard

中放了一个动画
viewDidLayoutSubviews

答案 1 :(得分:0)

不,不可能通过标准工具制作 您可以创建简单的屏幕,显示动画,加载远程信息并调用segue 我选择这种方式。

答案 2 :(得分:0)

您可以使用视图控制器,并执行您想要的操作。但您必须先将主界面从LaunchScreen.xib更改为Main。enter image description here

答案 3 :(得分:-1)

您可以使用以下代码。它可能对你有帮助。

- (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];
         }
}