Kit Cross

Reordering table views with drag and drop

macOS has excellent support for drag and drop. Here’s how to allow a user to reorder an NSTableView.

Dark mode videos with prefers-color-scheme

Dark mode has wide browser support and media queries allow for switching images by user color scheme. The same is also possible with video elements.

Tags in Finder context menus

Finder on macOS has an ingenious color tag selector in the context menu. Find out how to make this and other custom views inside an NSMenu.

Quick 301 redirects with Lambda@Edge and Cloudfront

Attaching Lambda functions to Cloudfront distributions allows for server side scripting on a static site. This enables easy permanent redirects or AB tests.

Remapping tilde key on macOS

How to remap key bindings on macOS using hidutil and ensure they persistent across restarts by creating a Login Item application.

How to make HEVC, H265 and VP9 videos with an alpha channel for the web

HEVC encoding on macOS Catalina now supports encoding an alpha channel, enabling many creative options on the web and inside apps.

Using NSTableView inside Xcode Playgrounds

Using Xcode Playgrounds makes testing UI elements easy and fast. It’s not obvious how to add an NSTableView without using a NIB – here’s how to create a table view programatically.