点击不播放的声音?

时间:2012-01-04 17:07:32

标签: objective-c

我有一个按钮但是当我点击它时没有声音?有谁知道问题是什么?

-(IBAction)plus {

    NSString *path = [[NSBundle mainBundle] pathForResource:@"beep-7" ofType:@"wav"];
    AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];
    theAudio.delegate = self;
    [theAudio play];

        }

0 个答案:

没有答案