有没有办法做到这一点?我在启动时注册我的对象UIPasteboardChangedNotification
,但是当它发送到后台并打开(例如)Safari并复制一些文本时,我的处理程序永远不会被调用。 (我现在只用模拟器)。在后台接收UIPasteboard(generalPasteboard)通知
我用两个:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(pasteboardNotificationReceived:)
name:UIPasteboardChangedNotification
object:[UIPasteboard generalPasteboard]];
和:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(pasteboardNotificationReceived:)
name:UIPasteboardChangedNotification
object:nil ];
登记自己的处理程序。
你有没有得到这个解决?我也试图做到这一点。 http://cl.ly/69a4如果你找到了答案,你愿意介意与我分享吗? – Frankrockz 2011-04-20 16:45:04