I have several ppt slides included with the app I am currently working on. I would like for the TableView to list all of those ppt files, but am running into an issue. The NSArray always stays empty. Here is what I have in the viewDidLoad
If, NSUserDirectory is not where files are stored that the developer adds in, what is?
Code:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSUserDirectory, NSUserDomainMask, YES);
NSString *documentsDirectoryPath = [paths objectAtIndex:0];
NSFileManager *manager = [NSFileManager defaultManager];
self.title = @"Songs";
self.files = [[[manager contentsOfDirectoryAtPath:documentsDirectoryPath error:nil] pathsMatchingExtensions:[NSArray arrayWithObjects:@"ppt", nil]] retain];
self.navigationItem.rightBarButtonItem = self.editButtonItem;
[self.tableView reloadData];
[super viewDidLoad];
[super viewWillAppear:animated];