简体   繁体   中英

How to make a textField or UILabel by long press,make it can be “copy”, but not to edit

As the title, how to make a UILabel or UITextField long press can be copy, but not edit?

I show the pic:

这是复制状态

I have tested the UITextField , even so long press it can make it be copy, but it also can be edit, such as delete some words, or can add some words, which is not required.

Here is what I found for UILabel: https://github.com/alexandreos/UILabel-Copyable

install via cocoapods: pod 'UILabel+Copyable', '~> 1.0.1'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM