开发者

Dynamically create hierachical tableview from file structure

开发者 https://www.devze.com 2022-12-25 18:33 出处:网络
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 what

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号