Foundation let data = Data([1, 2, 3, 4]) let x = data.withUnsafeBytes { let op = OpaquePointer($0.baseAddress!.advanced(by: 10)) return UnsafePointer<UInt16>(op).pointee } print(x) load ͷ count νΣοΫΛආ͚Δͱਖ਼ৗऴྃ͢Δ
manage pointers in Swift - WWWDC20 • [Swift] IntͱDataͷ૬ޓม #Swift - Qiita • ʲSwift5ʳDataΛIntDoubleͳͲͱ૬ޓม͢Δํ๏ – Ώ͖ͬͿΖ͙ • ios - how to convert Data to Int in swift - Stack Overflow • ૉΒ͍͠SwiftͷϙΠϯλܕͷղઆ #Swift - Qiita