I have a directory structure of directories and files that I want to render as a tableview in an iphone app. I'd rather have this generated dynamically rather than have to maintain a XML PLIST or whatever. i.e. replicate the Explorer functionality in windows开发者_运维技巧 where a user can traverse the structure and then select bundled image files for viewing.
Is there any way to do this? Any advice would be appreicated.
What specifically are you having trouble with?
You use NSFileManager
to access directory (listings) and files.
You use UITableView
to display tables.
Your view controller should use NSFileManager
to parse a given directory and display the results in a UITableView
.
精彩评论