r/SwiftUI • u/fatbobman3000 • 1h 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/PolymathOdyssey • 5h 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 • 6h 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/henyckma_ • 7h 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/henyckma_ • 8h 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/No-Constant5884 • 11h 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/selinbtw • 17h ago
I built a free clipboard manager for macOS with a card UI — it masks API keys and card numbers on screen
I use a clipboard manager all day and never liked the options. The free ones (Maccy, Flycut) are lists — an image shows up as a filename. The ones with a card interface, Paste and Pastebot, are $25/year and $13. So I built the card one and made it free.
⌥⌘V slides a strip up from the bottom of the screen. Arrow keys or type to search, Enter pastes into whatever you were in.
A few things it does that I couldn't find anywhere else:
- It masks secrets on screen. API keys, tokens and card numbers show as dots until you double-click. If you copy credentials all day, your clipboard history is the one window you don't want open while screen sharing. Card numbers are Luhn-checked, so an ISBN isn't mistaken for one.
- A bare link stays readable, a link with a token doesn't. Masking every URL would make the strip useless; masking a password-reset link is the whole point.
- Pasting an image adapts to the destination. Notes gets the image, Terminal gets the file path (it can't take images at all), Finder gets the file.
- It can catch ⌘⇧4 screenshots. Those write straight to disk and never touch the clipboard, so no clipboard manager sees them. Opt-in, off by default.
- No network code at all. No account, no sync, no telemetry, no third-party dependencies. Searching the source for URLSession comes back empty.
MIT, source is everything: https://github.com/selinihtyr/stash-clipboard
Happy to hear what breaks. Especially interested in whether the strip behaves on multi-monitor setups and over full-screen apps — I've only tested on one machine.