I'm developing my first Obje开发者_如何学编程ctive C app; a simple program to scan an image and upload it to a server. So I was excited to see the IKScannerDeviceView in the library of Interface builder. However, whenever I drag it onto my sample app and run, the app freezes.
The documentation on Apple's site has no examples.
What's the shortest distance to a running app that uses IKScannerDeviceView?
(I would much rather use this, than the ancient TWAIN code, as was also suggested to me.)
I've just put together a little app that scans one or more discrete pages and puts them together into a PDF file using IKScannerDeviceView. It's mostly "free" functionality assembled in Interface Builder. The class seems to be pretty quirky -- if you don't reset its post-processing app to nil, it opens Preview, and I can't actually get it to deliver scan results in-memory. But have a look at the code if you think it might be useful. HG repo.
精彩评论