I am having trouble with getting the size of the texture belonging to a CAMetalLayer Drawable. When I use view.drawableSize.width, it returns 2560x1440, however, when I use the Metal Debugger, I get the correct value of 2660x1432. If I hardcode my size to 2660x1432, my application works perfectly fine (except that I can't resize the window without it breaking), but when I try to use view.drawableSize.width, it doesn't work at all. I can see my scene being rendered in the debugger, but if I don't hardcode my screen size, it is not being displayed on the CAMetalLayer Drawable.
How can I get the correct size using code?