Cocoa - 4.6播放一点声音后启动计时器

时间:2013-02-18 20:08:39

标签: cocoa audio timer

播放声音后我需要启动计时器,任何人都可以帮助我吗?我写了一些声音和时间同时运行的代码

    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];

0 个答案:

没有答案