Collect findings from other people's writing, with sources

The skill so far only held what we broke ourselves. Most of what is worth
knowing about a new SDK is found rather than suffered — release notes,
other people's articles — and that deserves a place too, on terms that
stay fair to whoever wrote it.

So: entries in our own words, source named and linked, and the one thing
no external article can supply — what it would replace in our code and
whether it is genuinely a step forward. Attribution answers plagiarism,
not copyright, so nothing is pasted; an API signature is a fact, the
paragraph explaining it is not ours to take.

First four entries come from Natalia Panferova's writing at nilcoalescing
.com: the close button role and concentric corners, both of which replace
things we hand-built; ScrollPosition, which replaces one wrapper view;
and the iOS 27 toolbar APIs, which we cannot use at our deployment target
but which would delete a workaround the day we can.

A LICENSE was overdue and now says plainly what is ours, what is Apple's
and stays out of the repository, and what belongs to the authors we cite.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
TomUviandClaude Opus 5 committed 2026-08-16 23:14:51 +02:00
1 parent 905ad2ce3e
commit f84852d49c
8 files changed
+257 -9

No files matched your search

@@ -0,0 +1,61 @@
# iOS 26 UI affordances
## `Button(role: .close)`
**What it is.** A button role that renders the platform's standard close
control — an `xmark`, positioned and labelled by the system — without
supplying a label or icon. Distinct from `.cancel`, which implies
discarding work; `.close` is for dismissing something informational.
```swift
.toolbar {
Button(role: .close) { dismiss() }
}
```
**What it replaces.** Every hand-assembled close button: an
`Image(systemName: "xmark.circle.fill")` with a hierarchical rendering
mode, a colour chosen to sit on the background, `.buttonStyle(.plain)`,
and a manual `accessibilityLabel("Close")`. We had two of those in one
file alone.
**Step forward?** Yes, unambiguously. Correct placement per platform,
VoiceOver label and its localisation come from the system, and two
hand-written strings leave the catalogue. Roughly six lines become one.
**Source.** Natalia Panferova, "Add a Close button to SwiftUI modals on
iOS 26", nilcoalescing.com, 20 Oct 2025. Read 16 Aug 2026.
## Concentric corners
**What it is.** Nested rounded rectangles whose inner and outer corner
arcs share a centre, so the gap between them stays even the whole way
round. `ConcentricRectangle` is the shape; `containerShape(.rect(cornerRadius:))`
tells nested views what they are sitting inside so they can derive their
own radius. `isUniform: true` forces all four corners equal, and a
`minimum:` guarantees a floor when the inner shape sits far from the edge.
```swift
ZStack {
ConcentricRectangle().fill(.thickMaterial)
ConcentricRectangle(corners: .concentric, isUniform: true)
.fill(Color.blue.gradient)
}
.containerShape(.rect(cornerRadius: 24))
```
**What it replaces.** Hand-guessed radii for nested panels. In our card
app: a white "ticket" at radius 16 inside a coloured panel at 24, another
pair at 22 inside 22, tiles at 12 inside 20. Those numbers were picked by
eye at one size and drift apart at any other.
**Step forward?** Yes, and it is the kind that shows. The Wallet-pass look
we are copying is built on exactly this relationship, and doing it by hand
means re-tuning every time padding changes. Costs nothing at runtime.
**Caveat.** The container shape must be a rounded-rectangular shape
(`RoundedRectangle`, `Capsule`, `Circle`).
**Source.** Natalia Panferova, "Corner concentricity in SwiftUI on
iOS 26", nilcoalescing.com, 21 Aug 2025. Read 16 Aug 2026. Apple's own
skills shipped with Xcode 27 do not cover this.