不显示UIViewControllers

时间:2012-03-19 21:38:27

标签: iphone

-(void)playpauseAction:(id)sender 
{
    if([audioPlayer isPlaying]){
        [sender setImage:[UIImage imageNamed:@"play.png"] forState:UIControlStateSelected];
        [audioPlayer pause];
    } else {
        [sender setImage:[UIImage imageNamed:@"pause.png"] forState:UIControlStateNormal];
        [audioPlayer play];
        [self performSelector:@selector(displayviewsAction:) withObject:nil];
    }  
}

- (void)displayviewsAction:(id)sender 
{
    float seconds = audioPlayer.currentTime;

    if (seconds == 11.0){
        [self performSelector:@selector(FirstViewController) withObject:nil]; 
    } else {
        if (seconds == 23.0){
            [self performSelector:@selector(secondViewController) withObject:nil];  
        }
    }
}

-(void)FirstViewController {
    FirstViewController *viewController = [[FirstViewController alloc] init];
    viewController.view.frame = CGRectMake(0, 0, 320, 480);
    [self.view addSubview:viewController.view];
    [self.view addSubview:toolbar];
    [viewController release];
}

Anyidea为什么它没有显示Firstviewcontroller和secondviewcontroller。

感谢您的建议。

0 个答案:

没有答案