0

私が取り組んでいるアプリがあり、ロゴをもう少し長く表示しようとしていて、完了したらフェードアウト/スライドアウト/効果を出そうとしています。

これが私のセットアップです: 設定

タブ バー コントローラーでは、その中にイメージ ビューを配置できないため、それを配置するビューを作成しました。

ロゴを少しオンにしてフェードアウトさせ、ビュー (セグエ) をタブ バー コントローラーに自動的に切り替えようとしています。

これは私が得たものです: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」はセグエIDとして定義されています。

どうすればこれを修正できるかについてのアイデアはありますか?

4

1 に答える 1

1

修正するには、これを追加します

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

これをコードから削除します

(void)@selector(seguePerform:); // そしてあなたが持っていた他のすべての不要なセグエのもの

于 2013-10-02T03:24:33.633 に答える