let time = UInt64(NSDate().timeIntervalSince1970 * 1000.0)
I need to turn time
into an AnyObject so I can use it for one library. How can I do so?
let time = UInt64(NSDate().timeIntervalSince1970 * 1000.0)
I need to turn time
into an AnyObject so I can use it for one library. How can I do so?
You need to box it inside an NSNumber, just the same as in Objective C.
let time = UInt64(NSDate().timeIntervalSince1970 * 1000.0)
let obj: AnyObject = NSNumber(unsignedLongLong: time)