我有一个正在处理的应用程序,我正在尝试将徽标打开更长时间,并在完成后淡出/滑出/效果。
这是我的设置:
标签栏控制器不允许我在其中放置图像视图,因此我创建了一个视图以将其打开。
我试图让徽标保持一段时间,淡出,然后自动将视图(Segue)切换到Tab Bar控制器。
这就是我从中获得的: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
是的,“打开”被定义为segue id。
你们对我如何解决这个问题有什么想法吗?
答案 0 :(得分:1)
要修复,请添加此
- (void) viewDidAppear:(BOOL)animated
{
[super viewDidAppear:YES];
[self performSegueWithIdentifier:@"open" sender:self];
}
从代码中删除
(无效)@selector(seguePerform :); //以及你拥有的所有其他不必要的东西