Answers for "swift how to dereference unsafemutablepointer"

0

swift how to dereference unsafemutablepointer

func foobar(_ myPointer: UnsafeMutablePointer<CGRect>) {
    let dereferencedPointer = myPointer.pointee
    print(myPointer.pointee.width, myPointer.pointee.height)
    // Same as print(myCGRect.width, myCGRect.height)
}
Posted by: Guest on June-13-2021

Code answers related to "Swift"

Browse Popular Code Answers by Language