Skip to content

Instantly share code, notes, and snippets.

View mbuchetics's full-sized avatar

Matthias Buchetics mbuchetics

View GitHub Profile
@ole
ole / RelativeSizeLayout.swift
Last active July 30, 2025 12:15
A SwiftUI layout and modifier for working with relative sizes ("50 % of your container"). https://oleb.net/2023/swiftui-relative-size/
import SwiftUI
extension View {
/// Proposes a percentage of its received proposed size to `self`.
///
/// This modifier multiplies the proposed size it receives from its parent
/// with the given factors for width and height.
///
/// If the parent proposes `nil` or `.infinity` to us in any dimension,
/// we’ll forward these values to our child view unchanged.
@clarkezone
clarkezone / ContentView.swift
Last active November 19, 2025 11:46
Basic SwiftUI wrapper for PaperKit
//
// ContentView.swift
// PaperKitPoCiOS
//
// Created by James Clarke on 7/15/25.
//
import SwiftUI
struct ContentView: View {