CodaFi
CodaFi

Reputation: 43330

Searching both document directory and main bundle

A uitableview (aqgridview) must display a title string based on the name of the document at a certain position in the grid. The name obviously corresponds to the name of the file in either directory. But my problem is that I defined a static NSString of 4 documents in my bundle, and I can easily get their titles. But I want to get the names of the files contained in both my app bundle and of the documents directory. When I load my app with something from the documents directory, it just keeps repeating the 4 static string titles. Code available on request.

Upvotes: 0

Views: 113

Answers (1)

ott--
ott--

Reputation: 5722

Use a NSDirectoryEnumerator together with the NSFileManager method enumeratorAtPath to get the filelists from the resource and the doc dir.

Upvotes: 1

Related Questions