Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ischolar

macrumors newbie
Original poster
Oct 17, 2010
3
0
Hello!

Would like to know if there is a way to build an interface where the end user should be able to browse the files/directories of iphone device and select a file.

Something similar to hit "browse" button and browsing for file then selecting a file as attachment in a mail client and hit "attach".

Any references to study more on this and if anyone has come across such requirements to build in the interface???

Thanks
 
You only have access to your own sandboxed area of the filesystem: you cannot open or view files from outside that area.
 
Yeah I get your point.

The file needs to be selected resides within the sandboxed area of the filesystem so that it is accessible by the app.

Any ideas?
 
From that point you are on your own: Apple do not provide any browser/file selector. I'd suggest using NSFileManger to list the directory contents and a UITableView to display/drill down as required.
 
Apple doesn't want UIs that resemble desktop file pickers. You should look at other apps and UIs that display "documents" and allow the user to choose from among them. This includes the photos app, ebooks, even iTunes on the desktop. The point is that many of these apps don't show a tableview or scrolling list of files. They don't show file extensions. The iPad apps tend to show a grid of icons that represent the documents. The grid does scroll because you can't fit all the documents on the screen at once. Typically they're not hierarchical, although some are. They just show a flat "list" of the "documents" with each document represented by an icon. Consider also Cover flow as a way of scrolling through a list of documents. Some apps like Air Sharing and the like do show a hierarchical tableview of files, but these apps are very file oriented rather than being more document oriented.

Anyway there are a lot of options.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.