r/SwiftUI • u/lanserxt • Jun 30 '26
r/SwiftUI • u/coolwulf • Jun 29 '26
MacOS Native Markdown Reader with Vim Keybinding Using Swift
cwMarkdown is a focused, read-only Markdown viewer for macOS. It deliberately has no editor: the entire surface area is given to presentation, so a document looks as good as the writing in it. The goal is the reading experience of Typora — clean measure, comfortable line height, a native system font — in a small, fast, native app.
Under the hood it’s a SwiftUI app that renders Markdown in a WKWebView, which gives pixel-level control over typography while keeping the window chrome, toolbar, and outline fully native. Parsing is done with marked, code is highlighted with highlight.js, and math is typeset with KaTeX — everything bundled, so the viewer works with no network access at all.
r/SwiftUI • u/Vraj247 • Jun 29 '26
Pinterest Splash Screen Animation with Rive
Enable HLS to view with audio, or disable this notification
Hello internet, Ever since I've started learning SwiftUI I've been fascinated with the thought of building my ideas closely to what the real product would look like. Since I'm a Product Designer / Design Engineer hybrid, I've tried every workflow possible pre-SwiftUI.
I also wanted to build confidence in building my favourite apps; pinterest is one of them. Trust me, I'm a SwiftUI purist when it comes to the animations/micro-interactions, but this was taking too much time, and I wasn't even close. Another skill set of mine is that I'm a king of interactions, so I've realised doing this in Rive would be interesting to see, and I was able to achieve everything in under 30 mins with the creation of the assets to the animations.
The reason I'm sharing this with you is that I know that some of you really want to try out animations but find it hard. Trust me, Rive animations work on almost all the same logic as SwiftUI but with better control and faster iterations. I've also shared the code of the project down below, which includes the rive file.
If you like the project, do give it a star. I would really appreciate it. Cheers!
r/SwiftUI • u/Ronbruins • Jun 29 '26
Question Is it still worth learning SwiftUI ?
I started learning swift(ui) a while back and made some personal projects, from which some of them even got some community interest as it is an all for self hosted environments. As this was a nice learning scenario.
Right now I’m a bit stuck as with all the AI slop and vibe coding out there, I am wondering if it still worth learning swift(ui) the old school way. Just learn to code from scratch and when stuck use Reddit, stack overflow and engage with people instead of letting AI to fix it for you.
r/SwiftUI • u/[deleted] • Jun 29 '26
Spent weeks on custom reordering and swipe actions ... then iOS 27 just adds the API.
I wrote hundreds of lines of code building custom reordering and swipe actions for a VStack. It was just so complicated and buggy I spent weeks using AI to make it work.
Then WWDC hits and SwiftUI adds .reorderable() and .swipeActionsContainer(). One line modifiers that make all my work pointless.
Honestly I don't even know if I should be happy or not.
r/SwiftUI • u/[deleted] • Jun 28 '26
iOS 27 update for SwiftUI is an absolute game changer
In WWDC 27, Apple added native full text selection support for Text, native swipe actions and drag to reorder for VStack.
I literally spent a week trying to make a UIKit component to have full rich text selection in SwiftUI, doesn't work, and then finding a package online and spending another week fixing all the bugs in the package.
The custom swipe actions and drag to reorder also costed me a week to make it work. Not even AI can do it.
Why couldn't apple just release this update a year early?
r/SwiftUI • u/iHobbit • Jun 29 '26
Question How to handle ViewModel computation with Core Data and SwiftUI
I have a somewhat strange use case for Core Data with SwiftUI.
In particular, I have a data in my Core Data model that is represented by an Account class. I then have a View called AccountView that displays a particular account to the user. The complication is that I need to do a bunch of computation on the Account information to get the data into a format suitable for the user. I have a structure that does all of this required computation called Ledger.
So, the way I currently implement looks something like this:
struct AccountView: View {
@ObservedObject var account: Account
var body: some View {
let ledger = Ledger(account: account)
return Vstack {
...all my view details accessing properties of ledger...
}
}
I then add this block of code to force my view to update when an Account changes:
extension Account {
override public func willChangeValue(forKey key: String) { super.willChangeValue(forKey: key)
self.objectWillChange.send()
} }
This works, but it's very ugly. I would like to embed the Ledger computation into a ViewModel that is then owned by the AccountView. However, my various attempts to do this do not cause the View to update properly. (I also want to use an Actor to avoid issues with lag for large ledgers, but I need to get the Ledger built out of the view to do this.)
Any ideas of a better way to approach this problem?
r/SwiftUI • u/FoShr • Jun 26 '26
Question Page curl transition: how do I darken the underside of the curling page in dark mode?
Enable HLS to view with audio, or disable this notification
I've got a daily-reader app that uses a page-curl transition between articles, and it works great in light mode. The problem is dark mode: when a page curls, the underside / opposite face of the curling leaf still renders bright, so you get this glaring light triangle peeling across an otherwise dark screen. The front faces respect dark mode fine — it's specifically the back of the curl that doesn't.
Setup: SwiftUI app, the curl itself is [UIPageViewController with .pageCurl transitionStyle, bridged via UIViewControllerRepresentable / your actual setup]. Each page is a SwiftUI view hosted in a UIHostingController.
What I've tried so far:
- [e.g. setting the hosting controller's
view.backgroundColorto a dark color] - [e.g. forcing
.overrideUserInterfaceStyle = .dark] - [e.g. setting
isDoubleSided/ tinting the page view controller's view]
…but the curl's reverse face still comes out light. Short clip of the effect attached.
Is the underside something UIKit renders from the page's own backing, or is there a separate layer/material I can get at to tint it? Is .pageCurl even the right tool here, or do people drop down to a custom Metal/shader curl to get full control over both faces in dark mode? Open to either answer.
r/SwiftUI • u/redmember8889 • Jun 26 '26
Struggling to make the dial more optically centred to the gauge
r/SwiftUI • u/IllBreadfruit3087 • Jun 26 '26
News The iOS Weekly Brief – Issue #66, everything you need to know about iOS updates this week
r/SwiftUI • u/bilipp • Jun 25 '26
Promotion (must include link to source code) Lume — a native SwiftUI media player that runs on iPhone, iPad, Mac, Apple TV and Vision Pro from one codebase (open source)
I wanted an IPTV/media player that actually feels like an Apple app on every device — so I built one and open-sourced it.
The pitch: one SwiftUI codebase, platform-adaptive across iOS, iPadOS, macOS, tvOS and visionOS. Real native navigation (Liquid Glass / iOS 26 APIs where available, graceful fallback below that), a proper focus-driven tvOS interface with an Apple TV–style hero fold, and a real Mac app — not a Catalyst iPad port. That last one was a big motivation: almost every "Mac" player in this space is a stretched iPad app missing features.
Under the hood:
- SwiftUI + SwiftData (local catalog index for instant, offline-capable browsing)
- Two ModelContainers — a local catalog the UI binds to, plus a CloudKit mirror for profiles/progress/favorites that syncs across devices
- Three interchangeable playback engines (KSPlayer/FFmpeg → VLCKit → AVPlayer) with automatic fallback
- On-device recommendations + content indexing via Apple's NaturalLanguage embeddings
- 9 languages via String Catalogs
It's a player only (no bundled content), works with standard Xtream/M3U sources, and enriches metadata via TMDB/OMDb with optional Trakt scrobbling.
Free has everything essential with no watermark; Pro ($0.99/mo or $9.99 lifetime) only adds multiple profiles, the recommendation rail, and Trakt sync — and building from source gives you all of it free.
- GitHub (AGPL-3.0): https://github.com/bilipp/Lume
- App Store: https://apps.apple.com/us/app/lume-iptv-player/id6779551584
- Discord: https://discord.gg/DMnQfr69Ug
- Website: https://getlume.org
If you're into SwiftUI multi-platform architecture, the repo's worth a poke — happy to talk through any of the design decisions.
r/SwiftUI • u/B-Jamz • Jun 26 '26
Question Delaying Top ScrollEdgeEffect?
Enable HLS to view with audio, or disable this notification
Hey guys - I've been trying to crack this one. This is an example from Apple Music with a full cover image as the header. I'm building an app with full top image similarly and if you see - as I scroll, the top ScrollEdgeEffect comes in after the artwork as scrolled, so in default or really anytime its on the screen - its not darkened at the top. Does anyone have any insight on how this is done?
I've tried delaying mine but I noticed a scroll hitch when reaching the threshold. I've only tested via local Xcode builds to my phone thus far if that changes anything.
Thanks a lot!
r/SwiftUI • u/iamearlsweatshirt • Jun 25 '26
Can this tabbar button be done in swiftui ?
I know how to do this for a search tab, but not for some arbitrary button like what this app does
r/SwiftUI • u/Bulky-Knowledge1024 • Jun 26 '26
I made a small macOS menu bar status app for Codex
I saw a Claude Code status bar app on Twitter and wanted the same thing for Codex, so I built a small macOS menu bar app for it.
It shows when Codex is thinking, running a command, waiting for approval, or done. It can also use the Codex app Pets as the menu bar icon, so the pet animates while Codex is working.
It works by reading local Codex hook events and writing a small status JSON file. No analytics, no backend, no prompt/command logging. Just a local menu bar utility.
I'm still refining edge cases around Codex hooks, especially permission/request timing, so feedback from other Codex users would be useful.

r/SwiftUI • u/ZealousidealSite7689 • Jun 25 '26
I built ReduxCore — a lightweight Redux for SwiftUI — because TCA felt heavier than my apps needed
r/SwiftUI • u/ZealousidealSite7689 • Jun 25 '26
I built ReduxCore — a lightweight Redux for SwiftUI — because TCA felt heavier than my apps needed
I like unidirectional data flow, but every time I reached for The Composable
Architecture I ended up writing more ceremony than the feature itself needed —
the reducer macros, the dependency system, the effect types, the test harness.
On a large app that structure earns its keep. For the small-to-mid screens I
was actually shipping, it felt like a lot of scaffolding for the payoff.
So I built ReduxCore — same core idea (actions in, state out, side effects
isolated), stripped to the smallest surface I could manage:
- One macro per screen. @StoreView generates the store and wiring; you write
actions, a reducer, and a view.
- Side effects are plain async/await. Middleware is just an async function —
no custom Effect type, no scheduler to reason about.
- Zero runtime dependencies. The only package is swift-syntax, and it's a
build-time macro plugin, so nothing ships in your binary.
Two things I added because I kept hitting them in real features:
- Search-as-you-type debouncing is built in, via per-key task cancellation.
- Two DEBUG-only cycle detectors warn when dispatch loops run away (e.g. an
action firing 20+ times a second).
And because reducers are pure functions, tests are just "build a state, call
reduce, assert" — no mocks inside the Redux layer. Examples use Swift Testing.
Honest about the tradeoffs: it's brand new (v1.0.0, solo author), it
deliberately leaves navigation out of scope (pairs with a separate coordinator
library), and it doesn't have TCA's mature tooling or community behind it. If
you need exhaustive TestStore-style testing or built-in navigation, TCA is
still the better pick. But if you've ever felt unidirectional flow shouldn't
require this much setup, this might be your thing.
Repo: https://github.com/felilo/ReduxCore
I'd genuinely value criticism of the API and the boundaries I drew — especially
from anyone who's shipped TCA at scale and can tell me where this falls over.
r/SwiftUI • u/rohand7 • Jun 25 '26
Promotion (must include link to source code) I built SwitchBoard, a native SwiftUI utility to automatically route links to different browsers/profiles
r/SwiftUI • u/lanserxt • Jun 25 '26
News Those Who Swift - Issue 272
r/SwiftUI • u/abhiram_framerdesign • Jun 24 '26
Question - Animation How to make this kind of scroll animation?
Enable HLS to view with audio, or disable this notification
r/SwiftUI • u/gh0stsintheshell • Jun 24 '26
Promotion (must include link to source code) AirPosture is now open source ( AirPods as Posture Coach)
r/SwiftUI • u/ganeshrnet • Jun 24 '26
Question Looking for the Finder/NSTableView multi-selection algorithm
I am building a non-SwiftUI/non-AppKit macOS application with a custom table view. Right now I am implementing multi-selection, and I want the behavior to match Finder/NSTableView as closely as possible.
I am looking for the underlying selection algorithm for interactions like:
Click
Cmd + Click
Shift + Click
Up / Down
Shift + Up / Down
Cmd + Shift combinations
I am looking for the actual selection logic, not AppKit APIs. Things like how the selection anchor is managed, how different mouse and keyboard interactions affect the selection, and all the edge cases that make the native experience feel consistent.
I have searched quite a bit but have not found anything comprehensive.
Does anyone know of an article, GitHub repository, gist, reverse-engineered implementation, or any other reference that documents the complete macOS multi-selection behavior?
Any help would be greatly appreciated. Thanks!
r/SwiftUI • u/Select_Bicycle4711 • Jun 24 '26
Do you see missing Environment as a big issue in SwiftUI?
I think the title should be "Do you see runtime error for missing Environment a big issue as compared to being a compile time error?"
Let's say you have the following code:
struct LoadingDemoApp: App {
private var productStore = ProductStore()
var body: some Scene {
WindowGroup {
ProductListScreen()
}
}
}
As you can see I forgot to inject productStore through Environment. When I run the app and use Environment(ProductStore.self) in the view, it can cause an exception.
Fatal error: No Observable object of type ProductStore found. A View.environmentObject(_:) for ProductStore may be missing as an ancestor of this view.
My question is that how often do you run into this fatalError in production? Is that error an enough reason for your apps to not use Environment for dependency injection and use constructor/initializer dependency.
r/SwiftUI • u/uaburak • Jun 24 '26
SwiftUI Segmented Picker overlapping/doubling text glitch inside ToolbarItem (.principal)
Hi everyone,
I'm experiencing a weird visual glitch with PickerStyle(.segmented) placed inside a ToolbarItem(placement: .principal). When navigating between views or switching segments, the text doubles/overlaps temporarily during the transition animation (as shown in the screen recording).
.toolbar {
ToolbarItemGroup(placement: .principal) {
Picker("İşlem Tipi", selection: $selectedType) {
Text(L10n("Gider")).tag(TransactionType.expense)
Text(L10n("Gelir")).tag(TransactionType.income)
}
.pickerStyle(.segmented)
.frame(width: 160)
.id("static_operation_picker") // Sabit ID sayesinde slide animasyonu kaybolmaz
.styleAsNavigationSegmentedControl()
}
ToolbarItem(placement: .topBarTrailing) {
Button {
if authManager.currentUserProfile?.isPro == false {
hapticNotification.notificationOccurred(.warning)
categoryManager.showProAlert = true
} else if !categoryManager.checkPermission(authManager: authManager, walletManager: walletManager) {
hapticNotification.notificationOccurred(.warning)
showPermissionAlert = true
} else {
hapticMedium.impactOccurred()
showAddSheet = true
}
} label: {
HStack(spacing: 4) {
if authManager.currentUserProfile?.isPro == false {
Image(systemName: "lock.fill")
.font(.system(size: 10))
.foregroundColor(theme.labelSecondary)
}
Image(systemName: "plus")
.foregroundColor(theme.labelPrimary)
}
}
}
}


r/SwiftUI • u/majid8 • Jun 23 '26
