Skip to content

Instantly share code, notes, and snippets.

View quentinfasquel's full-sized avatar

Quentin quentinfasquel

View GitHub Profile
@zats
zats / square_image.md
Last active May 15, 2025 08:23
Square image container

Image in a square container

It took me way too long to figure out how to achieve following:

image

Key points to call out:

I wanted API to look something like

@IanKeen
IanKeen / Banner.swift
Last active March 1, 2024 21:49
Persistent banner in SwiftUI : Supports top/bottom edge, swipe to dismiss + auto dismissal after time
public enum BannerEdge {
case top, bottom
}
public enum BannerAutoDismiss {
case after(TimeInterval)
case never
}
extension View {
public func banner<C: View>(