找不到initWithDocPath

时间:2011-11-17 07:30:15

标签: iphone warnings

它向我显示警告,当我想获取私人目录内容时,找不到initWithDocPath ..

+ (NSMutableArray *)loadScaryBugDocs {
      NSString *documentsDirectory = [VideoDatabase getPrivateDocsDir];
 NSError *error;
 NSArray *files =[NSFileManagerdefaultManager]contentsOfDirectoryAtPath:documentsDirectory error:&error];
if (files == nil) {
    return nil;
}
NSMutableArray *retval = [NSMutableArray arrayWithCapacity:files.count];
for (NSString *file in files) {
    if ([file.pathExtension compare:@"scarybug" options:NSCaseInsensitiveSearch] == NSOrderedSame) {
        NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:file];
        VideoNotepadViewController *doc = [[[VideoNotepadViewController alloc] initWithDocPath:fullPath] autorelease];
//shows warning here 
        [retval addObject:doc];
    }
}

return retval;

}

1 个答案:

答案 0 :(得分:1)

您需要在initWithDocPath:中实施VideoNotepadViewController方法。 Apple没有提供该名称的方法。