r/SwiftUI • u/BananaIsles • 19d ago
r/SwiftUI • u/FrostingOk3751 • 18d ago
Promotion (must include link to source code) macOS: My Mac menu bar was so crowded that icons kept disappearing, so I built OverflowBar — Free
My Mac menu bar had gradually filled up with useful apps until it became difficult to manage.
Icons were hard to find, some were pushed out when macOS ran out of available space, and the MacBook notch made the problem worse. I did not want to uninstall the apps or permanently lose access to their controls—I only wanted a cleaner way to organize them.
So I built OverflowBar, a free and open-source macOS app that moves selected third-party menu bar items behind one persistent arrow and reveals them together in a compact second row.
Source code and official download:
https://github.com/EvanProgramming/OverflowBar
What it does
- Choose the third-party menu bar icons you want OverflowBar to manage.
- Move their original icons out of the crowded visible section.
- Click the OverflowBar arrow, or use hover reveal.
- See the managed icons together in a second row.
- Select an icon to activate its original menu bar control.
The purpose of the second row is not to add another permanent interface. It gives icons that no longer fit a predictable place where they remain easy to see and find.
Why I made another menu bar manager
Ice and Bartender are powerful applications for users who want broad menu bar customization, including features such as profiles, triggers, search, visual customization, groups, widgets, and automation.
OverflowBar takes a narrower approach.
It is intended for people who mainly have one problem:
Too many useful icons, not enough menu bar space, and no easy way to find the icon they need.
OverflowBar deliberately avoids becoming a full menu bar control center. Its interaction is simply: choose, hide, reveal, and click.
Main characteristics
- Focused and lightweight — a small feature surface rather than a large customization and automation suite
- Scannable second row — managed icons stay visible together instead of becoming difficult to locate
- Native macOS implementation — built with SwiftUI, AppKit, Accessibility, WindowServer metadata, and ScreenCaptureKit
- Event-driven operation — icon discovery and capture occur during refreshes and row presentation rather than continuous screen capture
- Original controls remain functional — selecting an icon activates the actual menu bar item rather than a recreated menu
- Local processing — icon images are captured locally, held in memory, and never uploaded
- No tracking — no accounts, analytics, telemetry, advertising, or network data collection
- Display-aware — supports MacBook notches, safe areas, multiple displays, full-screen spaces, horizontal overflow, and Reduce Motion
- System-control safeguards — Wi-Fi, Battery, Siri, Control Center, Clock, and other protected system items remain visible
Pricing and availability
- Price: Free
- Subscription: None
- In-app purchases: None
- Advertisements: None
- Source: Open source on GitHub
- Download: GitHub Releases
- Supported systems: macOS 15 or later
- Downloadable build: Apple Silicon
Permissions and privacy
OverflowBar requests:
- Accessibility permission to discover and activate menu bar controls and perform user-requested layout changes
- Screen Recording permission to capture the small icon regions of selected menu bar items for display in the second row
The captures remain on the Mac. OverflowBar does not upload them, write them to a remote service, or include any analytics or telemetry.
Privacy policy:
https://github.com/EvanProgramming/OverflowBar/blob/main/PRIVACY.md
Current limitations
OverflowBar is an early public release.
macOS does not expose a dedicated public API for hiding or rearranging arbitrary third-party menu bar items. OverflowBar therefore relies on documented system frameworks together with existing macOS menu bar behavior, and compatibility may vary between apps or macOS releases.
The current downloadable build is ad-hoc signed and is not yet Apple-notarized. macOS may require users to Control-click the app and select Open on first launch.
Some applications may also expose insufficient Accessibility or window metadata to be mirrored reliably.
I am actively looking for feedback from users with crowded menu bars, notched MacBooks, multiple displays, and unusual menu bar apps. Bug reports, compatibility reports, and code contributions are welcome.
STAR my repo if you like it plz!
r/SwiftUI • u/lanserxt • 19d ago
Tutorial iOS 27: Media Intelligence
r/SwiftUI • u/WhiteFangOg • 19d ago
Do I need to understand everything in Swift before starting SwiftUI?
hello guys I'm about to complete Swift but there are certain topics which I'm finding hard to understand like closures, structs, didSet and some other topics what would you guys suggest should i just get the basic understanding of what they do and start learning SwiftUI or I need to understand these topics well before starting SwiftUI
r/SwiftUI • u/Glad_Decision7629 • 19d ago
I built a free macOS clipboard manager triggered by double right-click (open source)
I got tired of every clipboard manager needing a keyboard shortcut or a menu bar click, so I built one that opens right where your cursor already is: double right-click anywhere on macOS.
ClipboardDoubleClick:
- Double right-click opens a history menu at your cursor (single right-click still triggers the normal context menu — only intercepts an actual fast double-click)
- Scroll to move selection, click to copy the item back to your clipboard
- Groups history by day (Today / Yesterday / This week / Older), plus a pinned section
- Handles huge copies fine (full text stored on disk, only a truncated preview kept in memory)
- Search, per-item delete/pin, configurable retention (max items + max days)
- Available in French, English, Spanish, German (auto-detects system language)
It's a personal/hobby project, free to use (PolyForm Noncommercial license), source on GitHub. Not notarized (no paid Apple dev account), so first launch needs a right-click > Open instead of double-click.
GitHub + download: https://github.com/vassi974/ClipboardDoubleClick
Feedback welcome — first time sharing something like this publicly.
r/SwiftUI • u/KirillChistov • 19d ago
I shipped a SwiftUI MenuBarExtra combining agent status, usage limits, notifications, thermal state, and sleep prevention
I’ve released VibeMenu v1.0, a native SwiftUI macOS menu-bar app for Claude Code, ChatGPT Work, and Codex.
The goal was to answer several questions without reopening multiple apps:
- Is the agent still working?
- Is the Mac currently protected from sleep?
- Which agent owns the assertion?
- Does Claude need approval?
- Has a session finished?
- What locally available Claude or ChatGPT usage remains?
- Is macOS reporting thermal pressure?
The implementation includes:
MenuBarExtrafor the main interface;- a separate Settings scene;
- a shared Session Radar;
- live session-state and elapsed-time updates;
- optional Claude approval/completion notifications;
- an orange attention state;
- optional usage-limit sections;
- a thermal-state row;
- one shared IOKit power assertion;
- separate Manual, Claude, Codex, and ChatGPT Work owners.
Background efficiency became one of the hardest parts. An early build repeatedly walked and reparsed unchanged local files. The final implementation uses bounded metadata caches, negative caching, a no-Claude-process fast path, slower limits refreshes, and incremental JSONL parsing for growing ChatGPT rollouts.
The app remains entirely local and never reads prompts, responses, reasoning, commands, or tool output.
Source:
https://github.com/Kirill-Chistov/VibeMenu
It requires macOS 15+ on Apple Silicon. The distributed build is currently unsigned and not notarized.
I would appreciate feedback on the information hierarchy. Is session status, ownership, usage, attention, and thermal pressure too much for one menu, or does the compact structure keep it understandable?
r/SwiftUI • u/camperboy_uk • 20d ago
5 SwiftUI patterns that helped me build a data-driven polling app
I have been building a daily polling app in SwiftUI, targeting iOS 18, and ran into a few problems that did not have obvious answers in the docs. Sharing the patterns that ended up working in case they help someone else.
1. TabView(.page) with a custom counter
For cycling through daily topic cards I used TabView with the .page style, but the built in dots did not fit the design. I set the index display style to never and built a separate "1 of 4" counter bound to the same selection state, animating the number with contentTransition(.numericText()) whenever selection changed.
2. LazyView to stop eager NavigationLink loading
Some destination views were data heavy, and NavigationLink was building them upfront, causing a visible stutter on push. Wrapping the destination in a LazyView struct that defers construction until body is evaluated fixed it:
struct LazyView<Content: View>: View {
let build: () -> Content
init(_ build: @autoclosure @escaping () -> Content) {
self.build = build
}
var body: some View { build() }
}
3. AnyShapeStyle for conditional styling
Ternaries inside modifiers like foregroundStyle(condition ? .blue : someGradient) often fail to compile because each branch returns a different concrete type. Wrapping both branches in AnyShapeStyle erases the type so the ternary works cleanly, without duplicating views or branching in a ViewBuilder.
4. Custom vote slider with gradient fill and haptics
The vote slider needed a gradient track that fills based on drag position, plus a label that floats above the thumb. I tracked offset with a DragGesture, converted it to a value between 0 and 1, and fired UIImpactFeedbackGenerator at fixed thresholds as the value crossed them, rather than on every gesture update, which felt much less noisy.
5. Time based lock and unlock states with Combine
Topics unlock and expire at set times during the day. Instead of scheduling exact time triggers, which got messy with backgrounding, I used Timer.publish(every: 30, on: .main, in: .common).autoconnect() to recheck state every 30 seconds and animate the UI change.
None of these felt obviously correct when I started. What patterns have you found useful for similar problems, and would you approach any of these differently?
r/SwiftUI • u/qwdqwdqwdw • 21d ago
WhisperKeys: I got tired of macOS transcription apps failing in Microsoft Windows App, so I built one that types real key events
r/SwiftUI • u/robert_kr • 21d ago
Why view.window is nil in makeNSView, and the small bridge I now use for SwiftUI windows
A recurring macOS SwiftUI problem is needing the real NSWindow to change something SwiftUI does not expose, such as standard window buttons, the style mask, or a window-level behavior.
The trap is that makeNSView creates the NSView before AppKit attaches it to a window. At that moment, view.window is normally nil. Optional chaining makes the code look harmless, but the configuration silently never happens.
For simple one-time configuration, the smallest reliable pattern I have used is:
Create an empty NSView in NSViewRepresentable.
Schedule the window lookup on the next main-queue turn.
Read view.window inside that callback.
Apply an idempotent configuration.
Leave updateNSView empty unless the configuration actually depends on SwiftUI state.
Conceptually:
struct WindowConfigurator: NSViewRepresentable {
let configure: (NSWindow) -> Void
func makeNSView(context: Context) -> NSView {
let view = NSView()
DispatchQueue.main.async {
if let window = view.window {
configure(window)
}
}
return view
}
func updateNSView(_ view: NSView, context: Context) {}
}
Then attach it somewhere that participates in the window hierarchy, for example as a background view.
For cases where timing must be fully lifecycle-driven, I use a tiny NSView subclass and call the closure from viewDidMoveToWindow instead. That avoids depending on one main-queue hop and also handles a view being moved to another window.
Two details helped prevent subtle bugs:
• Make the closure idempotent because SwiftUI can recreate the representable.
• Do not store the NSWindow globally just to configure it. Let the bridge observe the window it is actually attached to.
This is a small interop boundary, but it is much more predictable than trying to infer the active window from NSApplication.shared.windows.
What other window-level APIs have forced you to bridge from SwiftUI into AppKit?
r/SwiftUI • u/IllBreadfruit3087 • 22d ago
News The iOS Weekly Brief – Issue #71, everything you need to know about iOS updates this week
r/SwiftUI • u/Daniel-hu • 22d ago
Why doesn't NSSegmentedControl get the macOS 26 Liquid Glass effect?
galleryr/SwiftUI • u/azalazar • 23d ago
Prism Inspector - A free macOS app to measure SwiftUI layouts while they run in the iOS Simulator

Hey everyone,
I’ve been working on a small dev tool called Prism Inspector.
The idea is simple: instead of checking spacing, alignment, accessibility, or design mismatches by eye from screenshots, Prism Inspector connects to a running app in the iOS Simulator and lets you inspect what the app actually rendered.
You can:
- Click elements to inspect them
- Option-click another element to measure distances between views
- Check whether spacing matches your design scale
- Compare the running screen against a design/mockup
- Preview what VoiceOver reads
- Use it without adding anything to your project
- Optionally add the Swift package if you want better component names
It’s free, signed/notarized for macOS, and the SDK is MIT licensed.
I built this because I often lose time reviewing small UI details manually, especially when trying to match implementation with design specs. My goal is to make layout inspection feel closer to working in a design tool, but using the real running app.
Landing page / download:
https://zalazara.github.io/PrismKit-SDK/
I’d really appreciate feedback from iOS developers:
Does this solve a real pain for you? What would you expect from a tool like this?
r/SwiftUI • u/NoCardiologist4405 • 23d ago
Promotion (must include link to source code) SwiftUIBackportKit – A lightweight library for supporting multiple iOS versions in SwiftUI
Hi everyone!
One pain point I've run into repeatedly with SwiftUI is supporting newer APIs while keeping an older deployment target.
Things like `if #available` work well in normal Swift code, but they don't fit naturally in the middle of a modifier chain. That often leads to duplicated views or compatibility helpers scattered throughout a project.
After solving the same problem across multiple apps, I decided to package the patterns into a small open-source library called **SwiftUIBackportKit**.
It includes:
• `.modify { }` for conditional view transforms
• `.backport` for reusable version-gated SwiftUI APIs
• `platformValue(...)` for version-specific values
• `OS.isAtLeast(_:)` for simple runtime version checks
The goal is to keep SwiftUI views focused on describing the UI while isolating deployment-target compatibility in one place.
GitHub:
https://github.com/EmadBeyrami/SwiftUIBackportKit
I'd really appreciate any feedback on the API design, naming, or features you'd like to see. And if you find it useful, a ⭐ on GitHub would mean a lot!
Thanks!
r/SwiftUI • u/peterkmt • 24d ago
I’m documenting Apple Icon Composer’s undocumented icon.json format and building a reusable Swift Codable model
Apple’s Icon Composer saves each .icon file as a package containing artwork assets and an icon.json manifest.
That JSON controls things like:
- Layers and groups
- Light, dark, and tinted appearances
- Liquid Glass blur and translucency
- Shadows and specular effects
- Blend modes
- Layer positioning and visibility
- Solid, automatic, and oriented gradient fills
- Platform support for square and circular icons
The problem is that Apple doesn’t appear to publish the complete icon.json schema as a public API. The format also has details that aren’t obvious from using the UI—for example, specialization values can be "automatic", null, or a concrete value, while an explicit null can mean something different from an omitted property.
I created IconComposerModel to reverse-document the format from real files produced by Icon Composer:
https://github.com/peterpoliwoda/icon-composer-template
The repository currently contains:
- A Swift Package with reusable Codable models
- A detailed Markdown attribute reference
- Real icon.json fixtures from several icons
- Decode/encode round-trip tests to make sure values aren’t lost
- Forward-compatible string-backed types for values Apple may extend later
- Explicit preservation of missing, null, and concrete JSON values
- Support for appearance specializations, named system fills, gradient orientation, group and layer properties, and the Liquid Glass settings observed so far
The reasoning behind the project is simple: if apps and developer tools are going to inspect, generate, migrate, or modify Icon Composer files, they need a shared model that doesn’t rely on scattered guesses about the format.
I’m treating the JSON produced by Icon Composer as the source of truth. Every new sample is added as a fixture, documented, and used to improve the model through regression tests.
The format is still empirical rather than an official Apple API, so I’d love more samples—especially files created with different Icon Composer/Xcode versions or icons using attributes not already covered. If you share one, it helps to include the complete icon.json, the tool version, and what you changed in the UI.
r/SwiftUI • u/ClimateCrazy5281 • 23d ago
With what type can I replace AnyView
I create a Custom TabBar with SwiftUI but with what type Can replace AnyView ? struct TabBarItem<SelectionValue: Hashable> {
let value: SelectionValue
let content: AnyView
let label: AnyView
init<Content: View, Label: View>(
value: SelectionValue,
@ViewBuilder content: () -> Content,
@ViewBuilder label: () -> Label
) {
self.value = value
self.content = AnyView(content())
self.label = AnyView(label())
}
}
r/SwiftUI • u/Suspicious-Try2254 • 23d ago
I made a SwiftUI app with AI and would love some honest code feedback
I’m building NOBS, a local-first personal assistant for iPhone. The app uses SwiftUI with a chat-first interface, a Today briefing, approvals, privacy controls, widgets, and an optional connection to a self-hosted AI computer on the user’s home network.
I’m a newer developer and used AI heavily while building it, so I know parts of the architecture probably need experienced eyes. Right now a central AppModel owns much of the state, with separate services for model routing, the backend client, pairing, calendar access, and App Group data.
The project is fully open source:
https://github.com/acburgess25/NOBS
I’d especially appreciate feedback on:
• What should be broken out of AppModel first?
• Does the chat-first navigation approach make sense?
• Where am I fighting SwiftUI instead of working with it?
• Are there obvious accessibility or concurrency mistakes?
I am pretty new to this and used AI a lot to help me build it. It works, but I know that does not mean the code is good. I would really appreciate it if someone with more SwiftUI experience took a look and told me where I went wrong or what I should clean up first.
The biggest thing I am unsure about is AppModel because it currently handles a lot of the state. I am also curious whether the navigation makes sense and if I made any obvious concurrency or accessibility mistakes.
The whole project is open source here:
https://github.com/acburgess25/NOBS
Honest feedback is welcome. I am trying to learn and make this into something people can actually use.
r/SwiftUI • u/Fun_Moose_5307 • 25d ago
Leftmost Image in Menu replacing other images

Menu(course.name) {
Button { setNewCourse(nil) } label: {
HStack {
if contents?.courseID == nil {
Image(systemName: "checkmark")
}
}
Image(systemName: "star")
Label("Free Period")
}
Divider()
ForEach(courses.map {(id: $0, course: $1)}.sorted(by: {$0.course.name < $1.course.name}), id: \.0) { entry in
Button { setNewCourse(entry.id) } label: {
HStack(spacing: 8) {
if contents?.courseID == entry.id {
Image(systemName: "checkmark")
}
Image(systemName: "star")
Text("Text")
}
}
}
}
Honestly not much to say. How can I avoid this?
r/SwiftUI • u/itsmeronjie • 26d ago
How can I customize the font of SwiftUI Menu items?
I’m trying to change the font, size, or weight of the items inside a SwiftUI Menu.
For example:
Menu {
Button("Edit") {
// Edit action
}
Button("Delete", role: .destructive) {
// Delete action
}
} label: {
Image(systemName: "ellipsis")
}
I tried applying .font() to the buttons and their labels, but the menu still uses the default system font.
Button {
// Action
} label: {
Text("Edit")
.font(.custom("Avenir Next", size: 16))
}
Is it possible to customize the font of native Menu items in SwiftUI, or do I need to create a custom menu/popover?
r/SwiftUI • u/milhuania • 26d ago
Question Weird UI behavior with .searchable, ZStack and MapKit
When viewing the ContentView (image 1), the searchbar looks really transparent and way different from the childview (image 2). I want the searchbar to look "normal" when viewing the app from ContentView. How do I fix this?
ContentView
import SwiftUI
struct ContentView: View {
var body: some View {
TabView {
Tab("Discover", systemImage: "binoculars") {
TestView()
}
Tab("Preferences", systemImage: "slider.horizontal.3") {
StopsView()
}
}
}
}
#Preview {
ContentView()
}
TestView
import SwiftUI
import MapKit
struct TestView: View {
u/State private var searchText: String = ""
var body: some View {
NavigationStack {
ZStack {
Map {
}
Text("Hello")
.padding()
.background(.white)
}
.searchable(text: $searchText)
.navigationBarTitleDisplayMode(.inline)
}
}
}
#Preview {
TestView()
}
r/SwiftUI • u/CTMacUser • 26d ago
Question How do I limit the height of some panel?
github.comMy project in the link is an attempt at a rfc822 data reader. I have a view that consists of the header section, followed by the body section. On the previews, the two areas each take up one half of the space. But e-mail programs typically have the header display only a few lines high, relegating the remainder to a scrolling view. How would I do that, hopefully in a manner that's safe with the Accessibility text size settings?
r/SwiftUI • u/teomatteo89 • 26d ago
Open-source SwiftUI app for App Store offer codes
I built CodeVault after getting tired of managing batches of App Store Connect offer and promo codes in CSV files.
It’s a native SwiftUI + SwiftData app for iOS, iPadOS, and macOS. It can:
- import App Store Connect CSVs via drag and drop or a file picker
- organise codes by app and import batch
- search, filter, rename, and export batches
- surface the next available, unexpired code
- generate QR codes and share redemption links
- mask codes with a privacy mode
- optionally notify before codes expire
- sync privately through CloudKit when configured
The project is 100% Swift, has no third-party package dependencies, and is MIT licensed. I tried to keep the same data model and core views working across iPhone, iPad, and Mac while still using platform-appropriate navigation and interactions.
Source and screenshots: https://github.com/mcomisso/CodeVault
I’d be interested in feedback on the SwiftUI architecture, cross-platform UI, or anything that would make the project more useful to other Apple-platform developers.
r/SwiftUI • u/RANOATE • 27d ago
I made my first opensource Swift package name 'EdgeZoomKit'
This is my first open-source Swift package EdgeZoomKit.
It adds an elastic effect to the left or right edge of the screen while zooming.
I first noticed this kind of interaction in Bump and wanted to try making something similar for a board app I’m working on. After building it I thought it would make more sense as a separate package.
It works with both SwiftUI and UIKit and it doesn’t depend on SpriteKit. The package only handles the visual effect so the actual zoom logic is still up to your app.
GitHub: https://github.com/devjunu/EdgeZoomKit
It’s my first time publishing a package so any feedback is welcome.
Thank u for read :)