FrameUtils – Objective-C Frame Utilities

IOS Product Development
Objective-C software developers often find themselves manipulating IOS or OSX UIView frames in various ways. Frames are resized, moved, centered, and endlessly debug printed. My buddy, Adam, and I became really annoyed at writing code like this over and over and over and .. //move the frame left by 5 pixels view.frame = CGRectMake(view.frame.origin.x - 5, view.frame.origin.y, view.frame.size.width, view.frame.size.height); In the example given, it's highly annoying to have a long line of code that says "view.frame.x.y.z" four different times when all we're trying to say is "just change the frame's position by 5 pixels". Unfortunately, a CGRect's inner properties are not modifiable, so developers are often resigned to code like that shown above. Fortunately, Adam and I decided to do something about the insanity of code verbosity for simple frame…
Read More