Easily Bind an NSProgress Object to an NSProgressIndicator in Objective-C [Open Source]

In UIKit UIProgressView has an observedProgress property. If you set the observedProgress property on a UIProgressView, it will automatically update its appearance when you make changes to the NSProgress object. On macOS (in AppKit at least) NSProgressIndicator does not have an equivalent API. I created a simple category on NSProgressIndicator that adds an observedProgress property on NSProgressIndicator. The source code is available on Github here.

Adding Force Touch Features to macOS Apps with a Custom Gesture Recognizer [Open Source]

I created a simple subclass of NSGestureRecognizer, ATForceTouchGesture, to simplify the process of adding Force Touch features to macOS apps. You can use this gesture recognizer to add a feature like force clicking to start editing a label (see the screenshot below).

Image captures 'force click' to edit using ATForceTouchGesture.

There is a sample project available on Github here.

Exporting NSTableView to HTML [Open Source]

I needed to export the contents of a NSTableView to HTML, so I wrote a little NSTableView subclass in Objective-C to do this.

ATHyperTextTableView is a simple NSTableView subclass that makes exporting a table view to HTML easy. You can customize the look of the exported HTML table with your own CSS too.

Screenshots Below:
Screenshot of NSTableView.
Screenshot of exported HTML from a the tableView, loaded into a WebView.
Screenshot of the exported HTML loaded into a WebView.

Screenshot of exported HTML from a the tableView, loaded into a WebView with custom CSS set.
Screenshot of the exported HTML loaded into a WebView, styled with custom CSS.

There is a sample project available on Github here.