Reputation: 113747
I'm reading through the docs for UIPasteboard
, and it says that there are two main types of pasteboard, the "General Pasteboard", used for system-wide copy and paste, and the "Find Pasteboard" (UIPasteboardNameFind
). From the docs:
The Find pasteboard, which is used in search operations, holds the most recent string value in the search bar
If I enter text into the search bar in Safari, it doesn't get placed into the Find Pasteboard for another app. I'm wondering how the Find Pasteboard works, and what it's used for. I'm imagining that it's scope is inside an app or family of apps, but what's the difference from just using the UISearchbar
's text
property?
Here's the code I'm using to inspect it:
UIPasteboard *findPasteboard = [UIPasteboard pasteboardWithName:UIPasteboardNameFind create:NO];
NSLog(@"Find Pasteboard: %@", findPasteboard);
NSLog(@"Find Pasteboard items: %@", [findPasteboard items]);
Upvotes: 2
Views: 789
Reputation: 1022
iOS 10 deprecates every clipboard other than the general one; here is an answer for macOS:
The Find Pasteboard keeps the most recent find string entered in the findbar. (But not the address bar!) It's designed to complement the universal Command + F shortcut.
Here is an example scenario:
For developers, these are the implementation guidelines:
Upvotes: 1