Value of type 'ARFrame' has no member 'viewTrans'

I can't figure out how to solve this error:

Value of type 'ARFrame' has no member 'viewTrans'

Nothing came up when I tried googling the error. Below I attached the entire code and if you scroll down to basically the end you will see a comment called //ERROR and right below that is the line of code throwing this error.

Hello,

I can't figure out how to solve this error:

Value of type 'ARFrame' has no member 'viewTrans'

This is an error indicating that you have tried to access a property/function of ARFrame called "viewTrans", but the public interface of ARFrame does not have any property/function called "viewTrans", so you receive this error message.

The error is coming from this line:

// Error.
self.viewTrans = frame.viewTrans(for: UIInterfaceOrientation.portrait, viewportSize: targetSize)

This was probably just a typo, you likely meant to use the frame's "displayTransform" method, like this:

// No error.
self.viewTrans = frame.displayTransform(for: UIInterfaceOrientation.portrait, viewportSize: targetSize)
Value of type 'ARFrame' has no member 'viewTrans'
 
 
Q