detectValuesForPatterns:completionHandler:
Determines whether the first pasteboard item matches the specified patterns, reading the contents if it finds a match.
Declaration
- (void) detectValuesForPatterns:(NSSet<NSString *> *) patterns completionHandler:(void (^)(NSDictionary<NSString *,id> *, NSError *)) completionHandler;Parameters
- patterns:
The patterns to detect on the pasteboard.
- completionHandler:
A block that the system invokes after detecting patterns on the pasteboard. The block takes a
Resultparameter that contains either a dictionary with the patterns found on the pasteboard or an error if detection failed. If theResultinstance contains a dictionary, the keys specify the matched pattern, and the value specifies the content of the pasteboard.
Discussion
For details about the types returned for each pattern, see UIPasteboard.DetectionPattern.