开发者

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];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜