它显示我警告initWithDocPath没有找到时,我想私有目录内容..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;
}
loadScaryBugDocs'的一部分是什么类?你的'VideoNotepadViewController'是否在'@interface'中声明了'initWithDocPath:'方法? –
loadScaryBugDocs是videoDatabase类的一部分,initWithDocPath没有在该类中声明,因为我认为它不需要cos工作正常,没有声明该方法.... –
'VideoNotepadViewController'实际上是否有一个名为'initWithDocPath:'的方法?这个警告究竟说了什么? –