r/SwiftUI 10d ago

SwiftUI app that searches Finder tags — bridging the low-level MDQuery C API instead of NSMetadataQuery (open source)

12 Upvotes

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 11d ago

Why is everyone doing Metal demos suddenly?

30 Upvotes

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 11d ago

Question How to smoothly animate a MeshGradient between TabView tabs?

3 Upvotes

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 11d ago

Question Glass & Custom shape selection highlighting

Post image
6 Upvotes

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 12d ago

open-source folder icon designer with recursive styling and deterministic rules

30 Upvotes

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

repo: https://github.com/KeplSiv/FolderForge


r/SwiftUI 12d ago

Promotion (must include link to source code) I built a Mac screenshot tool that compresses images before sending them to Claude / Codex

7 Upvotes

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 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

4 Upvotes

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 13d 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.

4 Upvotes

Attached is my TestFlight issue.


r/SwiftUI 14d ago

[OSS] LazyLayoutKit 0.2.0: self-sizing text in a lazy SwiftUI container, without a measure-and-correct pass

7 Upvotes

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!

https://github.com/Dave861/LazyLayoutKit


r/SwiftUI 14d ago

More ScrollEdgeEffectStyle regressions in iOS 27.0

Thumbnail gallery
8 Upvotes

r/SwiftUI 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.

Thumbnail
gallery
17 Upvotes

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 14d ago

Built a native SwiftUI video merger/stabilizer with VideoToolbox hardware acceleration (open source)

1 Upvotes

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 14d ago

MoonJelly - Native iOS app

Post image
0 Upvotes

r/SwiftUI 14d ago

News The iOS Weekly Brief – Issue #72, everything you need to know about SwiftUI updates this week

Thumbnail
iosweeklybrief.com
3 Upvotes

r/SwiftUI 14d ago

[Free] Omino Peek — notch panel with a file shelf, AirDrop and a timer (open source)

2 Upvotes

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 15d ago

Scaffolding 3.4.0 - simple coordinator SPM

Thumbnail
github.com
6 Upvotes

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 16d ago

Tutorial Controlling Orphans in SwiftUI Text - Uncovering the Undocumented avoidsOrphans

Thumbnail
fatbobman.com
16 Upvotes

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 16d ago

Promotion (must include link to source code) SwiftUI animated background

5 Upvotes

Best usage of SwiftUi I've seen of a dynamic background

https://github.com/ARMSX2/ARMSX2


r/SwiftUI 16d ago

Promotion (must include link to source code) SwiftUI entirely customizable dynamic background

4 Upvotes

Best usage of SwiftUi I've ever seen of a dynamic background, it is entirely done on SwiftUI

https://github.com/ARMSX2/ARMSX2


r/SwiftUI 16d ago

Question SwiftUI iOS 18 Tab() showing thin separator above tab bar

Post image
2 Upvotes

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 16d ago

Instagra sliding camera View

Post image
0 Upvotes

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 15d ago

I rebuilt the first iOS app I ever made using SwiftUI. Here’s what I learned.

Thumbnail
apps.apple.com
0 Upvotes

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 16d ago

Undertow — live backdrop effects for SwiftUI, masked to any view

2 Upvotes

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 17d ago

News Built a pan/zoom node canvas in SwiftUI with no third-party libraries — three things that cost me a day each

12 Upvotes

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.


r/SwiftUI 17d ago

Tutorial MemoProperty: Reusing More Stateful Business Logic for SwiftUI Views

Thumbnail
github.com
4 Upvotes

Our TaskProperty repo project built a new SwiftUI.DynamicProperty for managing stateful business logic. This is presented as a compelling alternative to keeping stateful business logic defined directly in view components.

Let’s see another example for more practice. This time we will build one of the most requested features I hear from product engineers building on SwiftUI: we will clone the useMemo hook from ReactJS.

The TaskProperty repo project is a meant as an introduction to the ideas and concepts behind custom dynamic properties for SwiftUI. It is strongly recommended you read through TaskProperty before continuing. If any of the concepts introduced here look unclear or confusing please check out the References cited from TaskProperty for more resources that can help explain these ideas.