0

我有一个正在开发的应用程序,我正在尝试将徽标打开一段时间,并在完成后淡出/滑出/效果。

这是我的设置: 设置

标签栏控制器不允许我在其中放置图像视图,因此我创建了一个视图来显示它。

我试图让徽标保持一段时间,淡出,然后自动将视图(Segue)切换到选项卡栏控制器。

这就是我从中得到的:http: //youtu.be/l4jL0BfpR2k

所以这是我的代码:

//
//  BDNLogoViewController.m
//  Bronydom Network
//
//  Created by name on 10/1/13.
//  Copyright (c) 2013 name. All rights reserved.
//

#import "BDNLogoViewController.h"
#import "BDNTabBarController.h"
#import "BDNFirstViewController.h"

@interface BDNLogoViewController ()

@end

@implementation BDNLogoViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}



- (void)viewDidLoad
{
    [super viewDidLoad];

    // Do any additional setup after loading the view.
    [UIView animateWithDuration:1 animations:^{
        _imageview.alpha = 0;
    }];

    //BDNTabBarController *viewController = [[BDNTabBarController alloc] init];
    //[self.navigationController pushViewController:viewController animated:YES];

    (void)@selector(seguePerform:);

}

- (void)seguePerform:(id)sender
{
    //BDNTabBarController *myNewVC = [[BDNTabBarController alloc] init];

    // do any setup you need for myNewVC

[self performSegueWithIdentifier:@"open" sender:sender];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

是的,“open”被定义为segue id。

你们对我如何解决这个问题有任何想法吗?

4

1 回答 1

1

要修复,请添加此

- (void) viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:YES];
    [self performSegueWithIdentifier:@"open" sender:self];
}

从您的代码中删除它

(void)@selector(seguePerform:); // 以及你拥有的所有其他不必要的 segue 东西

于 2013-10-02T03:24:33.633 回答