Neat tip for aspect ratio calculation


I was chatting with someone earlier having trouble with aspect ratio calculation… (“What is the largest 16:9 rectangle that fits within the screen bounds?”)

I recalled that AVFoundation has a great utility function for this: AVMakeRect. Not a lot of people know about this hidden gem.

(I blogged about this here: