-(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。
感谢您的建议。