How To Divide A CGRect Using CGRectDivide

Torrey Betts:

When developing iOS applications without using Interface Builder, you’ll always end up with a headache of trying to work out some math to split up and layout your views. One obscure method that helps a ton when working with CGRects is CGRectDivide.

Torrey goes on to show a code example of how one can easily divide a full screen into two sections, one section consuming 30% of the screen the other 70%.

Download the sample Xcode project