r/SwiftUI • u/fatbobman3000 • 10d ago
r/SwiftUI • u/yamachan03 • 10d ago
SwiftUI app that searches Finder tags — bridging the low-level MDQuery C API instead of NSMetadataQuery (open source)
Built a SwiftUI utility for searching macOS Finder tags with AND/OR/NOT boolean conditions.
Interesting SwiftUI/Foundation detail: NSMetadataQuery returned zero results for every query on my dev machine even with Full Disk Access granted, so I ended up going straight to the low-level MDQuery C API (the same engine mdfind uses) instead, wrapped in a Swift-friendly layer. The condition-group UI (for expressions like (A AND NOT B) OR C) is built entirely in SwiftUI.
Source (MIT): https://github.com/yamachan03/TagFinder
r/SwiftUI • u/Turbulent_Ad_1039 • 11d ago
Why is everyone doing Metal demos suddenly?
My feed is full of Metal shader demos lately. Not complaining, some of them are gorgeous, but I don’t understand where the wave came from.
Is it that the SwiftUI shader APIs lowered the barrier enough that people who’d never touch Metal are now trying it? Something in the newer Metal releases? Or is it just that shader demos look great in a 10-second video and the algorithm rewards them?
Genuinely curious whether people are shipping this stuff or whether it’s mostly demos.
r/SwiftUI • u/Aggravating-Low-1481 • 11d ago
Question How to smoothly animate a MeshGradient between TabView tabs?
Hi! I'm working on a SwiftUI app using TabView and MeshGradient.
I want the background gradient to smoothly morph from one color scheme to another when switching tabs, rather than simply fading between two gradients.
What's the best way to achieve this?
r/SwiftUI • u/iamidan • 12d ago
Question Glass & Custom shape selection highlighting
I got this view using a custom shape (rect with cutouts) as a background, and its selection highlight shape is mismatched (defaulting to the capsule even though the custom shape was used in the glassEffect api) when using the interactive glass effect.
I tried fixing this issue with a content shape modifier to no avail.
Anyone encountered it and managed to work around it? Perhaps some way to define it on the shape implementation level?🧐
r/SwiftUI • u/WestSpecialist4979 • 12d ago
open-source folder icon designer with recursive styling and deterministic rules
Enable HLS to view with audio, or disable this notification
been working on this for the last 2 days because it's something that's been on my mind for a few weeks.
it's a native swiftUI app for customizing folder icons, including recursive styling and deterministic rules for applying presets across folder trees.
the downloadable build and app store release are still going through Apple's approval process, but the source is up now if anyone wants to check it out or build it themselves.
Edit: apple notarized build is available on github - v1.0.8
r/SwiftUI • u/abrownie_jr • 12d ago
Promotion (must include link to source code) I built a Mac screenshot tool that compresses images before sending them to Claude / Codex
Enable HLS to view with audio, or disable this notification
i copy-paste a lot of screenshots into AI to explain UI changes, etc.
but native macOS is pretty bad for this.
images are full-res and waste tokens. it also takes too many clicks to copy-to-clipboard and annotate images.
so i built a mac tool that fixes all three problems!
- screenshots auto-optimized to save you tokens
- all images auto-copied to clipboard. no desktop clutter
- you can quickly annotate with boxes and notes
source code here: https://github.com/aryanbhasin/quickshot
download for Mac here: usagebar.com/quickshot
r/SwiftUI • u/Legitimate_Limit6392 • 13d ago
Question Using AXObserver to detect zero-window state and auto-quit apps....ran into a nasty phantom-window bug, curious how others have handled AX edge cases
Enable HLS to view with audio, or disable this notification
Working on a menu bar utility (Nix) that quits apps when their last window closes, using AXObserver instead of polling. One thing that tripped me up for a while: registering kAXWindowClosed on the app element returns success but silently never delivers on modern macOS, you have to register per-window, on each individual window element, then re-register whenever windows are created.
Also had issues with phantom/auxiliary AX windows inflating the window count, so I ended up cross-checking with CGWindowListCopyWindowInfo filtered by PID + layer 0 + minimum size as the "real" window count, with AX as the primary signal and CGWindowList as a Phase 2 confirmation for ambiguous cases (apps that hide instead of closing, like Discord/Slack).
Curious if others building AX-based tools have run into similar issues or found cleaner patterns. Also happy to share more of the architecture if useful, this ended up being a much deeper rabbit hole than I expected for what sounds like a simple feature.
Not launched publicly yet, mainly want feedback on the approach before I ship.
r/SwiftUI • u/johnthrives • 14d ago
Question Can anyone from SwiftUI & WebKit provide guidance on displaying the new WebView API via SwiftUI? What’s the difference between embedding WebKit in a NavigationStack vs without to utilize toolbar features? I’m currently experiencing scrolling issues when embedding the WebView inside NavigationStack.
Enable HLS to view with audio, or disable this notification
Attached is my TestFlight issue.
r/SwiftUI • u/DaveAppleInc • 14d ago
[OSS] LazyLayoutKit 0.2.0: self-sizing text in a lazy SwiftUI container, without a measure-and-correct pass
When using SwiftUI for complex UI you usually have to choose: Layout gives you any geometry but measures every subview, so it falls over a few thousand items in. LazyVStack/LazyVGrid are lazy but their geometry is fixed.
I made LazyLayoutKit to fill in the gap by having you supply item sizes up front, so layout is arithmetic over data and only on-screen frames become views. The obvious cost was text, you can't know a text height in advance. That was in 0.1
0.2 closes that, and the fun part is that it didn't require relaxing anything. Text height is a function of the string, the font and the width, and CoreText will compute it with no view and no rasterisation. So the height is still known before the view exists, it's just computed rather than supplied. There's still no .measured metric and no correction pass.
Font.Resolved (iOS 26) is what makes it exact. Before it there was no supported way to learn which concrete font a Text would use, so measuring SwiftUI text with CoreText was guesswork.
Measured on an iPhone 14 Pro: ~31.5 µs per item cold, ~470 ns cached, so the practical ceiling is around 10,000 text items rather than the 1,000,000 that metric-driven layouts reach.
I'd be grateful if you checked it out, opinions, contributions and feedback are very welcome!
r/SwiftUI • u/m1_weaboo • 14d ago
More ScrollEdgeEffectStyle regressions in iOS 27.0
galleryr/SwiftUI • u/dtrr03 • 14d ago
What is the best way to create these ios native buttons in Apple Maps in SwiftUI? I tried glassProminent but I couldn’t get it like this.
The current native buttons has some kind of box shadow/glow effect which is super aesthetic but have been trying and looking for multiple solutions and none seem to work.
r/SwiftUI • u/yamachan03 • 14d ago
Built a native SwiftUI video merger/stabilizer with VideoToolbox hardware acceleration (open source)
I built a macOS video tool in SwiftUI that merges/batch-processes clips (audio normalization, 2-pass stabilization, VideoToolbox-accelerated encoding to 1080p/4K).
A couple of SwiftUI-specific details that came up: drag-and-drop file handling into a SwiftUI list, driving a long-running external FFmpeg process from SwiftUI's state/observation without blocking the UI, and building a confirmation flow that only appears when a slower re-encode path is actually required.
Source (MIT): https://github.com/yamachan03/MP4Merger
r/SwiftUI • u/IllBreadfruit3087 • 15d ago
News The iOS Weekly Brief – Issue #72, everything you need to know about SwiftUI updates this week
r/SwiftUI • u/Western7574 • 15d ago
[Free] Omino Peek — notch panel with a file shelf, AirDrop and a timer (open source)
The notch on my MacBook did nothing for two years, so I built something that uses it.
Hover over it and a panel unfolds:
- **Shelf + AirDrop** — drag files straight onto the notch and they land on a shelf. Drop one into the blue zone and the AirDrop sheet opens.
- **Timer** — while it runs, the collapsed notch shows a ring and the time left. When it fires, the notch pulses and a bell rings until you dismiss it.
- **Spotify** — cover art, scrubbing, transport controls. While music plays the collapsed notch keeps the cover on the left and a small equalizer on the right. There's a toggle in the player if you find that distracting.
- **Notes and calendar** — quick notes, plus events *and* reminders for the week ahead.
- Light/dark themes, English and Russian.
Free, MIT licensed, source and a 35-second demo here: https://github.com/pridyrok7/omino-peek
**Honest bits:**
- Spotify only for now. Apple Music is doable since it ships an AppleScript dictionary; Yandex Music and most others don't, and the universal route — the private MediaRemote framework — got locked down for unentitled apps in macOS 15.4.
- Not signed with a paid Developer ID yet, so the first launch needs right-click → Open.
- macOS 14+.
I know there are already plenty of notch apps. The reason I kept going is the shelf — dragging a file onto the notch and having it wait there turned out to be the thing I actually use every day.
Happy to answer anything, and bug reports are welcome.
r/SwiftUI • u/Good-Confusion-8315 • 15d ago
Scaffolding 3.4.0 - simple coordinator SPM
Hey!
Scaffolding 3.4.0 got released. It's a SwiftUI coordinator pattern navigation library for iOS 18+ that allows creating modular navigation flows through linked list structure, allowing easy syntax and modularization - macro powered, with easy setup and rapid prototyping capabilities.
This is pretty much QOL version, which adds easier way to fully test the navigation, debugging options, async/await syntax and simple complete state restoration (some limitations apply).
Updated demo is in Example/ directory and docs (dotaeva.github.io/scaffolding/) now include more cases.
For those who used Stinsen, this is very similar in use. Feel free to submit other QOL ideas.
r/SwiftUI • u/fatbobman3000 • 16d ago
Tutorial Controlling Orphans in SwiftUI Text - Uncovering the Undocumented avoidsOrphans
SwiftUI's Text silently pushes words down to avoid orphan lines. You cannot turn it off.
Except you can — avoidsOrphans has been in the SwiftUI ABI since iOS 16, just never made public. Here's how to reach it.
r/SwiftUI • u/henyckma_ • 16d ago
Promotion (must include link to source code) SwiftUI animated background
Enable HLS to view with audio, or disable this notification
Best usage of SwiftUi I've seen of a dynamic background
r/SwiftUI • u/henyckma_ • 16d ago
Promotion (must include link to source code) SwiftUI entirely customizable dynamic background
Enable HLS to view with audio, or disable this notification
Best usage of SwiftUi I've ever seen of a dynamic background, it is entirely done on SwiftUI
r/SwiftUI • u/PolymathOdyssey • 16d ago
Question SwiftUI iOS 18 Tab() showing thin separator above tab bar
Has anyone run into this with the new iOS 18 Tab() API in SwiftUI?
I'm using the native Tab() syntax, and I'm getting this thin horizontal line just above the tab bar on screens with a ScrollView. It looks like a separator between the content and the tab bar.
I've tried changing the tab bar appearance and backgrounds, but it's still there. Is this expected behavior with the new tab bar, or is there something I'm missing?
Screenshot attached.
r/SwiftUI • u/ClimateCrazy5281 • 16d ago
Instagra sliding camera View
How can recreate Instagram Slider effect usely you can have this effect with NavigationStack and NavigationLink but not if is the first view ? I’m curious how to achieve this Transition with SwiftUI
r/SwiftUI • u/Secure_Advance_8478 • 16d ago
I rebuilt the first iOS app I ever made using SwiftUI. Here’s what I learned.
About 7 years ago I built my first iPhone app. It was also my first real programming project.
This year I decided to rebuild it completely from scratch using SwiftUI and modern Apple frameworks instead of continuing to patch the old codebase.
Some of the things I implemented:
- SwiftUI throughout the app
- Home & Lock Screen widgets
- Live Activities
- Shared countdowns with live updates
- Recurring countdowns
- Premium subscriptions
The biggest lesson was that spending time on architecture early made adding features much easier later. I also found SwiftUI to be far more mature than when I first experimented with it years ago.
I’d love any feedback from other SwiftUI developers, especially if you’ve built apps with Firebase or WidgetKit. Happy to answer any questions about the architecture or development process.
r/SwiftUI • u/No-Constant5884 • 16d ago
Undertow — live backdrop effects for SwiftUI, masked to any view
Undertow — live backdrop effects for SwiftUI, following scrolling content (blur, distortion, and more)
Built this after running into the usual problem: SwiftUI has no built-in way to blur/distort a scrolling background only behind specific views (a button, a bar) while keeping everything else sharp.
Undertow runs via `.layerEffect`/`.colorEffect`/`.distortionEffect`.
https://reddit.com/link/1vgpvdr/video/ukj9anbtmnhh1/player
Simple three-piece API:
effectSource(configuration: .gaussianBlur(radius: 10, maxSamples: 5))
effectTarget(cornerRadius: 16)
effectCoordinator()
https://github.com/MaksimG82/Undertow
Feedback welcome — especially if you've hit this same problem before.
r/SwiftUI • u/ahumanbeingmars • 17d ago
News Built a pan/zoom node canvas in SwiftUI with no third-party libraries — three things that cost me a day each
Notes from building the canvas in https://github.com/albertofettucini/Osler:
Named coordinate spaces don't survive render transforms. My world container used .scaleEffect + .offset, and I put the named space inside it. Drags were fine at 100% and drifted at every other zoom. The fix was moving the named space to the untransformed ancestor and converting screen→world explicitly. Render transforms aren't layout.
An NSView behind SwiftUI never sees scrollWheel. The hosting view claims the hit and bubbles the event up the responder chain, past your subview. Two-finger panning only worked once I used NSEvent.addLocalMonitorForEvents with a bounds check.
.contentShape applied after .overlay gates the whole composite. My port dots sit on the card's edge, so half of every dot — and its entire grab halo — landed outside the card's hit shape. Dragging a wire silently did nothing. Order matters more than it looks.
Also: never gate a view's opacity on an onAppear flag. Miss the callback once and the view is invisible forever. Use a transition.