Explore the various UI frameworks available for building app interfaces. Discuss the use cases for different frameworks, share best practices, and get help with specific framework-related questions.

All subtopics
Posts under UI Frameworks topic

Post

Replies

Boosts

Views

Activity

UIRequiresFullScreen Deprecation
I work on a universal app that targets both iPhone and iPad. Our iPad app currently requires full screen. When testing on the latest iPadOS 26 beta, we see the following warning printed to the console: Update the Info.plist: 1) `UIRequiresFullScreen` will soon be ignored. 2) Support for all orientations will soon be required. It will take a fair amount of effort to update our app to properly support presentation in a resizable window. We wanted to gauge how urgent this change is. Our testing has shown that iPadOS 26 supports our app in a non-resizable window. Can someone from Apple provide any guidance as to how soon “soon” is? Will UIRequiresFullScreen be ignored in iPadOS 26? Will support for all orientations be required in iPadOS 26?
5
2
306
4d
Mitigating overlapping text for sticky section headers for a plain List in iOS 26
When preparing SwiftUI code that uses List with .listStyle(.plain) for iOS 26, the by-default sticky section headers combined with the new translucent top-bars often causes unpleasantly overlapping text: Two questions here: Is there a modifier to make section headers non-sticky? This would be helpful for cases where the translucent bar is a good fit and the section titles don't need to be sticky/pinned. I found .listStyle(.grouped) can be an alternative in some cases, but this adds a gray background / additional padding to the section titles. Is there a way to get a blurry material behind the section headers when they are sticking to the top bar? This would be good for cases where the section header is important content-wise (like in the two-column example above or for a data list categorized using sections that should be always visible as a point of reference) I found the scroll edge effects and .scrollEdgeEffectStyle(.hard, for: .top) does the trick for the top bar but doesn't affect attached sticky section headers (maybe it should?). Also I played around with .toolbarBackground(...) but this didn't do anything useful for a nav bar in my experiments.
Topic: UI Frameworks SubTopic: SwiftUI
5
0
121
5d
TextEditor Problem Or Me?
When using SwiftUI's TextEditor, the application crashes immediately on launch. This occurs even in a brand new project with the simplest usage. If I remove the TextEditor, the application runs normally. Environment: OS: macOS 15.6.1 Xcode: 16.4 SDK: macOS 14 (and also tried with macOS 15 SDK) Steps to Reproduce: Create a new SwiftUI macOS App project. Replace ContentView with the following code: import SwiftUI struct ContentView: View { @State private var text = "114514" var body: some View { TextEditor(text: $text) } } Run the app. Expected Result: The app should display a working TextEditor. Actual Result: The app immediately crashes, and the debugger shows a Metal assertion error. If I remove the TextEditor, the app works fine. Screenshot: Additional Notes: This issue did not occur on macOS 14 / Xcode 15.4. It reproduces even in an empty project. Possibly related to SwiftUI/Metal integration on macOS 15.6.1. 這樣寫更專業、清楚,Apple 工程師能快速重現和定位問題。 如果你要用中文回報也可以,我能幫你翻譯。
Topic: UI Frameworks SubTopic: SwiftUI
2
0
86
5d
Blurred selected button on tvOS
The following code shows that a selected button in a list gots blurred if a glass effect is applied to the list. This happens if the button style is plain or glass. It does not happen if the button style is bordered. Is this a wanted documented behavior or is this a bug? struct ContentView: View { @State private var items = [ "Item 1", "Item 2", "Item 3", "Item 4"] var body: some View { ZStack { Image(systemName: "globe") .resizable() List(items, id: \.self) { item in Button(action: {}, label: { Text(item) }) } .padding() .glassEffect(in: Rectangle()) } } }
2
0
52
5d
Navigation title not visible in SplitViewController in macCatalyst on iOS 26
We are using a column style split view controller as root view of our app and in iOS26 the navigation titles of primary and supplementary view controllers are not visible and secondary view controller title is displayed in supplementary column. Looks the split view hidden all the child view controllers title and shown the secondary view title as global in macCatlayst. The right and left barbutton items are showing properly for individual view controllers. Facing this weird issue in iOS26 betas. The secondary navigation title also visible only when WindowScene,titlebar.titleVisibility is not hidden. Kindly suggest the fix for this issue as we can't use the secondary view navigation title for showing supplementary view's data. The issue not arises in old style split views or when the split view embedded in another splitView. Refer the sample code and attachment here let splitView = UISplitViewController(style: .tripleColumn) splitView.preferredDisplayMode = .twoBesideSecondary splitView.setViewController(SplitViewChildVc(title: "Primary"), for: .primary) splitView.setViewController(SplitViewChildVc(title: "Supplementary"), for: .supplementary) splitView.setViewController(SplitViewChildVc(title: "Secondary"), for: .secondary) class SplitViewChildVc: UIViewController { let viewTitle: String init(title: String = "Default") { self.viewTitle = title super.init(nibName: nil, bundle: nil) } override func viewDidLoad() { super.viewDidLoad() self.title = viewTitle self.navigationItem.title = viewTitle if #available(iOS 26.0, *) { navigationItem.subtitle = "Subtitle" } let leftbutton = UIBarButtonItem(barButtonSystemItem: .cancel, target: nil, action: nil) navigationItem.leftBarButtonItem = leftbutton let rightbutton = UIBarButtonItem(barButtonSystemItem: .add, target: nil, action: nil) navigationItem.rightBarButtonItem = rightbutton } }
0
0
174
5d
Concentric corner radius for grouped cells in UICollectionView on iOS 26
What is the recommended way to obtain the concentric corner radius for views within grouped UICollectionView cells? In the most basic example, a UICollectionView with one section and one cell, we observe the cell takes almost the shape of a capsule, but it is indeed not a capsule. What is the way to obtain the radius of the grouped area from within the cell or its registration? I would like to layer elements on top that are concentric to the cell's clip shape. I've tried using custom views with .concentric UICornerConfigurations, setting .cornerConfiguration on the cell and on a custom backgroundView and I've even tried obtaining the .effectiveRadius of the cell after layout (returns 0.0). As of Xcode 26.0 Beta 7, nothing works. This seems like a huge omission; what am I missing here?
1
0
114
5d
Text with Liquid Glass effect
I'm looking for a way to implement Liquid Glass effect in a Text, and I have issues. If I want to do gradient effect in a Text, no problem, like below. Text("Liquid Glass") .font(Font.system(size: 30, weight: .bold)) .multilineTextAlignment(.center) .foregroundStyle( LinearGradient( colors: [.blue, .mint, .green], startPoint: .leading, endPoint: .trailing ) ) But I cannot make sure that I can apply the .glassEffect with .mask or .foregroundStyle. The Glass type and Shape type argument looks like not compatible with the Text shape itself. Any solution to do this effect on Text ? Thanks in advance for your answers.
0
0
156
5d
List reordering animation broken in iOS 26
just opened a iOS18 project in latest Xcode 26 (beta 7) and the list reordering animation is broken and jerky. on iOS 18 a change to one of the list items would smoothly move it to its correct place but in iOS 26 the items jerk around, disappear then pop up in the correct order in the list. I am using this to filter and sort the "events" if searchQuery.isEmpty { return events.sort(on: selectedSortOption) } else { let filteredEvents = events.compactMap { event in // Check if the event title contains the search query (case-insensitive). let titleContainsQuery = event.title.range(of: searchQuery, options: .caseInsensitive) != nil return titleContainsQuery ? event : nil } return filteredEvents.sort(on: selectedSortOption) } } is there a better way for iOS 26?
Topic: UI Frameworks SubTopic: SwiftUI
0
0
158
5d
UIBarButtonItem Doesn't Reset the Badge
Hello, I hope you're all doing well! I'm currently working on integrating new iOS 26 features into my app, and so far, the process has been really exciting. However, I've encountered an issue when updating the badge of a UIBarButtonItem, and I’m hoping to get some insights or suggestions. The app has two UIViewController instances in the navigation stack, each containing a UIBarButtonItem. On the first controller, the badge is set to 1, and on the second, the badge is set to 2. In the second controller, there is a "Reset" button that sets the badge of the second controller to nil. However, when I tap the "Reset" button, instead of setting the badge to nil, it sets the value to 1. I would appreciate any ideas or suggestions on how to solve this problem. Maybe I am using the badge API incorrectly. Thank you! class ViewController: UIViewController { var cartButtonItem: UIBarButtonItem! override func viewDidLoad() { super.viewDidLoad() configureNavigationItem() } func configureNavigationItem() { cartButtonItem = UIBarButtonItem(image: UIImage(resource: .cartNavBar), style: .plain, target: self, action: #selector(showCartTab)) cartButtonItem.tintColor = UIColor.systemBlue cartButtonItem.badge = .count(1) navigationItem.rightBarButtonItem = cartButtonItem } @objc func showCartTab() { // Add second view controller in navigation stack performSegue(withIdentifier: "Cart", sender: nil) } } class CartViewController: UIViewController { var cartButtonItem: UIBarButtonItem! override func viewDidLoad() { super.viewDidLoad() configureNavigationItem() } func configureNavigationItem() { cartButtonItem = UIBarButtonItem(image: UIImage(resource: .cartNavBar), style: .plain, target: nil, action: nil) cartButtonItem.tintColor = UIColor.systemBlue cartButtonItem.badge = .count(2) navigationItem.rightBarButtonItem = cartButtonItem } func updateBadge() { cartButtonItem.badge = nil } @IBAction func resetButtonPressed(_ sender: Any) { updateBadge() } }
0
0
62
5d
VisionKit – Tab Bar Button Titles Not Visible and Extra Back Button in iPad Landscape Mode
Description We observed multiple UI issues in VisionKit (VNDocumentCameraViewController) on iPad devices running iPadOS 26 (from Public Beta 4 onwards): Tab bar button titles are not properly visible due to color/contrast issues. An extra back button appears in the navigation bar when editing a captured image in landscape mode. These issues seem to be iPadOS 26 bugs, as Apple does not provide public APIs to customize or override VNDocumentCameraViewController. VisionKit relies on private ICDocCam* classes, which are not accessible for modification. Steps to Reproduce Open the app on an iPad running iPadOS 26 (Public Beta 4 or later). Switch the device to landscape mode. Launch document scanning using VNDocumentCameraViewController. Capture a document and tap Keep Scan. Go to the edit captured image screen. Observed Behavior: Tab bar button titles are not clearly visible (color/contrast issue). An extra back button is displayed in the navigation bar.
0
0
26
5d
CarPlay: CPListTemplate item limit and image memory usage
I’m working with CPListTemplate in CarPlay and have run into two issues: Item limit: The documentation states that maximumItemCount is 500. In practice, when providing a list of ~2–4k items, only the first 500 are displayed. However, Apple Music on CarPlay seems to handle larger lists without this limitation. Is there an API-level approach or recommended pattern to support lists beyond this cap? Image memory usage: Cells don’t appear to load lazily. Even with small images, the first 500 items load all their artwork into memory immediately, resulting in ~400–700 MB usage and high CPU loads. This seems excessive for CarPlay environments. Is there a best practice for deferring or managing image loading within CPListTemplate? Any official guidance or known workarounds for these two issues would be very helpful.
0
0
74
6d
[NSBitmapImageRep imageRepsWithContentsOfFile] error with HDR
[NSBitmapImageRep imageRepsWithContentsOfFile] is returning empty/solid black bitmaps for some image files with HDR on macOS Tahoe beta. I opened an Apple feedback report but curious if anyone else is seeing this. Errors thrown in the debugger are: IIOApplyHDRGainMap:351: FlexGTC headroom (4.0) doesn't match target headroom (1.0) +[HDRImage getGainMapVersionMajor:minor:fromMetadata:]:417: Failed to get metadata tag: HDRGainMap:HDRGainMapVersion +[HDRImage getGainMapHeadroom:fromMetadata:]:443: Failed to read gain map version info: <CGImageMetadata 0x9fc013700> ( iio:hasXMP = True ) This function call has worked reliable for many years before the Tahoe beta.
Topic: UI Frameworks SubTopic: UIKit
3
0
114
6d
How to Handle App Focus When Launching Another App During Secure Event Input
Hi everyone, I'm encountering a behaviour related to Secure Event Input on macOS and wanted to understand if it's expected or if there's a recommended approach to handle it. Scenario: App A enables secure input using EnableSecureEventInput(). While secure input is active, App A launches App B using NSWorkspace or similar. App B launches successfully, but it does not receive foreground focus — it starts in the background. The system retains focus on App A, seemingly to preserve the secure input session. Observed Behavior: From what I understand, macOS prevents app switching during Secure Event Input to avoid accidental or malicious focus stealing (e.g., to prevent UI spoofing during password entry). So: Input focus remains locked to App A. App B runs but cannot become frontmost unless the secure input session ends or App B is brought to the frontmost by manual intervention or by running a terminal script. This is consistent with system security behaviour, but it presents a challenge when App A needs to launch and hand off control to another app. Questions: Is this behaviour officially documented anywhere? Is there a recommended pattern for safely transferring focus to another app while Secure Event Input is active? Would calling DisableSecureEventInput() just before launching App B be the appropriate (and safe) solution? Or is there a better way to defer the transition? Thanks in advance for any clarification or advice.
0
0
25
6d
Bug or Feature: Changes to Window Reopen Behavior in macOS 26
Since macOS 26 Beta 1, I notice that the window reopening behavior had changed. Say there are two desktops (spaces), one might: open an app window in desktop 1 close that window switch to desktop 2 reopen the app window (by click on dock tile, spotlight search...) Prior to macOS 26, that window will always reopen in current desktop. This is IMO the right behavior because these windows are most likely transient (message app, chat app, utilities app or note app). In macOS 26, however, will switch to desktop 1 (where the window is closed) and reopen the window in desktop 1. This is weird to me because: Window is "closed", hence it should not be attached to desktop 1 anymore, unlike minimize. Switching desktop interrupts user's current workflow. It's annoying to switch back specially when there're many desktops. This behavior is inconsistent. Some reopen in current desktop, some reopen in previous desktop. Apps like Music, Notes and Calendar reopened in previous desktop, while Mail, Messages, and Freeform reopened in current desktop. I did a little bit of experiment, and find out that apps that reopened in current desktop are most likely because they take an extra step to release the window when it's closed. I believe this is a bug, so I fire a feedback (FB18016497) back in beta 1. But I did not get any response or similar report from others, to a point that I kinda wonder if this is intended. I can easily force my app to reopen in current desktop by nullifying my window controller in windowWillClose, but this behavior essentially change how one can use the Spaces feature that I think I should bring this up to the community and see what other developers or engineers thinks about it.
Topic: UI Frameworks SubTopic: AppKit Tags:
2
0
113
6d
Menu's primaryAction:{} is broken on latest iOS 26 beta
The following shows minimal example to reproduce the issue: Menu { Button("Test"){} } label: { Text("Menu") } primaryAction: { // Some action } primaryAction modifier will not be called when pressing the menu button/view on iOS 26 beta, long pressing it will open the menu. Was tested on latest iOS 26 beta 8
Topic: UI Frameworks SubTopic: SwiftUI
3
1
159
6d
Liquid Glass clear variant isn't clear
I've been experimenting with Liquid Glass quite a bit and watched all the WWDC videos. I'm trying to create a glassy segmented picker, like the one used in Camera: however, it seems that no matter what I do there's no way to recreate a truly clear (passthrough) bubble that just warps the light underneath around the edges. Both Glass.regular and Glass.clear seem to add a blur that can not be evaded, which is counter to what clear ought to mean. Here are my results: I've used SwiftUI for my experiment but I went through the UIKit APIs and there doesn't seem to be anything that suggests full transparency. Here is my test SwiftUI code: struct GlassPicker: View { @State private var selected: Int? var body: some View { ScrollView([.horizontal], showsIndicators: false) { HStack(spacing: 0) { ForEach(0..<20) { i in Text("Row \(i)") .id(i) .padding() } } .scrollTargetLayout() } .contentMargins(.horizontal, 161) .scrollTargetBehavior(.viewAligned) .scrollPosition(id: $selected, anchor: .center) .background(.foreground.opacity(0.2)) .clipShape(.capsule) .overlay { DefaultGlassEffectShape() .fill(.clear) // Removes a semi-transparent foreground fill .frame(width: 110, height: 50) .glassEffect(.clear) } } } Is there any way to achieve the above result or does Apple not trust us devs with more granular control over these liquid glass elements?
2
3
90
6d
SwiftUI TextField with optional value working for @State but not @Binding properties
I've encountered a potential bug where a TextField connected to an optional value (not a string) works as expected when bound to a @State property, but won't update a @Binding property. Here is some example code import SwiftUI struct ContentView: View { @Binding var boundValue: Double? @State private var stateValue: Double? = 55 var body: some View { TextField("Bound value", value: $boundValue, format: .number) Text("\(boundValue ?? .nan)") TextField("State value", value: $stateValue, format: .number) Text("\(stateValue ?? .nan)") } } #Preview { ContentView(boundValue: .constant(42.00)) } It's as though the optional value stored externally is preventing the value updating. Can anyone confirm whether this is intentional, or a bug? This is in Xcode 26b6, on macOS Tahoe 26b8, but from this query it looks like the problem has existed for years.
Topic: UI Frameworks SubTopic: SwiftUI
8
0
311
6d
Inconsistent subviews redrawing in LazyVStack
Hello Apple forum ! I spotted a weird behaviour with LazyVStack in a ScrollView. I understand that it loads its views only once upon appearance unlinke VStack that loads everything in one shot. What I noticed also, it seems to reload its views sometimes when scrolling back up to earlier loaded views. The thing is, it isn't always the case. struct LazyVStackTest: View { var body: some View { ScrollView { LazyVStack { ForEach(0..<1000, id: \.self) { _ in // if true { MyText() // } } } } } struct MyText: View { var body: some View { let _ = Self._printChanges() HStack { Text("hello") } } } } If we consider the code above on XCode 26 beta 7 on an iOS 26 or iOS 18.2 simulator. Scroll to the bottom : you'll see one "LazyVStackTest.MyText: @self changed" for each row. Then scroll back up to the top, we'll see again the same message printed multiple times. --> So I gather from this that LazyVStack not only loads lazily but also removes old rows from memory & recreates them upon reappearance. What I don't get however is that if you uncomment the "if true" statement, you won't see the reloading happening. And I have absolutely no clue as to why 😅 If someone could help shed some light on this weird behaviour, it would be greatly appreciated ^^ PS : the issue is also present with XCode 16.2 but at a deeper lever (ex: if we embed another custom View "MyText2" inside "MyText", the reloading is in "MyText2" & not "MyText")
0
0
131
6d