문제

Is there some developer tool or other open source app that allows us to peek the current contents of the (or, rather: any) NSPasteboard instance?

Browsing through the Xcode directories (contents of the /Developer folder before Xcode 4) doesn't turn up anything that looks useful.

We're currently developing the copy and paste feature for our app and some way to conveniently debug what's currently in the pasteboard would be invaluable and would save heaps of development time..

도움이 되었습니까?

해결책

Apple actually has sample code that gives a great start to a project of this type:

ClipboardViewer at developer.apple.com

다른 팁

You could always iterate through the pasteboard and log what's there.

for(id object in [[UIPasteboard generalPasteboard] items]) {
    NSLog(@"Object: %@", object);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top