飞溅动画imageview显示标签栏

时间:2013-12-11 18:15:25

标签: ios objective-c uitabbarcontroller

我需要在动画完成后显示标签栏控制器,但我不知道如何做到这一点我尝试使用if(!AnitmationimageView.isAnimating),同时或者做但不起作用

这是我的代码:

-(void)viewDidLoad{

    [self.tabBarController.tabBar setHidden:YES];

    AnitmationimageView.animationImages = [NSArray arrayWithObjects:

                                           [UIImage imageNamed:@"splash1.jpg"],

                                           [UIImage imageNamed:@"splash2.jpg"],

                                           [UIImage imageNamed:@"splash3.jpg"],

                                           [UIImage imageNamed:@"splash4.jpg"], nil];

    [AnitmationimageView setAnimationRepeatCount:1];

    AnitmationimageView.animationDuration = 3;
    [self.view addSubview:Loadimageview];
    [self.view addSubview:AnitmationimageView];




    [AnitmationimageView startAnimating];

    //Her need something taht when animation finished show tabBar

    [self.tabBarController.tabBar setHidden:NO];




    if (imagenview.frame.size.height == 432) {
        array = [NSArray arrayWithObjects:@"museo1@4.jpg",@"museo2@4.jpg",@"museo3@4.jpg",@"museo4@4.jpg",@"museo5@4.jpg", nil];
    } else if (imagenview.frame.size.height == 518) {
        array = [NSArray arrayWithObjects:@"museo1@5.jpg",@"museo2@5.jpg",@"museo3@5.jpg",@"museo4@5.jpg",@"museo0@5.jpg", nil];
    }

}

1 个答案:

答案 0 :(得分:0)

解决方案1:

// In the animation setup code
[UIView setAnimationDelegate:self];


// this animation delegate method gets called when the animation is done.
-(void)myAnimationStopped:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
{ 
     [self.tabBarController.tabBar setHidden:NO];
}

解决方案2:

// In the animation setup code
[UIView setAnimationDidStopSelector:@selector(showTabBar)];


// This gets called when the animation is done.
- (void)showTabBar
{
     [self.tabBarController.tabBar setHidden:NO];
}