float seconds = audioPlayer.currentTime;
if ((seconds = 11)){
[self performSelector:@selector(viewController) withObject:nil];
} else {
if ((seconds = 23)){
[self performSelector:@selector(secondViewController) withObject:nil];
} else {
}
Anyidea如何以蓝色修复此消息,我只想查看audioplayer当前播放时间是否为11然后执行此操作或23然后执行此操作
答案 0 :(得分:4)
float seconds = audioPlayer.currentTime;
if (seconds == 11.0) {
// Do something
} else if (seconds == 23.0) {
// Do something else
} else {
// Do something else
}
答案 1 :(得分:1)
可能已经晚了,你只需要第二双眼睛,一直都在发生:)试试这个:
float seconds = audioPlayer.currentTime;
if ((seconds == 11.0)){
[self performSelector:@selector(viewController) withObject:nil];
} else {
if ((seconds == 23.0)){
[self performSelector:@selector(secondViewController) withObject:nil];
} else {
}