AVFoundation: Fit Video to CALayer correctly when exporting
问题 Problem: I'm having issues getting videos I'm creating with AVFoundation to show in the VideoLayer, a CALayer , with correct dimensions. Example: Here is what the video should look like (as its displayed to the user in the app) However, here's the resulting video when it's exported: Details As you can see, its meant to be a square video, with green background, with the video fitting to a specified frame. However, the resulting video doesn't fit the CALayer used to contain it (see the black