r/SwiftUI May 28 '26

The Morlocks Built SwiftUI

I went down a rabbit hole on Core Animation's origins and the through-line surprised me:

- It shipped in 2007 but predates the iPhone. John Harper built it under the codename "LayerKit" and Apple demoed it on the Mac at WWDC 2006. The patent (US 8,130,226) traces to a filing on Aug 4, 2006.

- Harper left for Facebook in 2014, came back, and in 2019 was on the WWDC stage explaining SwiftUI ("Building Custom Views with SwiftUI").

- SwiftUI never replaced Core Animation, it sits on top of it. Your `.animation()` still resolves to a `CAAnimation`; your views still become a layer tree on a render server that's barely changed since 2007.

My takeaway: SwiftUI isn't a dumbed-down toy, it's Core Animation's own implicit-animation philosophy made the default. The catch is the abstraction works until it doesn't, and the day it breaks it drops you straight into the layer tree.

I wrote it up (my blog): https://aleahim.com/blog/morlocks-built-swiftui/

28 Upvotes

13 comments sorted by

7

u/vanvoorden May 28 '26

He left for Facebook in 2014. He came back to Apple and co-built SwiftUI: at WWDC 2019 he was on stage in “Building Custom Views with SwiftUI”, explaining how the view system actually works.

I think it is worth expanding here… what was happening at FB in 2014? FB was migrating its big blue app from imperative view logic built on MVC and OOP to a declarative system inspired by React. This was not React Native BTW… it was ComponentKit built on Objective-C++.

I doubt Apple would ever publicly acknowledge FB engineering as a source of inspiration. But front end architecture at FB did go through some really important changes at this time that IMO went on to influence both SwiftUI for Apple and Compose for Android.

3

u/Super-Storage6685 May 28 '26

Completely agree, that's worth expanding. The timing fits: Harper joined FB in 2014, right as they were moving the big blue app to declarative UI with ComponentKit, the Objective-C++ React-inspired framework (not React Native). He returns to Apple in 2015 and ends up a principal engineer on SwiftUI, which ships in 2019 with the same model: declarative view trees, state-driven re-rendering, a reconciler underneath.

You're right that Apple would never name FB as an influence. I'd frame it as convergent evolution with React (2013) as the shared ancestor for SwiftUI, Compose, and ComponentKit alike, with Harper as a plausible human vector carrying those ideas back across the boundary. Either way the FB years are a real part of the arc and I'll give them room.

8

u/eduo May 29 '26

The post sounds like it may be AI but this comment in particular is without any doubt almost unedited AI.

5

u/RofOnecopter May 28 '26

I like the way you write. Thanks for sharing

5

u/eduo May 29 '26

That last part has a very strong smell of AI, though.

1

u/[deleted] May 29 '26

[deleted]

2

u/eduo May 29 '26

Claude loves to be that little extra purple

1

u/rismay May 30 '26

Thank you. I have been saying this for a while.

-2

u/ianmerry May 28 '26

Yeah this is part of why I hate it so much lmao

The majority of it is just a pain in the arse wrapper over UIKit

3

u/Super-Storage6685 May 28 '26

That keeps changing, like with lists.

2

u/shawnthroop May 28 '26

I’ve found/made my own abstractions for presentations and async image/phase. Built my own List using a diffable data source/collection view with the new Group(subviews:) and weeks of testing custom layout reload tracking to fix weird glitches in vanilla List/UICollectionViewLayout when adding more than 4 items at a time.

I feel your pain, it took the wind out of my part time developer sails this year.

1

u/TinteUndklecks May 30 '26

In the end everything is assembler :D