1

播放声音后,我需要启动计时器,有人可以帮我吗?我写了一段声音和时间同时运行的小代码

    CFBundleRef mainBundle = CFBundleGetMainBundle();
    CFURLRef soundFileURLRef;
    soundFileURLRef = CFBundleCopyResourceURL(mainBundle, (CFStringRef) @"song", CFSTR ("wav"), NULL);
    UInt32 soundID;
    AudioServicesCreateSystemSoundID(soundFileURLRef, &soundID);
    AudioServicesPlayAlertSound(soundID);



    [sender setTitle:@"RUNNIG 2P" forState:UIControlStateNormal];
    milliSecTimer1 =[NSTimer scheduledTimerWithTimeInterval:0.1
                                                     target:self
                                                   selector:@selector(countUp1)
                                                   userInfo:nil
                                                    repeats:YES];
4

0 回答 0