initWithDocPath не найден - PullRequest
       1

initWithDocPath не найден

1 голос
/ 17 ноября 2011

показывает предупреждение, что 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 Ответ

1 голос
/ 17 ноября 2011

Вам необходимо реализовать метод initWithDocPath: в VideoNotepadViewController.Apple не предоставляет метод с таким именем.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...