【发布时间】:2012-03-16 06:23:49
【问题描述】:
关于我自己的问题, UITable is not getting populated with NSMutableArray 在这里,我将所有文件名放入一个表中。这些文件存储在“资源”文件夹中。现在我需要从存储在 ios 模拟器的文档文件夹中的子文件夹中的文件中填充同一张表。 早些时候我用下面的代码做到了这一点
files = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:
[[NSBundle mainBundle] bundlePath] error:nil];
search_results_array = [files filteredArrayUsingPredicate:
[NSPredicate predicateWithFormat:@"self BEGINSWITH[cd] 'h'"]];
这里的 files 和 search_results_array 都是数组。现在阅读不是来自资源。我该如何编辑它?请任何人帮忙。
【问题讨论】:
标签: xcode nsarray nspredicate nsbundle