穏やかな!私は自分が何をしているのか漠然としか理解していません。
別のアプリケーションに送信される前にファイル名が変更されることを期待して、UIDocumentInteractionController の Name プロパティを設定しようとしています。私はこれを達成するために以下を使用しています:
UIDocumentInteractionController *documentController;
NSString *docDir = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSURL *soundFileURL = [NSURL fileURLWithPath:[docDir stringByAppendingPathComponent:
[NSString stringWithFormat: @"%@/%@", kDocumentNotesDirectory, currentNote.soundFile]]];
NSString *suffixName = @"";
if (self.mediaGroup.title.length > 10) {
suffixName = [self.mediaGroup.title substringToIndex:10];
}
else {
suffixName = self.mediaGroup.title;
}
NSString *soundFileName = [NSString stringWithFormat:@"%@-%@", suffixName, currentNote.soundFile];
documentController = [UIDocumentInteractionController interactionControllerWithURL:(soundFileURL)];
documentController.delegate = self;
[documentController retain];
documentController.UTI = @"com.microsoft.waveform-audio";
documentController.name = @"%@", soundFileName; //Expression Result Unused error here
[documentController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
次の行で「Expression Result Unused」エラーが発生します。
documentController.name = @"%@", soundFileName;
私はこれを理解しようとして気が狂っています。任意の支援をいただければ幸いです。