From 6f5b2be69056a7061a0a29c09215597f5deab4d1 Mon Sep 17 00:00:00 2001 From: Adrian Schoenig Date: Thu, 21 May 2026 21:25:19 +1000 Subject: [PATCH 1/2] Allow adding persistent map-buttons; not just per-card buttons --- .../TGCardViewController.swift | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/Sources/TGCardViewController/TGCardViewController.swift b/Sources/TGCardViewController/TGCardViewController.swift index bd34b23..e94d8bf 100644 --- a/Sources/TGCardViewController/TGCardViewController.swift +++ b/Sources/TGCardViewController/TGCardViewController.swift @@ -246,7 +246,26 @@ open class TGCardViewController: UIViewController { public var locationButtonPosition: TGButtonPosition = .top private var defaultButtons: [UIView]! - + + /// Views to overlay on the top-right of the map *for every card*, in addition + /// to whatever each card's own `topMapToolBarItems` specifies. Use this for + /// controls that should be reachable from any screen — a profile button, a + /// global assistant entry point, etc. + /// + /// Items are arranged vertically. Per-card items (from `TGCard.topMapToolBarItems`) + /// appear *below* these persistent ones in the same column. + /// + /// - SeeAlso: `persistentBottomMapToolBarItems` + public var persistentTopMapToolBarItems: [UIView] = [] { + didSet { if isViewLoaded, defaultButtons != nil { updateMapToolbarItems() } } + } + + /// Bottom-right counterpart of `persistentTopMapToolBarItems`. Items here are + /// arranged horizontally; per-card `bottomMapToolBarItems` appear to the right. + public var persistentBottomMapToolBarItems: [UIView] = [] { + didSet { if isViewLoaded, defaultButtons != nil { updateMapToolbarItems() } } + } + private var allowFloatingViews: Bool = true public var draggingCardEnabled: Bool { @@ -1861,6 +1880,7 @@ extension TGCardViewController { // Because we want to relocate buttons in the top toolbar // to the bottom toolbar when header is present, so it is // important that we set up bottom toolbar first! + bottomViews.append(contentsOf: persistentBottomMapToolBarItems) if let newBottoms = card?.bottomMapToolBarItems { bottomViews.append(contentsOf: newBottoms) } @@ -1872,6 +1892,7 @@ extension TGCardViewController { } // Now we can proceed with setting up toolbar at the top. + topViews.append(contentsOf: persistentTopMapToolBarItems) if let newTops = card?.topMapToolBarItems { topViews.append(contentsOf: newTops) } From b7f513cb9367c3a8e58efaaf3f85608e198f6392 Mon Sep 17 00:00:00 2001 From: Adrian Schoenig Date: Fri, 22 May 2026 16:19:13 +1000 Subject: [PATCH 2/2] Possible CI fix --- .github/workflows/swift.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index c742517..cf0e181 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -13,7 +13,7 @@ jobs: steps: - uses: maxim-lobanov/setup-xcode@v1 with: - xcode-version: 26.0.1 # 26.1 is missing simulators on GitHub, as of November 2025 + xcode-version: 26.4 # macos-26 ships an iOS platform compatible with 26.4; 26.0 is no longer downloadable - uses: actions/checkout@v4 - name: Build TGCardVC run: set -o pipefail && xcodebuild -workspace . -scheme TGCardViewController -destination 'platform=iOS Simulator,name=iPhone 17' | xcbeautify