Cannot pass immutable value as inout argument

Viewed 2403

In Objective-C

CGPDFArrayRef array;

This works fine: Whereas in Swift it should be,

var array:CGPDFArrayRef

But it's giving this error when passes in the next line:

var success = CGPDFScannerPopArray(inScanner, &array)

Cannot pass immutable value as inout argument: implicit conversion from 'CGPDFArrayRef' to 'CGPDFArrayRef?' requires a temporary.

1 Answers
Related