Swift Playground versions of select articles from Cocoa with Love.
Swift
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
CwlLayout.playground Updated to latest version of CwlLayout from the CwlViews project. Dec 21, 2017
Statements-Messages-Reducers.playground Updated to the latest version of CwlSignal. Dec 21, 2017
ViewConstruction.playground
.gitignore
LICENSE
README.md

README.md

CocoaWithLovePlaygrounds

Swift Playground versions of select articles from Cocoa with Love.

  1. Statements, messages, reducers
  2. CwlLayout: a Swift wrapper around Auto Layout
  3. A view construction syntax

These playgrounds are all tested in Xcode 9.2.

Statements, messages, reducers

I show how to structure programs around three tiers of computational units – statements, messages and reducers – and talk about the general problem of containing and isolating state that this restructuring aims to address.

This article originally appeared on the Cocoa with Love website: Statements, messages and reducers.

Note that the playground may take about 10 seconds to start while it compiles the associated "Sources" for the project.

CwlLayout: a Swift wrapper around Auto Layout

I present a small file for handling layout, similar to UIStackView or NSStackView but built around efficient Swift syntax and the aim of composing full layouts as a single expression.

This article originally appeared on the Cocoa with Love website: CwlLayout: a Swift wrapper around Auto Layout.

A view construction syntax

In this article, I look at constructing Cocoa views in code using a unique syntax that offers dynamic and constant options with no syntactic overhead, supports parameters inherited through the class hierarchy, allows hundreds of optional parameters without pushing hundreds of defaulted parameters onto the stack, avoids parentheses, and avoids specifying types – all while remaining completely typesafe.

This article originally appeared on the Cocoa with Love website: A view construction syntax.

Note that the playground may take about 10 seconds to start while it compiles the associated "Sources" for the project.