I want convert the implementation to NSValue, but it's err.
In Objective-C, can use this line to convert:
[NSValue valueWithPointer:implementation]
but in Swift, how to convert?
As it says, it needs an UnsafePointer, not a COpaquePointer. So convert it:
UnsafePointer
COpaquePointer
let impValue = NSValue(pointer: UnsafePointer(imp))
As it says, it needs an
UnsafePointer, not aCOpaquePointer. So convert it: