iphone - Which framework do I need to import for using NSOpenPanel class in Objective-C? -


i want open file dialog in application upload particular selected file onto server in objective-c. using following code in application, seems give error while creating object of nsopenpanel.

please me out.

nsopenpanel *openpanel = [nsopenpanel openpanel]; openpanel.title = @"choose .txt file"; openpanel.showsresizeindicator = yes; openpanel.showshiddenfiles = no; openpanel.canchoosedirectories = no; openpanel.cancreatedirectories = yes; openpanel.allowsmultipleselection = no; openpanel.allowedfiletypes = @[@"txt", @"jpg", @"jpeg", @"zip", @"png"];  [openpanel beginsheetmodalforwindow:appdelegate.controlswindow                   completionhandler:^(nsinteger result) {        if (result==nsokbutton) {            nsurl *selection = openpanel.urls[0];           nsstring* path = [selection.path stringbyresolvingsymlinksinpath];            //do file @ "path"        }    }]; 

nsopenpanel doesn't exist on ios. whole concept of files pretty hidden users in cases. what's end goal here? kind of "files" want upload server?

uikit has uiimagepickercontroller, can use select images photo library, instance.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -