iOS: displaying filename once file is selected
I have a table cell which, once clicked, opens the file browser and lets me select a file to be uploaded to a server. The problem is, I'm unable to find a way to display the name of whatever was selected. For now, I just display "file selected" 开发者_StackOverflow社区and do the upload, but I'd really like to be able to display the file name. Is there a way to do this?
well, not knowing exactly how you do what you are doing, all i can say is, if you use the NSString object that represents the url/path of the object you can use
NSString *name = [objectURL lastPathComponent];
精彩评论