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

mongodb - Struggling to get ordered results from the last retrieved article, given array of elements to search in -

c# - Pausing a storyboard on TabItem mouse over -

c# - Attribute value in root node of xml Linq to XML -