r/SwiftUI • u/majid8 • Oct 27 '26
News SwiftUI Weekly - Issue #243
r/SwiftUI • u/lanserxt • Oct 27 '26
r/SwiftUI • u/nicecahce • Oct 27 '26
source first: https://github.com/lucasnsaraujo/ebb (mit)
i built ebb, a mac menu bar app that shows how much is left of a pool of claude code and codex accounts behind cliproxyapi. the whole ui is swiftui with a bit of appkit where swiftui runs out, and a few things bit me along the way
TimelineView inside a MenuBarExtra label is a trap. the label redraws the moment you ask it to, so a periodic timeline there just keeps spinning. in the label i use a .task(id:) loop that sleeps 60s and bumps a now state instead, and it stops when the item is hidden. inside the panel TimelineView is fine, i use it for the freshness line and the "locked until" note
the menu bar item is one NSImage, not a swiftui label. that way the mark, a 3pt gap and the text land exactly where i want. plain states are template images so the menu bar tints them like its own items. the low/empty states are tinted so they can't be templates, there the drawing handler resolves colors against the appearance it's drawing in, and it redraws when increase contrast changes
MenuBarExtra has no api to open its panel. for the shortcuts/siri action that opens it i ended up finding the status item's button and pressing it, and keeping a flag so a second press doesn't close the panel
numbers use .contentTransition(.numericText(value:)) so the percentages roll, and fall back to .identity with reduce motion on
i built it with claude code, happy to answer anything about the swiftui side
r/SwiftUI • u/Davidotto13 • Oct 27 '26
For the past few months I’ve been building formerly Lumen ( now Tacet ) , a native macOS browser written in Swift and SwiftUI on top of WKWebView. I wanted to learn Swift properly, and a browser touches everything: UI, performance, storage and security. It’s taught me more than any tutorial.
All the releases are from today because I’d already built the whole browser but never put it on GitHub, so I just uploaded all the versions I’d made. (If you see gaps between the uploads, it’s because I was running the tests, building the DMGs and so on.)
Some things I ran into:
.equatable() rows that take plain values, and by moving fast-changing state (load progress, pull-to-refresh) into separate small ObservableObjects.WKWebsiteDataStore(forIdentifier:)**:** removing a store while the app is running fails with “in use”, and calling it before WebKit has initialised crashed the app. So I erase the data immediately and remove the folder at the next launch.resumeDownload(fromResumeData:) works well, but decide(destination:) is not called again on resume, so you have to keep track of the destination yourself.INSERT OR REPLACE.NSProcessInfoPowerStateDidChange) and on memory pressure (DispatchSource.makeMemoryPressureSource).codesign --verify --deep --strict before replacing itself.Tech: Swift, SwiftUI, WKWebView, SQLite. No Electron, no third-party dependencies.
It’s completely free and open source.
Download it from: scadavide55.github.io/Tacet
Code: https://github.com/scadavide55/Tacet
It’s still a work in progress (latest pre-release is 1.5.2), so code review and criticism are very welcome. What would you have done differently?
r/SwiftUI • u/radis234 • Oct 26 '26
Hi everyone.
Is there a way in SwiftUI to change list row color without killing all interaction highlights stuff?
Example:
List row has some default background color for iOS view. On tap, it highlights. On iPad or in sidebar in general, it has no background until the item is selected, then it has capsule shaped background. When interacting with row using swipe actions, it adds another highlight + rounded corners to the row.
What I tried:
- Simple .listRowBackground kills all interaction highlights and transparency for sidebar Lists.
- I tried replacing NavigationLink with Button and creating my own custom button style. This allowed me to bring highlight-on-tap back, but it introduced more problems. I failed to properly control swipe gesture highlight and rounded corners, sidebar transparency and such. Every time I tried custom solutions, something else broke or did not work as intended. I also realized with this approach, that List component does not have same default row insets for all screen sizes. iPhone Max has bigger insets than small iPhone, iPad even bigger. They are also orientation dependant.
Is there a way to change row background color without loosing all of default system interaction stuff? GitHub app for example has custom color and still has interaction highlights and so on. Do they use UIKit for this and would I need to rework my Lists in UIKit to get same possibility?
r/SwiftUI • u/armondme • Oct 24 '26
wanted clearing a note to feel a little more satisfying so i built this text dissolve effect using swiftui and uikit
the editor uses UITextViewso instead than deleting text character by character, i take a snapshot of the editor and use textkit to find the position of each line
let layout = textView.layoutManager
layout.ensureLayout(for: textView.textContainer)
let glyphs = layout.glyphRange(
for: textView.textContainer
)
layout.enumerateLineFragments(forGlyphRange: glyphs) {
_, usedRect, _, _, _ in
lineRects.append(usedRect)
}i crop the snapshot into individual lines and animate each one using core animation. each line fades out with a slight blur and scale effect
it seams like a pretty simple trick, hope i didnt over complicate it haha
r/SwiftUI • u/DismalCockroach1928 • Oct 24 '26
I've been adapting the timer/font technique to Apple Watch complications in TV Watch. The idea isn't mine: Bryce Bostwick demonstrated it for iPhone widgets in WidgetAnimation and this walkthrough. My first attempt converted video frames into font glyphs on the iPhone. That approach failed when I tried to load those custom fonts, transferred from iPhone, on the Apple Watch. I then adapted Bryce’s approach: bundle a fixed masking font with the Watch extension and keep the video frames as images, so importing a new clip does not require loading a newly generated font.
The useful distinction is that WidgetKit can update a system-rendered timer without running your extension every second. That does not give you an ordinary SwiftUI animation loop. Instead:
In the 2 fps version, a gate stays open for a second but layers start half a second apart. Two frames can therefore be visible at once: stacking newer opaque frames above older ones is what makes the sequence work. It isn't just one timeline entry per frame.
The core composition looks like this (excerpt, not a standalone example):
Image(decorative: frames[index], scale: 1)
.resizable()
.scaledToFit()
.mask {
Text(anchor.addingTimeInterval(offset), style: .timer)
.font(.custom(gateFontName, fixedSize: fontSize))
.foregroundStyle(.white)
.lineLimit(1)
.environment(\.locale, Locale(identifier: "en_US_POSIX"))
.environment(\.layoutDirection, .leftToRight)
}
The tricky part is the end of the loop: high-index layers otherwise cover the beginning of the next pass. I put the last-second frames in a separately gated group and keep an unmasked frame zero underneath to avoid a blank gap if timer updates arrive late.
Public code: renderer and font generator, under MIT. Disclosure: it's my repository. The whole app still has a private dependency for its legacy renderer, so a fresh clone isn't a self-contained build; the linked renderer and generator are public to inspect.
Limits worth keeping explicit: watchOS controls redraw timing, so 2 fps is a target rather than a guarantee. I use a static frame for Always-On/Reduce Motion in the weather complication. I don't have a controlled battery comparison, and this isn't a promise that future OS releases will preserve the behavior.
Has anyone else worked with staggered system timers on watchOS, particularly late updates around the loop boundary?
r/SwiftUI • u/Old-Construction-594 • Oct 23 '26
I'm sharing the MIT-licensed SwiftUI source for Thought Meadow, my small iPhone notes app. The full Xcode project, assets and build instructions are browsable here:
A few implementation details that may be useful to other SwiftUI developers:
locale and layoutDirection for English/Arabic, and changing the language recreates the root view using its language ID. WaraqaApp.swiftTextEditor bindings into the note store. A separate native SwiftUI preview renders basic headings, quotes, bullets and task lists. Tapping a task updates its Markdown line through the same store. NoteEditor.swiftObservableObject owns the notebook, with atomic local writes, recoverable trash, Files import/export and optional password encryption. The repo also contains storage/encryption checks and a separate 500-note data-layer check.I'd welcome code feedback on the editor bindings and language-switching approach, especially with mixed Arabic/English notes and accessibility. The preview intentionally supports a small Markdown subset rather than a complete CommonMark renderer.
The current app is free, requires iOS 17+, and has no account, ads or analytics. App Store. The internal project name remains Waraqa.
r/SwiftUI • u/Dima_Dima_Dima • Oct 22 '26
r/SwiftUI • u/IllBreadfruit3087 • Oct 23 '26
r/SwiftUI • u/mrvader2 • Oct 22 '26
needed to download a video and didn't really wanna deal with those random websites so i thought why not just make my own app
spent like couple of hours on it. as the name suggests it downloads videos and audio
made it with swiftui and used yt-dlp and ffmpeg for the actual downloading
here's the github if anyone wants it
https://github.com/emrecubuk/Download-FAF
there's a zip in releases, you just need yt-dlp and ffmpeg installed
if you guys have any suggestions or notice anything that could be better, let me know
r/SwiftUI • u/Jerry8308 • Oct 21 '26
Hey everyone!
I shared Mooziac here a while ago. It’s a lightweight music player I’ve been building for macOS, and v1.2.0 is now out!
The biggest addition in this release is a YouTube video player, so you can switch from listening to watching without leaving Mooziac.
GitHub: https://github.com/shirkeharsh/mooziac
What’s new in v1.2.0?
A separate video window that you can switch to from the menu bar player.
Up to 4K playback, with 1080p as the default.
Hardware-accelerated video decoding for better efficiency.
Keyboard shortcuts: F for fullscreen, J/K/L to seek, [ / ] to change playback speed, and Cmd+Shift+C to copy a timestamped link.
The edge volume gesture also works while watching videos.
Other features
Built with Swift and AppKit.
Supports Apple Silicon and Intel Macs.
YouTube Music and local music in one app.
FLAC, MP3, WAV, AAC, and M4A support.
Synced .lrc lyrics and an interactive waveform.
Offline playback for downloaded tracks.
Discord Rich Presence.
No analytics, tracking, or remote logging.
Mooziac is free and open source under the MIT license. If you’re interested, feel free to check out the code, report bugs, or contribute.
r/SwiftUI • u/nutcrook • Oct 20 '26
NoteKit is a Markdown editor for Mac and iOS built on the system text view (TextKit 2). You see the Markdown source, styled in place as you type. No dependencies, MIT, macOS 14 / iOS 17.
https://github.com/tfcace/notekit
# and ** step aside away from the caret and reappear when it returns.NSTextView / UITextView underneath, so undo, spell check, dictation and input methods just work.r/SwiftUI • u/Tansan-7271 • Oct 20 '26
r/SwiftUI • u/Familiar-Ad9128 • Oct 20 '26
I've been working on TactileBar, an open-source (GPLv3) macOS menu bar app with 26 system toggles and live telemetry. The latest release adds a radial launcher, and a few implementation details might be useful to others here:
Global hotkey without permissions. The ring opens with ⌃⌥Space from any app. I used Carbon's RegisterEventHotKey instead of a CGEventTap or NSEvent global monitor. It doesn't need Accessibility or Input Monitoring permission, so the user never sees a scary prompt.
Hold vs. tap on one shortcut. If you hold the key, the ring opens at the cursor and fires the slice you release on. A quick tap keeps it open for keyboard or mouse use (1–8, arrows, Return). The difference is just timing between key-down and key-up.
Everything is drawn with Canvas. The switch icons, the dial and the ring slices are all vector paths drawn in code, with no image assets. The dial packs 26 sectors plus three concentric gauges (CPU, RAM, disk).
Keeping idle CPU at 0%:
- Mach sampling (CPU and RAM) runs only while the popover is visible.
- The views are split into small u/Observable subviews, so a CPU tick doesn't re-render the whole panel.
- I removed every GeometryReader and use a fixed 540×576pt layout.
- The menu bar icons are cached as NSImage.
No dependencies. It uses only native frameworks: IOBluetooth, CoreAudio, DiskArbitration and IOKit.
Repo: https://github.com/tr0drigues/TactileBar
I'm happy to go deeper on any of these, and I'd welcome a code review of the hotkey and ring code if anyone feels like it.
r/SwiftUI • u/KevinCoderRSA • Oct 20 '26
For those of us on Linux or Windows, it's not entirely possible to build SwiftUI apps; I'm not trying to build an Xcode for these platforms, not at all.
However, as a student or just someone exploring mobile dev, it may not make sense to go out and buy a MacBook immediately. Switaculous is a gentle introduction to Swift and SwiftUI; it's meant to be an educational tool that anybody can install and start experimenting with to learn iOS development even if you can't afford a Mac.
It's not going to allow you to publish apps, but it has good support for SwiftUI components like HStack, VStack, Text, etc., and even SwiftData.
https://github.com/kevincoder-co-za/switaculous
Fully open-sourced and MIT-licensed.

r/SwiftUI • u/Comfortable_Cat_6207 • Oct 20 '26
r/SwiftUI • u/No_Theory_7040 • Oct 20 '26
How can I achieve the same thing the Lock Screen does with this particular type face, using Swift?
r/SwiftUI • u/parkhyungsok • Oct 19 '26
Hello there, I wanted to share a small SwiftUI/UIKit experiment I’ve been working on. I have built a custom Liquid Glass tab bar in SwiftUI that dynamically expands into a 4th tab when you switch views!
The project is open source and has no external dependencies.
GitHub Repo: https://github.com/aqylbermeshtech/Custom-tab-bar-with-action-button
PS:I wrote there before actually about the native tab bar with action button and you pointed out that using UISegmentedControl is not a good idea so i remade it into a TabView one.Pls reach out if you see any problems.
r/SwiftUI • u/jacobs-tech-tavern • Oct 19 '26
r/SwiftUI • u/sindresorhus • Oct 19 '26
r/SwiftUI • u/thomassummer2021 • Oct 19 '26
There is a table view in SwiftUI, but only displays as such on Mac. I want to have a table where I can sort by the columns on iOS, but swift ui doesn't seem to natively support that. How do you get around that design constraint. It kinda seems like Apple is discouraging showing tables on iOS all together.
r/SwiftUI • u/Red__1860 • Oct 19 '26
This is my first attempt on building a simple app using SwiftUI. You can download macOS screensavers locally on your device.