开发者

Make a Label Copyable

开发者 https://www.devze.com 2023-03-03 22:47 出处:网络
I\'m developing a WebApp for iOS which has a Label that will show a result for the user that should be copied开发者_JS百科 for further use, but how I can make the Label content copyable?u could add a

I'm developing a WebApp for iOS which has a Label that will show a result for the user that should be copied开发者_JS百科 for further use, but how I can make the Label content copyable?


u could add a copy button near the label, when the user tapps it, the value of the label is stored in a var and could be inserted at another point of the application...

or, if u want the labeltext in the clipboard, u could use this: http://mobileorchard.com/new-in-iphone-30-tutorial-series-part-3-copy-paste-with-uipasteboard/

u can get the text from the label via mylabeloutlet.text and store it in the pastboard, so the user can insert it into another textfield/inputfield

0

精彩评论

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