I am trying to scale my MTKView() full screen on an iPhone X and I want to maintain the ratio in regards to the widht (I understand that means that some of the side will be cut off).
Can anyone help please?
Thats what I am currently doing:
required init(coder: NSCoder) {
super.init(coder: coder)
device = MTLCreateSystemDefaultDevice()
configureMetal()
createTextureCache()
colorPixelFormat = .bgra8Unorm
self.framebufferOnly = false
self.autoResizeDrawable = false
self.contentMode = .scaleAspectFit
self.contentScaleFactor = UIScreen.main.scale
self.drawableSize = CGSize(width: 2320, height: 3088)
}