UnsafePointer no longer works in swift 3
You can try this:
let rawPointer = UnsafeRawPointer(array1)
let pointer = rawPointer.assumingMemoryBound(to: UInt32.self)
let value = pointer.pointee
Raw pointer is a pointer for accessing untype data.
assumingMemoryBound(to:)
can convert from an UnsafeRawPointer
to UnsafePointer<T>
.
Reference :Swift 3.0 Unsafe World