swift - How to cast from UInt16 to NSNumber -
i have uint16 variable pass legacy function requires nsnumber.
if try:
var castasnsnumber : nsnumber = myuint16
i compiler error 'uint16' not convertible 'nsnumber'
question
how can recast nsnumber?
var castasnsnumber = nsnumber(unsignedshort: myuint16)
Comments
Post a Comment