I am trying to parse PDF files and I've nearly got the code working. The only thing I can't seem to figure out is to translate the following Objective C code, into Swift. I need to call my own written function to register it as a callback.
The Objective-C code is:
CGPDFOperatorTableSetCallback(operatorTable, "q", &op_q);
and the function is
static void op_q(CGPDFScannerRef s, void *info) {
// Do whatever you have to do in here
// info is whatever you passed to CGPDFScannerCreate
}
What would the Swift equivalents be?