Things I wish I knew yesterday

Even when you’ve been working in an environment for years, you still find things you never knew. I liken it to learning about a famous actor you had never heard of, but has starred in all your favorite movies.

I found two things that I wish I had known or seen, but for whatever reason, I missed.

First up, convenience functions for converting a CGRect to a NSString or a NSString to a CGRect.

I’ve often needed to log the frame I am working on and have either created this as a macro or just quickly typed out the string format. Never again! Not sure how much I’ll use the CGRectFromString function, I much prefer the C-style:

Next up, SPLIT SCREEN VIEW in Xcode. I work on a 30” monitor and sometime having so many open windows gets to be a mess. I’ve often seen the little button for a horizontal split view in the upper right of the editor window, but didn’t know how to do a vertical split.

The icon even looks like a horizontal split (icon right below the lock in the image). Fortunately, holding OPTION (⌥) while clicking it will create a vertical split window.