2014-09-02 78 views

回答

0

如果您正在遵循该教程,您可以在动画完成后像下面那样简单地按下所需的视图控制器。只需将您的delay3方法替换为此处的方法,并替换您想要推送的视图控制器。

步骤 -

  1. 导入在你所写的电流实现文件的视图控制器头文件 - (无效)DELAY3方法如下图所示。

    #import "ViewController.h"

  2. 检查下面的图片,并与一个在你的故事板更换pushNewScreen方法的ID。

enter image description here

- (void)delay3 { 
    [UIView beginAnimations:nil context:NULL]; 
    [UIView setAnimationDuration:1.0];//you can change animation time here. 
    [Loadingimageview setAlpha:1.0]; 
    [UIView commitAnimations]; 

    // this method will call after 1 second you can change delay here. 
    [self performSelector:@selector(pushNewScreen) withObject:nil afterDelay:1.0]; 
} 

- (void)pushNewScreen { 
    ViewController *newView = [self.storyboard instantiateViewControllerWithIdentifier:@"storyBoardIdentifier"]; 
    [self.navigationController pushViewController:newView animated:YES]; 
} 
+0

它从来没有工作过?它在延迟3加载之后没有任何作用 – 2014-09-02 19:40:38

+0

以及通过替换您想要推送的视图控制器的含义是什么?我很抱歉,但非常感谢你的帮助! – 2014-09-02 19:50:52

+0

编辑答案。如果这没有帮助,你可以给我发送代码。 – 2014-09-03 04:33:25