iOS如何监控剪贴板内容

时间:2017-12-22 09:04:49

标签: ios

RT:如何监控剪贴板内容?

[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(addword:) name:UIPasteboardChangedNotification object:[UIPasteboard generalPasteboard]];

[[UIPasteboard generalPasteboard] addObserver:self forKeyPath:@"string" options:NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld context:nil];

我尝试使用通知和kvo方式来找到无法实现的

0 个答案:

没有答案