Skip to content

Instantly share code, notes, and snippets.

View benstockdesign's full-sized avatar
💭
Running jsPerf Tests

Ben Stock benstockdesign

💭
Running jsPerf Tests
View GitHub Profile
@benstockdesign
benstockdesign / input.scss
Last active June 11, 2021 04:21
Mixed-Unit Division Fun
@use "sass:meta";
@use "sass:list";
@use "sass:string";
@use "sass:map";
@use "sass:color";
@use "sass:math";
@use "sass:selector";
@function div-shim($n, $d) { @return $n / $d; }
@benstockdesign
benstockdesign / nscollectionview-how-to.markdown
Last active May 19, 2019 15:14
How to Set Up an NSCollectionView in Xcode 7.3 (OS X 10.11)

Think NSCollectionViews are Crazy to Set Up for OS X?

You're Not Alone.

Here's a step-by-step guide on how to get these painful things working properly in Xcode 7.3 on OS X 10.11 El Capitan.

  1. Drag an NSCollectionView object into an existing storyboard or standalone nib.
  2. Select the NSCollectionView, and in the inspector, change Layout from Content Array (Legacy) to Flow.
  3. Configure the rest how you see fit.
  4. Next, add a new NSCollectionViewItem subclass to the project, naming it something like MyCollectionViewItem.
  5. Check the box next to Also create XIB file for user interface. Two files will be created.