Blog

To Shadow or Not to Shadow Variables

Variable shadowing is the practice of using the same name for a variable when it appears in different scopes inside the code. For the most part it seems to be taboo, adding to unnecessary confusion inside a project. But two areas it seems not only acceptable, but encouraged. Variable shadowing in Initializers Here, the variables …

To Shadow or Not to Shadow Variables Read More »

Fixing Rotation Issues – Easily Redrawing Custom Subviews

I’ve been working a lot lately with zero Storyboards and doing everything programmatically. It’s a nice fresh approach for me, and has surprisingly even helped me understand the mechanics of Storyboards better. But I kept running into a rotation issue. Here’s a sample Custom View I made called HomeView. It sets up a label and …

Fixing Rotation Issues – Easily Redrawing Custom Subviews Read More »