Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get all names of iOS UIPasteboard?

To instantiate UIPasteboard, a name is needed. But I want to know all names of UIPasteboard. Are there any way to know all names of UIPasteboard?

For example, if the name of pasteboard is already known, following is enough.

UIPasteboard* pb = [UIPasteboard pasteboardWithName:[NSString stringWithFormat:@"NameOfPasteboard"];

But the name may be dynamically generated string with prefix. In such case, I want to know all names which has the same prefix.

like image 546
Takayuki Sato Avatar asked Nov 19 '25 22:11

Takayuki Sato


1 Answers

To use UIPasteBoard with any generic content type in an inter-application manner, a name is not required, rather a call to +[UIPasteBoard generalPasteboard], which returns the pasteboard that accepts most any kind of content you provide in a copy-paste operation. If you would like to use the initializer that requires a name, pass in UIPasteboardNameGeneral to achieve the same effect as above.

like image 164
CodaFi Avatar answered Nov 22 '25 13:11

CodaFi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!