小编jpd*_*jpd的帖子

找不到Xcode文件

我遇到了找不到文件的错误.

我已经添加了所有必需的文件,但它找不到文件的文件.

#import "MagickWand.h"
Run Code Online (Sandbox Code Playgroud)

对于上面的文件,它给出错误.

#import "FrameSection.h"
#import "FreeCropIphone5.h"
#import "DoodleView.h"
Run Code Online (Sandbox Code Playgroud)

请帮我.

xcode ios

6
推荐指数
2
解决办法
3万
查看次数

如何在iphone中检测来自麦克风而不是语音的打击?

我正在使用此代码来检测打击.

但我不能受到打击.我有声音

 NSURL *url = [NSURL fileURLWithPath:@"/dev/null"];
NSDictionary *settings = [NSDictionary dictionaryWithObjectsAndKeys:

                          [NSNumber numberWithFloat: 44100.0],                 AVSampleRateKey,
                          [NSNumber numberWithInt: kAudioFormatAppleLossless], AVFormatIDKey,
                          [NSNumber numberWithInt: 1],                         AVNumberOfChannelsKey,
                          [NSNumber numberWithInt: AVAudioQualityMax],         AVEncoderAudioQualityKey,
                          nil];

NSError *error;

recorder = [[AVAudioRecorder alloc] initWithURL:url settings:settings error:&error];

if (recorder) {
    [recorder prepareToRecord];
    recorder.meteringEnabled = YES;
    [recorder record];

    levelTimer = [NSTimer scheduledTimerWithTimeInterval: 0.3 target: self selector: @selector(levelTimerCallback:) userInfo: nil repeats: YES];
} else
    NSLog(@"error %@",[error description]);
Run Code Online (Sandbox Code Playgroud)

但声音没有打击.

iphone objective-c ipad

5
推荐指数
1
解决办法
1426
查看次数

标签 统计

ios ×1

ipad ×1

iphone ×1

objective-c ×1

xcode ×1