Location of Xcode Derived Data

Usually Cmd + Shift + K will do a clean but if not, the derived data is in ~/Library/Develop/Xcode/DerivedData cd into that directory and do rm -r [directory name]

Categorized as hints Tagged

Rounded Corner Button in Swift

It’s very simple to create buttons with rounded corners. Create a button like you normally would in Interface Builder, create an Outlet to it, and then in viewDidLoad, set the attributes like this: button.layer.borderWidth = 3.0 button.layer.borderColor = UIColor.white.cgColor // Set this to the background color of your button button.layer.cornerRadius = 8.0

Free Simple Hex Color Picker

TIL if you you just do a Google search for “color picker” the top result is a little widget with sliders that let you pick a color and the hex and RGB values appear below it. So easy!

Categorized as hints

Docker Cheatsheet

Start a container when using Docker Compose docker-compose up -d

Categorized as hints Tagged

Basic init rules in Swift

I kept wondering whether you’re supposed to call the parent init method before or after your code and I found a basic answer: init() { // Put values into your instance variables and constants super.init() // Other initialization code, such as calling methods, goes here }  

Categorized as hints Tagged ,

Embed Tab Bar Controller in Navigation Controller

I don’t think you’re really supposed to do this since the option is grayed out in Xcode when you select Editor -> Embed in Navigation Controller, but a hacky way to get around it is to control-drag from a free-standing Navigation Controller to the Tab Bar Controller and select “root view controller.”