Skip to content

Instantly share code, notes, and snippets.

View vojtabohm's full-sized avatar

Vojtěch Böhm vojtabohm

View GitHub Profile
@Kyle-Ye
Kyle-Ye / disable-calayersystem-swiftui-ios26.md
Created March 8, 2026 18:12
Disabling CALayerSystem Behavior in SwiftUI on iOS 26

Disabling CALayerSystem Behavior in SwiftUI on iOS 26

Starting with iOS 26, SwiftUI's UIHostingView may use CALayer-based rendering (caLayerSystem) instead of the traditional UIKit-based rendering (uikitSystem) when certain conditions are met. This can cause unexpected changes in the view hierarchy — for example, _UIGraphicsView and CGDrawingView subviews may be replaced by plain CALayer and CGDrawingLayer sublayers.

Here are two approaches to temporarily disable this behavior in your local debug environment.

Option 1: Environment Variable

Set the environment variable SWIFTUI_DISABLE_MIXED_VIEW_HIERARCHY=1 in your scheme's Run configuration (Edit Scheme → Run → Arguments → Environment Variables).

@bendc
bendc / easing.css
Created September 23, 2016 04:12
Easing CSS variables
:root {
--ease-in-quad: cubic-bezier(.55, .085, .68, .53);
--ease-in-cubic: cubic-bezier(.550, .055, .675, .19);
--ease-in-quart: cubic-bezier(.895, .03, .685, .22);
--ease-in-quint: cubic-bezier(.755, .05, .855, .06);
--ease-in-expo: cubic-bezier(.95, .05, .795, .035);
--ease-in-circ: cubic-bezier(.6, .04, .98, .335);
--ease-out-quad: cubic-bezier(.25, .46, .45, .94);
--ease-out-cubic: cubic-bezier(.215, .61, .355, 1);