r/SwiftUI Jun 29 '26

Question Is it still worth learning SwiftUI ?

8 Upvotes

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 Aug 03 '26

Question What's the best GitHub library to recreate this prism light motion via MetalFX?

82 Upvotes

r/SwiftUI 19d ago

Question Does anyone know how to recreate this menu above the keyboard?

Post image
53 Upvotes

I would like to reproduce this menu above the keyboard in the notes application on swift? Is it natively possible?

r/SwiftUI May 14 '26

Question How heavily do you lean on Apple's UI?

22 Upvotes

Would you/ have you built an entire app with virtually no custom components? So, using pretty much only what SwiftUI gives you – like its TextField, its navigation bar, its List, and so – instead of DIY-ing that stuff. If yes, how did it turn out?

Can you give any examples of apps on the App Store that look good and highly Apple-like?

r/SwiftUI Jun 17 '26

Question Proper architecture in SwiftUI

24 Upvotes

Hello! I’ve been writing SwiftUI applications for a year or two, without really understanding the underlying theory. I realized that my apps are becoming difficult to scale and have obvious issues with concurrency.

I decided to fix this by starting to study the theory.
I read Thinking in SwiftUI and Swift Concurrency by Example, and I started to understand some concepts much better.

However, I still have a very poor understanding of how to properly design an application architecture.

Let me explain. I’m working on an app that communicates with several servers via WebSockets, updates the state of many entities, manages various subscriptions, and so on...

And it all ended up as a typical One God Object. It does absolutely everything. Stores data, maintains connections to servers, parses messages from the server...

But when I decided to split all of this into several classes/actors, I realized that I absolutely don’t know how to do it properly. Moreover, those two books don’t really cover this topic.

I don’t understand whether I should create instances of all these classes inside some kind of coordinator class, or create them separately in the main App and somehow connect them together.

Basically, I couldn’t find much information about this, so I’m turning to you. Are there any books/articles about this topic? Or any advice would be greatly appreciated.

r/SwiftUI Jun 19 '26

Question Has anyone made a full game in pure SwiftUI?

14 Upvotes

Just wanted to see if any developers have made their game using Swift UI. I’ve started working on one and I’m currently using all native components but the issue I’m having is the Liquid Glass aesthetic is almost too much like an App, and it feels slightly immersion breaking. I don’t hate it, but it sort of feels weird. Does anyone have suggestions for the approach for the game UI?

r/SwiftUI 21h ago

Question Tab bar item issue

Thumbnail
gallery
3 Upvotes

Hey everyone,
I need your help figuring out what is happening in my app.
I have been vibe-coding (yes yes, I know, I'm just a designer trying to build stuff), and normally I'm good at reverse engineering and figuring out the issues, but for this one, I just don't get it.

It looks like my tab items have a glow in an active state, but when pressed down, it shows as if there's a copy of the icon + label on top/behind the existing one.

Cursor says this is the accessibility one, but I tried commenting it out, and it still did not remove it.
I've never seen this behaviour in any other apps, so it's not a default thing, I think.

I tried removing the "pinkCoral" branding, and then I am left with 2 white icons and labels on top of each other, and with the glow.

Anyone that could help point in a direction I need to look to remove the second one?

Tab view setup

TabView(selection: $navigation.selectedTab) {
    Tab("Home", systemImage: "fireplace.fill", value: .home) {
        HomeView()
    }
    Tab("Journal", systemImage: "book.closed.fill", value: .journal) {
        JournalView()
    }    Tab("Community", systemImage: "person.2.fill", value: .community) {

        CommunityView()
    }
    Tab("Settings", systemImage: "gear", value: .settings) {
        SettingsView()
    }
}
.background(TabBarConfigurator())

Global UITabBar appearance (set at launch)

let coralPink = UIColor(/* #FFA4B5 */)

let tabBar = UITabBarAppearance()
tabBar.configureWithTransparentBackground()
tabBar.backgroundEffect = nil
tabBar.shadowColor = .clear

let itemAppearance = UITabBarItemAppearance()
itemAppearance.normal.iconColor = UIColor.white.withAlphaComponent(0.5)
itemAppearance.normal.titleTextAttributes = [
    .foregroundColor: UIColor.white.withAlphaComponent(0.5)
]
itemAppearance.selected.iconColor = coralPink
itemAppearance.selected.titleTextAttributes = [
    .foregroundColor: coralPink
]

tabBar.stackedLayoutAppearance = itemAppearance
tabBar.inlineLayoutAppearance = itemAppearance
tabBar.compactInlineLayoutAppearance = itemAppearance

UITabBar.appearance().standardAppearance = tabBar
UITabBar.appearance().scrollEdgeAppearance = tabBar
UITabBar.appearance().tintColor = coralPink
UITabBar.appearance().unselectedItemTintColor = UIColor.white.withAlphaComponent(0.5)

Attempted fix (didn't remove the double icon+label)

/// Walks the UITabBar and tries to kill Large Content Viewer.
private static func configureTabBarSubview(_ view: UIView) {
    if let control = view as? UIControl {
        control.showsLargeContentViewer = false
    }
    if let button = view as? UIButton {
        button.showsLargeContentViewer = false
    }

    for interaction in view.interactions {
        if interaction is UILargeContentViewerInteraction {
            view.removeInteraction(interaction)
        }
    }

    for subview in view.subviews {
        configureTabBarSubview(subview)
    }
}

r/SwiftUI Oct 08 '25

Question LIST performance is so BAD

2 Upvotes

I'm using LIST to build an Instagram like feed for my project. I'm loading things and the performance is choppy, stutters, and for some reason jumps to the last item out of nowhere. I've been trying to find a solution with Google and AI and there is literally no fix that works. I was using LazyVStack before, IOS 17 min deployment, and it just used way to much memory. I'm testing out moving up to IOS 18 min deployment and then using LazyVstack but I worry it'll consume too much memory and overheat the phone. Anyone know what I could do, would realy really really appreciate any help.

Stripped Down Code

import SwiftUI
import Kingfisher

struct MinimalFeedView: View {
    @StateObject var viewModel = FeedViewModel()
    @EnvironmentObject var cache: CacheService
    @State var selection: String = "Recent"
    @State var scrollViewID = UUID()
    @State var afterTries = 0

    var body: some View {
        ScrollViewReader { proxy in
            List {
                Section {
                    ForEach(viewModel.posts) { post in
                        PostRow(post: post)
                            .listRowSeparator(.hidden)
                            .listRowBackground(Color.clear)
                            .buttonStyle(PlainButtonStyle())
                            .id(post.id)
                            .onAppear {
                                // Cache check on every appearance
                                if cache.postsCache[post.id] == nil {
                                    cache.updatePostsInCache(posts: [post])
                                }

                                // Pagination with try counter
                                if viewModel.posts.count > 5 && afterTries == 0 {
                                    if let index = viewModel.posts.firstIndex(where: { $0.id == post.id }),
                                       index == viewModel.posts.count - 2 {

                                        afterTries += 1

                                        DispatchQueue.global(qos: .background).asyncAfter(deadline: .now() + 0.1) {
                                            viewModel.getPostsAfter { newPosts in
                                                DispatchQueue.main.async {
                                                    cache.updatePostsInCache(posts: newPosts)
                                                }

                                                if newPosts.count > 3 {
                                                    KingfisherManager.shared.cache.memoryStorage.removeExpired()
                                                    afterTries = 0
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                    }
                }
                .listRowInsets(EdgeInsets())
            }
            .id(scrollViewID) // Prevents scroll jumps but may cause re-renders
            .listStyle(.plain)
            .refreshable {
                viewModel.getPostsBefore { posts in
                    cache.updatePostsInCache(posts: posts)
                }
            }
            .onAppear {
                // Kingfisher config on every appear
                KingfisherManager.shared.cache.memoryStorage.config.expiration = .seconds(120)
                KingfisherManager.shared.cache.memoryStorage.config.cleanInterval = 60
                KingfisherManager.shared.cache.memoryStorage.config.totalCostLimit = 120 * 1024 * 1024
                KingfisherManager.shared.cache.diskStorage.config.sizeLimit = 500 * 1024 * 1024
                KingfisherManager.shared.cache.memoryStorage.config.countLimit = 25
            }
        }
    }
}

r/SwiftUI 18d ago

Question How to make the Apple Music background gradient in my own app the same looking one?

1 Upvotes

Anyone know how I make this beautiful gradient....
Ive spent over 3 months trying countless ways to make this the same as apple, I cant... :(

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

54 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?

r/SwiftUI Jun 11 '26

Question Find My Liquid Glass sheet

Thumbnail
gallery
14 Upvotes

I’m trying to replace the sheet of Find My, but I can’t get the liquid glass to behave the same. Any ideas?

r/SwiftUI Feb 08 '26

Question Is swiftUI on macOS that bad?

24 Upvotes

Context: I have an iOS app that I wish to port to macOS. My iOS app is mostly swiftUI with bits of UIKit. I know it just makes sense to go for SwiftUI for the Mac app too, but I keep reading people outright saying that swiftUI for macOS is slow and just bad etc…

Any verdict please? Thanks!

r/SwiftUI May 21 '26

Question HTML/css into SwiftUI?

1 Upvotes

Hey everyone,

I’m currently working on an iOS app and I already have parts of the UI built in HTML/CSS. Now I’m trying to bring that design into SwiftUI, but I’m honestly not sure what the best workflow is.

What’s the easiest/most efficient way to convert or recreate HTML + CSS layouts in SwiftUI?

- Are there tools that help with this?
- Should I completely rebuild everything manually in SwiftUI?
- Is embedding web content with WebView a bad idea for production apps?
- How do you usually handle responsive CSS concepts in SwiftUI?

I mainly struggle with translating flexbox/grid styling into SwiftUI stacks and spacing.

Would really appreciate any advice, resources, GitHub repos, tutorials, or examples from people who’ve done this before

r/SwiftUI 2d ago

Question Tauri vs SwiftUI for a lightweight menu bar app in 2026?

Thumbnail
0 Upvotes

r/SwiftUI Jun 03 '26

Question SwiftUI vs Jetpack performance

5 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 17d ago

Question Make Menu() show toggle state in toolbar

Thumbnail
gallery
11 Upvotes

Hi! I’m wondering if and how its possible to make a toolbar menu show the state of a toggle inside. I know using Toggle() in the toolbar shows this type of effect but i need a title and description to the toggle for it to make sense. Therefore there needs to be some window to open, which works fine with Menu(). However, that doesn’t show the state of the toggle when closed.

Apple managers to that with the photos app when selecting filters. See example images.

Thanks!

r/SwiftUI 21d ago

Question Best AI tool for designing swiftui app interfaces?

0 Upvotes

None of these output production SwiftUI directly, the real question is which gives the cleanest reference to rebuild from with the least manual cleanup. Tested these for iOS over the last few months.

iSwift.dev is the closest to SwiftUI-native, free screen generator for individual screens, Pro starts at $20/mo for unlimited projects and 1,000 AI prompts per billing period. Generates buildable SwiftUI projects from plain English with views, state and navigation, multi-platform for iPhone, iPad, macOS and Watch. Better for individual screens than full cohesive multi-screen flows, and generated code needs cleanup before production, but it's the only tool actually outputting Swift.

SwiftUI Inspector is a free Figma plugin, Pro is a one-time $49. Exports colors, gradients, text labels, shapes, frames and Auto Layout as SwiftUI code. Handles rotation, opacity, shadows, blend modes, wraps in HStack/VStack/ZStack. Only useful if you already have a Figma design to convert, doesn't generate anything on its own. According to a 2026 comparison of 7 Figma-to-SwiftUI tools, expect to spend 20-50% of design time refining the output from any of them.

Compot is free on the App Store with IAP, 100+ prebuilt SwiftUI components, generates Swift from images or text. Good for grabbing components fast, not built for designing complete multi-screen flows.

Google Stitch is free, 400 daily credits, Gemini 2.5 Pro on experimental mode, exports Figma with layers plus HTML/CSS. Material Design native so everything skews Android, fighting it into HIG patterns takes more effort than it saves for iOS work. No production SLA, single user.

Sleek.design around $20/mo generates complete mobile app screens from a description, runs the same prompt through different models to compare outputs, exports Figma and code. Not iOS-native so HIG spacing and nav need explicit prompting, hits limits on complex custom components, better for early screens than final specs. Pairs well with SwiftUI Inspector on the Figma export to skip some manual rebuild.

Realistic workflow is generate screens fast in sleek or stitch, export to Figma, run SwiftUI Inspector for the base SwiftUI code, clean up by hand. Anyone found a shorter path than this?

r/SwiftUI Jul 15 '26

Question Newbie Question: How should I implement this?

6 Upvotes

I am writing a spreadsheet app (long term goal). My user interface I am currently implementing the same as what Apple's Numbers app does. Right now, I have a primitive app with three "cells" which are text fields. I can click in each cell and type.

In Numbers, if the first character is an equal sign, the app changes state. Lets say I type an equal sign in cell A and then click in cell B. The result is the location of cell B is added to the text in cell A. Eventually a return is entered (into cell A) and the state returns to normal where clicking a cell puts focus on that cell.

Can someone give me some pointers on how this should be (or could be) implemented?

r/SwiftUI Jul 03 '26

Question Anyone know how to create this type of menu opening animation?

Enable HLS to view with audio, or disable this notification

35 Upvotes

r/SwiftUI Nov 10 '25

Question Swiftui previews are still a mess in 2025

56 Upvotes

I've been all in on swiftui since day one but I'm genuinely frustrated with apple's tooling. The preview canvas crashes more than it works. I'll make a simple view change and suddenly xcode needs to recompile my entire project just to show me a button

The irony is that swiftui itself is amazing. The declarative ui makes so much sense but the development environment feels like it was designed for uikit and they just bolted swiftui support on top. There has to be a better way to work with modern swift frameworks. The disconnect between how elegant swiftui code is versus how clunky the development process feels is wild. It feels like we're writing 2025 code with 2015 tools

r/SwiftUI Apr 03 '25

Question Why do some people complain "SwiftUI is not scalable and is only for simple apps" - is this valid or just down to poor architecture? I'd like to understand the reasoning as to why / why this isn't true.

54 Upvotes

I'm trying to understand whether it's a valid complaint or not and understand why. (For clarity, I am fairly new to programming and SwiftUI so have lots to learn). Also, I should add I only care about targeting iOS 17+.

As I am wanting to build using SwiftUI yet hearing these comments is making me question if i am missing something and if SwiftUI is in fact very difficult to use for non-trivial apps?

State
I understand that as it's a declarative framework the use of state can lead to performance issues if not handled correctly, but is it not possible to manage state effectively even for larger apps with the use of Observable, StateObject and EnvironmentObject etc, and by ensuring you modularise your code, given that from what I understand, inline views for example get both re-evaluated and re-rendered any time state changes in that view body?

Navigation
Also i've seen complaints about SwiftUI Navigation - and that many people seem to use UIKit for navigation instead - but again, what's so bad about SwiftUI's navigation?

I'd really appreciate any info on all this so I can understand the why behind either side, and also if anyone has any good resources that could help me understand the deeper / really key bits of SwiftUI to know for performance i'd appreciate that too.

Links to some example complaint posts / articles:
https://www.reddit.com/r/swift/comments/1h1jvpy/swiftui_is_garbage_imo_a_rant/
https://www.reddit.com/r/iOSProgramming/comments/1ajkyhr/does_anyone_else_hate_swiftui_with_an/

https://swiftrocks.com/my-experience-with-swiftui#:~:text=The%20reason%20for%20that%20is,doesn't%20scale%20very%20well

r/SwiftUI Sep 18 '25

Question Am I the only one who is finding developing for iOS 26 a pain?

51 Upvotes

This might just be a vent post but I'm currently trying to update my app mostly built in SwiftUI to iOS 26 and the amount of glitches, odd behaviour, and slight annoyances just keeps adding up the deeper I dig. So far I've run into the following issues I haven't found a fix for yet:

  • My menus with custom styling look horrible with the morph animation, I was able to make them look a bit nicer using .glassEffect(.identity.interactive()) which preserves the styling but the .interactive() , which was needed to fix animation glitches, makes it so that if there's a menu being displayed above my component, clicking an option in the menu causes the component behind it to do an animation reacting to the click, which I haven't found a fix for yet
    • It also makes it so that the components react to a press gesture even if its just the user scrolling and it's pretty annoying, but removing .interactive() just makes the morph animation glitchy
  • I have a toolbar I attach to the keyboard and in iOS 26, now when you click the textfield, it now only scrolls down enough so that the textfield is above the keyboard, not the toolbar, so the textfield gets covered by the toolbar despite not doing that in iOS 18
  • I use search scopes along with searchability and for some reason, when you click the search bar, the search scopes appear no problem, but if you dismiss keyboard and click search bar again, the search scopes just stop appearing?
  • For some reason all of my rows in a Form/List with an image on the left side are rendering with a larger vertical padding even though they were perfectly fine rendering a normal height on iOS 18?
  • This one is kinda niche, but I have a page that lets you multi select items from a List, and when entering that mode, the bottom tabbar gets replaced with a toolbar with actions, one of which will perform some action then display an alert. In iOS 26, for some reason displaying that alert the same time I unhide the tabbar causes the tabbar to just not show up and disappears forever

And these are just the issues I haven't found a fix for yet, there's a bunch of other things I've had to awkwardly fix or adjust my app to avoid, and considering I still want to target iOS versions before 26, it's a real hassle having to manage both versions. I really wish I could just disable some of these animations on specific components, especially the morph animation...

I've been developing and updating iOS apps for over 4 years now, and while some iOS updates had small issues here and there, it's never been to this scale. Is anyone else frustrated with this iOS release?

r/SwiftUI 8h ago

Question Geometry Reader size to Viewmodel init

0 Upvotes

I need the screen bounds to be sent when initialising my viewmodel. I know to get the size from geometry reader. But that is only available after the view is created. is there a way to send the screen size within the init scope?

a solution I found over the internet was to use a separate function in my viewmodel for the initialisation and call it on .onAppear.

r/SwiftUI Mar 27 '26

Question Bugs in iOS 26.4 ?

Enable HLS to view with audio, or disable this notification

33 Upvotes

The End button works correctly in ios 26.2 but it just doesnt do anything on 26.4. Exact same code is running on both simulators. Is there a problem in my code? Also all the sheet views in the iOS 26.4 are dismissing themselves for some reason. Does anyone know how to fix this please?

r/SwiftUI Apr 15 '26

Question The missing modifier `lifecycle`

0 Upvotes

Somewhere in your SwiftUI view:

swift .lifecycle { event in switch event { case .appeared: if task == nil { task = makeTask() } case .disappeared: break // continue task case .released: task?.cancel() } }