Skip to content

Instantly share code, notes, and snippets.

View evansunleyjames's full-sized avatar

Evan Sunley James evansunleyjames

View GitHub Profile
@evansunleyjames
evansunleyjames / ConditionalTipModifier.swift
Last active June 6, 2024 16:20
A tip for showing TipKit tips conditionally in SwiftUI
/**
Conditionally include a tip - could be achieved with parameters on the tip, but this could save repetition if there are enough tips that depend on the same condition.
Usage:
.showTipConditionally(someCondition) { view in
view
.popoverTip(myTip)
.whateverOtherModifiers()
}
*/