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

python - Alternative to referencing variable before assignment -

vb.net - How to ignore if a cell is empty nothing -

Sort a complex associative array in PHP -