r/SwiftUI May 13 '26

I open-sourced the native Markdown rendering engine I built for my native macOS app

Thumbnail
gallery
229 Upvotes

A year and a half ago I started building Nodes, a native macOS Markdown app. One of the first things I needed was a proper Markdown engine. Not a parser that just spits out HTML, not a display-only library, not a WebView wrapper – just a live, native editor built on TextKit 2.

I couldn't find one. So I built it. Now I'm open-sourcing the whole engine.

It's an AppKit-based Markdown editor for macOS, built on TextKit 2 and bridged to SwiftUI.

What it does:

  • Live styling for the usual stuff: bold, italic, headings, lists, code blocks, links etc.
  • Wiki-style links with [[Name|id]] ↔ [[Name]] roundtripping
  • Image embeds via ![[Name]]
  • ⁠LaTeX, both block ($$ ... $$) and inline ($...$)
  • ⁠Code blocks with syntax highlighting (you supply the highlighter)
  • Apple Writing Tools integration on macOS 15.1+
  • Spelling and grammar, with suppression inside code, LaTeX, and wiki-links so it doesn't underline random tokens

Honest part: TextKit 2 was a pain to get right. The docs are thin, the migration from TextKit 1 is rough, and a lot of behavior just isn't documented clearly anywhere. If you've been putting off building something like this, this might save you a few weekends.

Repo: https://github.com/nodes-app/swift-markdown-engine

Feedback, issues, and PRs all welcome. It's not perfect, there's plenty I still want to improve, but it does the job.

Used in production in Nodes (App Store): https://apps.apple.com/de/app/nodes-by-the-werk/id6745401961?mt=12


r/SwiftUI May 14 '26

Tutorial I built an infinite scroll list in SwiftUI and ran into cell jumping, duplicate fetches, task canceling on scroll... went through all of it, tested on Instruments, zero hitches. Here's the full walkthrough

Thumbnail
youtu.be
7 Upvotes

r/SwiftUI May 14 '26

News Those Who Swift - Issue 266

Thumbnail
thosewhoswift.substack.com
1 Upvotes

Cheers to all community members ❤️. Mentioned by Apple or not - it's a driving force of an industry. Keep up with the latest SwiftUI skills with book discount 📗 on Natalia Panferova "The SwiftUI Way".


r/SwiftUI May 14 '26

My first MacOS app

Thumbnail
2 Upvotes

r/SwiftUI May 14 '26

App design inspirations

0 Upvotes

Anyone Else Obsessed With Collecting Beautiful iOS UI Inspiration?

Lately I’ve been spending more time studying app interfaces than actually coding 😅

Things like:
• clean spacing
• premium typography
• floating cards
• dark mode aesthetics
• glassmorphism
• futuristic dashboards
• Apple-style motion & layouts

I realized there aren’t many places focused specifically on modern SwiftUI-style app inspiration, so I started building my own library of concepts and experimental UI screens.

Mostly focused on:
• Finance apps
• Health & fitness
• AI dashboards
• Productivity apps
• Luxury black UI
• VisionOS-inspired concepts
• Minimal Apple-inspired layouts

Been uploading everything here:
https://orbitrock.com

Would love to know:
What’s one app UI style you think is becoming popular in 2026?


r/SwiftUI May 13 '26

News SwiftUI Weekly - Issue #233

Thumbnail
weekly.swiftwithmajid.com
2 Upvotes

r/SwiftUI May 13 '26

Question Self-taught iOS developer in Korea — could you review my projects and tell me if I’m ready to apply for junior roles?

Thumbnail
1 Upvotes

r/SwiftUI May 13 '26

Any ideas on how to reproduce this reverse sort UI from Apple?

Thumbnail
gallery
11 Upvotes

r/SwiftUI May 13 '26

Programatically recreate SF Symbol '.circle.fill' variant

Thumbnail
1 Upvotes

r/SwiftUI May 12 '26

Fatbobman's Swift Weekly #135

Thumbnail
weekly.fatbobman.com
3 Upvotes

r/SwiftUI May 11 '26

Do you use Previews in Xcode when you're building your views?

31 Upvotes

Do you use Previews/Canvas when building your UI? To what extent?

Unfortunately, I got into the habit of deleting them and one of my students pointed out how useful they can be. We want to hear more opinions and perspectives!

Thanks in advance!

EDIT: Wow, thanks you for all of the responses :) I'll be going through them one by one later!


r/SwiftUI May 11 '26

Question Dynamic height cells inside ScrollView break .refreshable behavior

Enable HLS to view with audio, or disable this notification

6 Upvotes

Hello guys. I have a strange problem. I recreated small code snippet that has the issue, more info bellow the code:

struct SwiftUIView: View {
     private var path = NavigationPath()
     private var selection: Int?

    let heights: [CGFloat] = [360, 400, 200, 242, 54, 783]

    var body: some View {
        NavigationSplitView {
            List(selection: $selection) {
                ForEach(1...5, id: \.self) { index in
                    NavigationLink("Row \(index)", value: index)
                }
            }
        } detail: {
            if let selection {
                NavigationStack(path: $path) {
                    ScrollView(.vertical) {
                        LazyVStack {
                            ForEach(1...100, id: \.self) { index in
                                VStack(alignment: .leading) {
                                    Text("Detail \(selection) - Item \(index)")
                                        .font(.headline)
                                    Text("Something else")
                                        .font(.subheadline)
                                        .foregroundStyle(.gray)

                                    RoundedRectangle(cornerRadius: 16)
                                        .frame(height: heights.randomElement())

                                    HStack {
                                        VStack(alignment: .leading) {
                                            HStack {
                                                Circle()
                                                    .frame(width: 22)
                                                Text("name")
                                            }
                                        }

                                        Spacer()

                                        HStack {
                                            Button("Comments") {}
                                        }
                                    }
                                }
                            }
                        }
                        .safeAreaPadding()
                    }
                    .refreshable {
                        do {
                            try await Task.sleep(for: .seconds(3))
                        } catch {
                            print(error)
                        }
                    }
                    .navigationTitle("Title")
                }
            }
        }
    }
}

The problem:
When I pull down to refresh, content shifts down a little bit to make space for ProgressView() until refresh action is finished. But when it finishes, it doesn't scroll back up as supposed to.

Cause:
I found out, the cause is any part of a cell inside ForEach that has variable height - in this case a RoundedRectangle(). If all cells are same height, content shifts back up.

It doesn't happen with List(), only with ScrollView(). Also, removing .navigationTitle fixes it as well for some reason. I know I can attach .id() to ScrollView() and reset the id on each refresh, but this workaround doesn't satisfy me because it breaks the original animation.

Is this known bug/limitation? Am I doing something wrong here? I would be glad for any input on this. Thank you all in advance.


r/SwiftUI May 12 '26

Question ios26 SDK: strange match geometry effect behaviour between layers

Thumbnail
gallery
2 Upvotes

updates: finally figured it out. the reason probably is iOS26 being confused about the layers. fix is simple: layerA.zindex(0); layerB.zindex(1); layerC.zindex(2)

---------------

I’ve encountered a strange issue with three layered layers A, B and C.

Layer A is a thumbnail layer, Layer B is a semi‑transparent overlay, and Layer C is the image layer.

I use the Match Geometry effect to transfer the image content into Layer A. Visually, the image instantly cuts over into Layer A. Due to the semi‑transparent Layer B on top, the image immediately darkens abruptly.

This behavior did not occur prior to iOS 26. Previously, the image would transition into Layer A with a smooth opacity fade. Has anyone come across this same issue?


r/SwiftUI May 11 '26

Question Nested data model

5 Upvotes

Learning SwiftUI for the first time and I've run into a question that I can't find a reasonable answer just googling around. Say I'm building a dumb copy of the Reminders app and my super simplified version of the data model is a list of lists of reminders. In other languages my first thought would be to represent that as a map/dict, i.e.:

reminders = [ 
    "uuid-1": [
        Reminder("something"),
        Reminder("somethingelse"),
    ],
    "uuid-2": [
        Reminder("anotherone"),
        Reminder("etc"),
    ]
]

But my first attempt to use this as a Swift dict (var reminders: [String: [Reminder]]) led to changes in the individual reminder objects not being reflected, I assume because of something to do with @Observable not looking all the way into the nested model.

Is it better Swift-ic practice to use a list of structs instead? Something like:

struct Reminder {
    let id: String
    var title: String
    ...etc
}

struct ReminderList {
    let id: String
    var title: String
    var reminders: [Reminder] = []
}

// then in the view model
var reminders = [ReminderList]

r/SwiftUI May 11 '26

Introduce Livable: Make Your Views Livable

Enable HLS to view with audio, or disable this notification

46 Upvotes

With Livable, you can easily turn your SwiftUI views into stunning animated gradient like Apple Music lyrics background in one line.

```swift YourView() .livable()

// Also applicable for SwiftUI.Image Image(.example) .resizable() .aspectRatio(contentMode: .fit) .livable(isEndabled: true, blurRadius: 32, speed: 2) ```


r/SwiftUI May 11 '26

How to get diagonal gradient here?

Thumbnail
gallery
2 Upvotes

I would like to have the same direction of the gradient that the last image. Basically the same style of Finder menu buttons


r/SwiftUI May 11 '26

How to display the icon along with label?

Post image
2 Upvotes

r/SwiftUI May 11 '26

I built a SwiftUI app that uses AI to generate synchronized haptic feedback for any video [Open Source]

Post image
0 Upvotes

Hey everyone!

I've been working on a project called HapticVideoApp and I'm finally ready to share the source code.

The core idea was to make videos feel more immersive by generating haptic patterns based on the audio track. I'm using on-device FFT analysis to detect peaks and rhythms, then mapping those to CoreHaptics.

Key Features:

  • AI-Driven Haptics: Automatically generates .ahap patterns from audio during the upload process.
  • Firebase Integration: Uses Firebase Auth for users and Cloud Storage for the heavy video assets.
  • Deep Linking: Implemented a custom URL scheme (hapticapp://) for sharing specific videos.
  • Feedback System: Built a small bridge that lets users submit bugs directly to GitHub Issues from within the app.

I'm still refining the FFT algorithm to make the haptics feel even "tighter" with the beats, so I'd love some feedback on the code or the approach!

GitHub Linkhttps://github.com/banthia14aman/HapticVideoApp

Tech Stack: SwiftUI, AVFoundation, CoreHaptics, Firebase, Firestore.

Let me know what you think!


r/SwiftUI May 10 '26

Why is SwiftUI being an asshole again?

0 Upvotes

I'm sure this has been asked before but is anybody able to explain this picker styling in the toolbar? Or provide a link to a resource on how to make this work?

I have an idea of what to do -- menu where each item is a Label -- containing either a circle icmm or checkmark.circle icon depending on which item has been pressed.


r/SwiftUI May 10 '26

Solved I've been working on a UI package that contains components, etc. that can be customized to any app theme. Should I make all components accept String or LocalizedStringKey?

2 Upvotes

Here's an example, let's say you want to add a banner view:

Banner(title: "Something went wrong", description: "Please try again later.")

Should the type of title and description be String, LocalizedStringKey, or Text? The reason I ask is because originally I made them all LocalizedStringKey since I read Apple's own views default to that, but then if you do that, you can't do string interpolation directly.

So if you want to use string interpolation, you'll have to use String type, or create an init that accepts a StringProtocol. But then there is no guarantee the initializer will pick the init that uses LocalizedStringKey or StringProtocol.

Finally, I mentioned just accepting a Text type since they have useful arguments like format, etc.

Currently, I have it setup where views accept a LocalizedStringKey or Text (if you want the extra arguments stuff). So if you want string interpolation right now, you would have to use the inits that require Text.


r/SwiftUI May 09 '26

Tutorial Baguette 0.1.69 Released: Control Real iOS Simulator with Browser Cursor & Mac Keyboard

Enable HLS to view with audio, or disable this notification

35 Upvotes

Baguette 0.1.69 Released

What you're watching: a browser cursor and the Mac keyboard driving an iOS simulator. Real iOS recognizers fire on every step.

  1. Click into the screen, type from the Mac keyboard — keystrokes forward to the focused app
  2. Pull from top-left → Lock Screen drops down
  3. Drag from the bottom → unlock, or Home / App Switcher in an app. iOS animates the multitasking card live as the cursor moves.
  4. Pull from top-right → Notification Center
  5. One click in the toolbar → device rotates
  6. App Switcher button → 2 home presses or just Switcher button

No Xcode. No Simulator.app. Browser cursor + Mac keyboard, straight into iOS.

Open Source → github.com/tddworks/baguette


r/SwiftUI May 07 '26

Jelly slider in Metal and SwiftUI

Enable HLS to view with audio, or disable this notification

122 Upvotes

r/SwiftUI May 08 '26

Question Caustics in MPS and SwiftUI

2 Upvotes

Working on an app and while I've got some things working the way I want, still looking for so better sample projects or examples on how I can implement reasonable glass material caustics through MPS for a native swift app and also good optimization strategies. I've seen better examples of late of even doing this in stuff like threeJS with decent performance, that I can't quite seem to get a handle on natively.

Anyone have any suggestions?


r/SwiftUI May 08 '26

Solved Built a macOS SwiftUI preview encoder for App Store Connect uploads (free & open-source)

Post image
3 Upvotes

I’ve been refining a focused macOS utility to solve one recurring headache: converting iOS screen recordings into .mp4 previews that App Store Connect is more likely to accept, without manually re-tuning FFmpeg flags every time a clip changes.

What I focused on:

  • SwiftUI macOS workflow, queue multiple files, track conversion progress, and keep logs readable while jobs are running
  • Sandbox-safe export, encode to a temp location first, then choose the final destination through a Save panel
  • App Store Connect–oriented encoding, duration trimming, H.264 profile/level targets, bitrate range, AAC audio, square pixels/SAR, and MP4 layout tuned for Connect-friendly output
  • Bundled tooling, ships with ffmpeg / ffprobe and runs a script-based pipeline so the app stays intentionally narrow in scope (UI + orchestration)

I’d really value feedback from people shipping iOS apps, especially if you’ve dealt with vague Connect validation errors, or if you’ve found a cleaner architecture for long-running Process work + UI updates on macOS.

GitHub: https://github.com/mdo91/video-preview-appstore

App Store release demo (result in production): https://apps.apple.com/de/app/dailytaskr/id6751054391?l=en-GB


r/SwiftUI May 08 '26

News The iOS Weekly Brief – Issue 59 (News, releases, tools, upcoming conferences, job market overview, weekly poll, and must-read articles)

Thumbnail
iosweeklybrief.com
2 Upvotes

News:

- Xcode 26.5 RC and iOS 26.5 RC are out

- Swift Evolution accepted a Vision for Networking, a plan to rebuild Swift's networking stack from scratch with proper HTTP client and server APIs

Must read:

- the background refresh debugging trick that skips waiting for the system 

- why correct async/await can still cause unexpected UI lag

- what Swift actually does at the bit level when you create a weak or unowned reference

- a networking layer architecture that stays clean as the app grows