Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mattgallagher/CocoaWithLovePlaygrounds

Swift Playground versions of select articles from Cocoa with Love.
https://github.com/mattgallagher/CocoaWithLovePlaygrounds

Last synced: 25 days ago
JSON representation

Swift Playground versions of select articles from Cocoa with Love.

Awesome Lists containing this project

README

        

# CocoaWithLovePlaygrounds

Swift Playground versions of select articles from Cocoa with Love.

1. [Statements, messages, reducers](#statements-messages-reducers)
2. [CwlLayout: a Swift wrapper around Auto Layout](#cwllayout-a-declarative-wrapper-around-auto-layout)
3. [A view construction syntax](#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](https://www.cocoawithlove.com) website: [Statements, messages and reducers](https://www.cocoawithlove.com/blog/statements-messages-reducers.html).

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](https://www.cocoawithlove.com) website: [CwlLayout: a Swift wrapper around Auto Layout](https://www.cocoawithlove.com/blog/cwllayout.html).

## 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](https://www.cocoawithlove.com) website: [A view construction syntax](https://www.cocoawithlove.com/blog/a-view-construction-syntax.html).

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