How to convert IMP to NSValue with Swift? -


enter image description here

i want convert implementation nsvalue, it's err.

in objective-c, can use line convert:

[nsvalue valuewithpointer:implementation] 

but in swift, how convert?

as says, needs unsafepointer, not copaquepointer. convert it:

let impvalue = nsvalue(pointer: unsafepointer(imp)) 

Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -