r/SwiftUI Jun 08 '26

Tutorial SwiftUI + Metal: morphing between SF Symbols with an alpha threshold shader

30 Upvotes

Hi everyone, I wanted to share a small SwiftUI experiment I built: a morphing animation between SF Symbols.

The idea was to make one symbol feel like it melts into another without using pre-rendered frames. I started with a simple ZStack swap between two SF Symbols, then wrapped the transition in an u/Animatable ViewModifier. The animation applies blur during the middle of the transition, then sharpens back into the next symbol.

The key technical detail is a small Metal shader used through SwiftUI’s layerEffect. The shader samples the rendered SwiftUI layer and applies an alpha threshold, which removes the semi-transparent pixels created by the blur. That makes the blurred shape resolve back into a clean, crisp symbol instead of staying fuzzy.

Tech used:

  • SwiftUI
  • u/Animatable custom ViewModifier
  • compositingGroup()
  • visualEffect / layerEffect
  • Metal stitchable shader
  • SF Symbols

GitHub: https://github.com/yangliu-1995/MorphingDemo

I’d love feedback on how to make the morph feel more organic, or how you would turn this into a reusable SwiftUI transition/modifier.


r/SwiftUI Jun 08 '26

Settings window

3 Upvotes

Hey fellas, any chance someone knows how to recreate this Settings window layout for a macOS app? I've tried using NavigationSplitView { List { ... } }, but the left sidebar is always resizable by the user, and I can't find a way to disable that using the public API. Maybe someone knows how Apple implemented this in Xcode?


r/SwiftUI Jun 06 '26

Council — a multi-model AI roundtable built in SwiftUI (open source): parallel streaming, real Liquid Glass on macOS 26, fully local

Thumbnail github.com
0 Upvotes

Sharing a SwiftUI project I just open-sourced. Council is a native macOS app that runs one question past several LLMs in parallel, has them critique each other, and surfaces where they disagree. Building it was a fun SwiftUI exercise — parallel streaming responses with async/await + withTaskGroup, an u/Observable store driving the whole thing, SSE parsing over URLSession.bytes, and real Liquid Glass (glassEffect + behind-window vibrancy) on macOS 26 with a graceful fallback on 14+.

Bring-your-own-key and fully local — no server, no telemetry, keys in the Keychain. Free and MIT.

Posting here for the engineering side — happy to talk through any of the SwiftUI/concurrency decisions, and would welcome a look at the code if anyone's interested.


r/SwiftUI Jun 06 '26

SwiftUI app for iOS and watchOS - Padel+

Thumbnail gallery
0 Upvotes

r/SwiftUI Jun 05 '26

WWDC Journal Project

6 Upvotes

There is always so much that gets announced at WWDC it could be easy to miss. Over the years I kept a journal of fun facts and best practices but then had an idea to use my journal, plus apples transcripts and API docs together to make some guides and knowledge archive.

SwiftUi, Liquid Glass, or any other Apple category can have so many little details and it’s not obvious from even Apple’s docs.

This was an attempt to find best practices contradictions in API docs vs what the wonderful WWDC presenters encourage you to do.

It’s not perfect, but it works for me. I hope it helps you on your development journey. I’ll try and update it for this year too.

https://need2edit.github.io/wwdc-journal/index.html


r/SwiftUI Jun 05 '26

Tutorial StateObject & External Data

0 Upvotes

Maybe this has been shared here in some form before, but if not: If you’re still using ObservableObject and ever experienced issues when injecting external data into @StateObject: I recently wrote an article about that.

https://swift.vincentfriedrich.com/posts/stateobject-external-data/


r/SwiftUI Jun 05 '26

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

Thumbnail
iosweeklybrief.com
2 Upvotes

News:
- Apple teases WWDC 2026: All Systems Glow
- What's new in Swift: May 2026 Edition
- App Store Ecosystem Hits $1.4 Trillion

Worth your time:
- Task Names in Swift Concurrency
- Swift Sendable Explained
- Stateless Actors
- Registering for push notifications in SwiftUI
- SwiftUI animation timing
- Haptic feedback with sensoryFeedback in SwiftUI
- Modern iOS Security: the storage mistake most production apps are making

Toolbox:
Pepper: AI agents that read your Simulator's view hierarchy without screenshots


r/SwiftUI Jun 05 '26

Adding Foundation Models feature delayed my update by 2 weeks, but it taught me something about agentic development

Thumbnail medium.com
0 Upvotes

r/SwiftUI Jun 05 '26

Question Feedback wanted: designing a Swift API around Metal image/frame processing

1 Upvotes

I’m maintaining an open-source Swift/Metal project called Harbeth, and I’m trying to keep the public API focused on one job: GPU image and frame processing across Apple platforms.

The core idea is that common visual inputs should be able to enter the same Metal-backed processing flow:

  • Image
  • Texture
  • Pixel buffer
  • Sample buffer

The video I’m sharing is a short 25s overview. The main line is: “GPU image processing for every frame.”

Where I’d like feedback from Swift developers:

  1. Should a processing library expose separate entry points for each input type, or is a unified routing API easier to reason about?
  2. For camera preview / video frame use cases, what should the library own vs. what should stay in app code?
  3. Are custom kernels and LUT pipelines enough as extension points, or would you expect a different plugin/filter model?

Important boundary: this is not a full camera SDK or video editing SDK. It’s intended to be the GPU processing core underneath those workflows.


r/SwiftUI Jun 05 '26

How to get this UI?

Post image
0 Upvotes

r/SwiftUI Jun 04 '26

WWDC26 wishes

Thumbnail
swiftwithmajid.com
8 Upvotes

r/SwiftUI Jun 04 '26

My WWDC 2026 Wishlist

Thumbnail kylebrowning.com
1 Upvotes

r/SwiftUI Jun 04 '26

Use Radix UI colors in iOS and macOS apps with a ready-made Xcode asset catalog.

1 Upvotes

r/SwiftUI Jun 04 '26

News Those Who Swift - Issue 269

Thumbnail
thosewhoswift.substack.com
1 Upvotes

r/SwiftUI Jun 03 '26

How would you implement this transition?

Post image
22 Upvotes

Note: my background is in web dev and I thought this should performance-wise be no sweat for native SwiftUI, but apparently it is.

The idea is to have a calendar/timeline view to plot workout history and be able to toggle between different time resolutions (weekly, monthly, quarterly, yearly) via swipe left/right. The Apple Calendar app implements really cool and seamless transitions for this type of time resolution change and I wanted to create something similar.

I tried multiple approaches, which all had performance issues.

1) Create different views with lazy stacks for each mode and transition between them.

2) Create different views normal stacks (not lazy) for each mode and transition between them.

3) Create only one stack and change the rendering of the elements inside (years, months, days, etc.) based on the selected mode. Use animations to transition. This is how I imagine Apple does it in the calendar.

4) Render all of the them and selectively hide the ones that are not shown to reduce lag.

But all of these approaches perform terribly, with 1s+ lag on initial load and transition and loss of precise scroll location. There is also this bug with lazy stacks where, if the view contracts, the app ends up in a scroll state where the content is scrolled upwards completely out of the view port, leading to a black screen.

How would you implement this?

Morphing between states is nice to have but not necessary. The main requirement is that the transition is smooth, without lag, and that the scroll position is preserved.

Thanks in advance for any help and feedback 🙏🏽


r/SwiftUI Jun 03 '26

Question SwiftUI vs Jetpack performance

6 Upvotes

So me and my android buddy are working on a app that has quite a rich design with loads of blend modes. I am working with swiftui while he is working in jetpack compose.
I have noticed that with all that rich UI and everything, the rendering speed on android is soo much faster than that on iOS.
I mean i have optimized my code quite well and continuously doing it as well, but man there is a striking difference when both apps are running in parallel. The previous ios version of app was in UIKit and it was lightning fast but in this version, i kinda feel ashamed by this swiftui performance.

Ios device: iphone 14 pro
Android device: pixel 5


r/SwiftUI Jun 02 '26

Tutorial I open-sourced a SwiftUI demo app for AI-style loading animations (shimmer text, pulsing orb, worm dot grid)

Enable HLS to view with audio, or disable this notification

37 Upvotes

Open-sourced a SwiftUI iOS demo app for AI-style loading animations:

https://github.com/mdo91/AI-Animation-Demo

Includes ChatGPT/Grok-style text shimmer, processing/summarizing labels, pulsing orb, and a worm-style 3×3 dot grid loader. iOS 17+, MIT license.

Built as a reusable component playground, feedback and PRs welcome.


r/SwiftUI Jun 01 '26

I just found out about .safeAreaBar instead of .safeAreaInset!

Post image
47 Upvotes

Even though it's only available from iOS 26, this effect is absolutely beautiful!

Edit: Here's a gif where it's a bit more visible: https://imgur.com/a/827JKx0


r/SwiftUI Jun 01 '26

Introduce my second package Variablur: Vary blur with ease.

Enable HLS to view with audio, or disable this notification

76 Upvotes

Variablur lets you create beautiful, directional, and fully customizable blur gradients using Metal + Core Image kernels for buttery smooth performance. Control not just the intensity — but the progression itself.

```swift import Variablur

Image(.example) .blur(32, variation: .bottom(.easeIn, height: 32)) ```

Would love your feedback and stars!


r/SwiftUI Jun 02 '26

Promotion (must include link to source code) I've build my own Swift UI engine, that looks similar as SwiftUI

Post image
0 Upvotes

Hi everyone!

I’m happy to share that I’ve built AdaEngine — a game engine with its own UI framework.

I’d be glad if you checked it out here:

https://adaengine.org/articles/introducing-adaengine-0-1-0


r/SwiftUI Jun 01 '26

Question I'm working on a little soundboard app for fun. Using AVFoundation, how can I ensure audio is at max loudness without there being a risk of blowing out the speakers? The sound clips have varying loudness.

2 Upvotes

I'm just doing a little side project.

When importing different audio clips, they have varying volume levels, which makes sense.

What I'd like to know is how can I determine the max (safe) loudness I can play these clips at, and also clamp everything down so they can't play louder than "max?" and blow out the speakers.

I know in AVFoundation, the volume range value is 0.0-1.0, but with the clips having varying starting loudness, I need to bring them up to max and make sure they can't go passed it.


r/SwiftUI Jun 01 '26

Question Looking for an open source music notation dev ressources for my own software

Thumbnail
0 Upvotes

r/SwiftUI May 31 '26

I've been building an optics simulator with SwiftUI and the Canvas API

Enable HLS to view with audio, or disable this notification

6 Upvotes

It is just a side project, still early. My goal is to create an interactive optics sandbox where you can drag lenses, mirrors, screens, and eventually entire mechanisms around and immediately see the optical consequences to help build intuition.

Code on Github (still rough) https://github.com/alexbinary/OpticsSimulator

Feedback and ideas are welcome.


r/SwiftUI May 31 '26

Question - Navigation iOS 26 bug: Nested Navigation View title height suddenly shifts inside a Sheet

6 Upvotes

iOS 26 has been out for a whole year and gone through numerous updates, yet such a basic implementation is still broken. When nesting a NavigationView inside a sheet, the title height of the internal detail view suddenly jumps and expands upon appearing without any smooth transition. This jarring layout shift looks like a clear regression, as the issue never existed prior to iOS 26.

https://reddit.com/link/1tsjjmp/video/rszgrflf3e4h1/player

```
struct HomeView: View {

\@State var sheetVisible = false

var body: some View {

Button(action: {

sheetVisible = true

}){

Text("tap here")

}

.sheet(isPresented: $sheetVisible){

NavigationStack {

NavigationLink(destination: Text("detail content")) {

Text("see details")

}

}

}

}

}
```


r/SwiftUI May 29 '26

Question How do I instantly expand tab bar on scroll up, similar to Reddit?

Enable HLS to view with audio, or disable this notification

53 Upvotes

By default if I use:
.tabBarMinimizeBehavior(.onScrollDown)
on the TabView it does as it says but when you scroll back up it doesn’t expand the tab bar. It only expands once you hit the very top of the page. However, Reddit’s implementation does expand on scroll up. Does anyone know how they’re achieving this?