How do you cast a UInt64 to an Int64?

前端 未结 6 1420
我在风中等你
我在风中等你 2020-12-17 23:08

Trying to call dispatch_time in Swift is doing my head in, here\'s why:

 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 10 * NSEC_PER_SEC), dispatch_get_mai         


        
6条回答
  •  眼角桃花
    2020-12-17 23:36

    To construct an Int64 using the bits of a UInt64, use the init seen here: https://developer.apple.com/reference/swift/int64/1538466-init

    let myInt64 = Int64(bitPattern: myUInt64)
    

提交回复
热议问题