SwiftyCam
SwiftyCam copied to clipboard
Preview layer does not scale well with Iphone x screen
Hi,
Setting the video gravity to resize does not scale well with iphone x screen.
videoGravity =.resize
Any idea how solve this issue ?
We have fixed the issue by adding centering previewLayer to upper view as in the below code.
previewLayer = PreviewView(frame: view.frame, videoGravity: .resizeAspectFill) // or gravityVariable
previewLayer.center = view.center
Great fix.
@Awalz pls add this fix to the code base
How did you solve this again? I'm testing on an iphone x and it isn't scaling well with the screen where the status bar and bottom bar are black. Thanks.
You have to modify the code in SwiftyCamViewController.swift to make it work.
Hi,
Setting the video gravity to resize does not scale well with iphone x screen.
videoGravity =.resize
Any idea how solve this issue ?
Hello when I upload video from iPhone X backend people are receiving but unable to play the video what is the issue in iPhone X ?? unable to play the video which I have recorded from iPhoneX Only
I still have the same problem in 2020, have someone managed to solve it? I tried all the upper "solutions" but they don't work correctly
We have fixed the issue by adding centering previewLayer to upper view as in the below code.
previewLayer = PreviewView(frame: view.frame, videoGravity: .resizeAspectFill) // or gravityVariable previewLayer.center = view.center
It works for me Thanks