I did a cocoa application in which the file dialog box is opening when a button is tapped with the use of NSOpenPanel controller in cocoa applications.For ipad applications we are using UISplitViewController.
I want to know that for developing the applications in iphone,what controller to be used for opening a file dialog box when a button is tapped.
For example in composing a mail.In composing a mail,if we want to attach any files from the local drive,we click the “Attach a File” button. Then it will opens a file open dialog box for selection of file what we want.
Can any one help me or suggest me what controller to be used for opening a file in iphone applications?For opening a file dialog box ,in
cocoa applications ——— Controller used is NSOpenPanel
ipad applications ——— Controller used is UISplitViewController
Like wise for i phone applications ——- ??????
Please help me out of this?
iOS doesn’t have a concept of browsing arbitrary local files.
It does have the ability to browse for images from the photo library — for that you can use
UIImagePickerController.Other than photos, the only files you can even open are ones that are inside your own sandbox folder (i.e. ones that you’ve put there yourself). There isn’t a built in view controller that will display them — you’d have to write your own that will read the list of files using something like
NSFileManager contentsOfDirectoryAtPath:error:, and display them in an appropriate UI.