// the find
nicklockwood/layout
A declarative UI framework for iOS
Layout is a UIKit framework that lets you define iOS views in XML files with runtime-evaluated expression strings, primarily as a human-readable alternative to Storyboards. It targets teams that found Storyboards painful to diff and merge, and adds live-reloading in the simulator as a productivity hook. SwiftUI has since eaten most of its reason to exist.
- Live reloading in the iOS Simulator works well — Cmd-R reloads XML without recompiling, and the Red Box error overlay surfaces expression errors immediately on mount rather than at runtime, which is more honest than Interface Builder.
- The expression engine is genuinely thoughtful: it's strongly typed despite being string-based, uses the Objective-C runtime to auto-discover view properties without requiring manual registration, and fails loudly with useful messages instead of silently ignoring bad values.
- Embedding works both ways — Layout nodes inside Storyboards and Storyboard-based views inside Layout — so you can adopt it incrementally without a full rewrite.
- Dependencies (Expression, Sprinter) are vendored inside the Layout namespace, so they can't conflict with other copies of those libraries in the same project.
- SwiftUI shipped in 2019 and does everything this does with compile-time safety, IDE tooling, and first-party support. For any new project starting today, adopting Layout instead is a hard argument to make.
- No Swift Package Manager support — CocoaPods and Carthage only. SPM has been the standard for years; omitting it is a real friction point for anyone using a modern Xcode workflow.
- The global `LayoutNode.useLegacyLayoutMode` flag is a code smell that leaked into the public API. Changing layout semantics via a global boolean is the kind of thing that bites teams when a dependency somewhere sets it differently than they expect.
- UIWebView appears in the Standard Components list and was deprecated by Apple in 2018. The last push was January 2023, so the project is effectively in maintenance-only mode at best, and the codebase has not caught up to current iOS deprecation warnings.