We’ve encountered an issue while developing with SwiftUI: when using the inspector on iPadOS, if the inspector is placed inside a NavigationStack, and both the view attached to the inspector and the content inside the inspector itself are scrollable, scrolling them to the top may cause abnormal jitter.
We suspect this issue might be related to NavigationTitle. However, if we place the inspector outside the NavigationStack, tapping any NavigationLink while the inspector is expanded will cause problems with the View.matchedTransitionSource(id:in:) animation.
A reproducible project can be found here:
https://github.com/ThreeManager785/Inspetor-Issue
We’ve tried many approaches but haven’t been able to resolve it. Is there any way to fix this issue?
SwiftUI
RSS for tagProvide views, controls, and layout structures for declaring your app's user interface using SwiftUI.
Posts under SwiftUI tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
After updating to iPad OS 26, when moving around the app, I can not see the back button, title, and the right menu button on the navigation bar unless I scroll down, then everything is fine.
Any advice ?
Thanks
I have two views I've applied Liquid Glass to in Swift UI. I've noticed that depending on the height of the view the material changes and I'm not sure why. See the attached screenshot. Both views add the liquidGlass style in the same way but behave very differently on the same background.
Ideally I'd like them to look the same as the bottom one. Is that the same as the clear style?
[Also submitted as FB20262774. Posting here in hopes of saving someone else from burning half a day chasing this down.]
Dynamic scaling of an Image() in a Button(), incorrectly decreases when transitioning from XXX Large to AX 1 accessibility text sizes, instead of continuing to grow as expected. This occurs both on device and in the simulator, in iOS 18.6 and iOS 26.
Repro Steps
Create a project with sample code below
Show the preview if not showing
In Xcode Preview, click Canvas Device Settings and change Dynamic Type from XXX Large to AX 1
Sample Code
struct ContentView: View {
var body: some View {
VStack(spacing: 30) {
Text("Button Image Scaling Issue")
.font(.system(size: 24, weight: .semibold))
Text("Switch dynamic type from **XXX Large** to **AX 1**. The **Button** icon shrinks while the **No Button** icon grows.")
.font(.system(size: 14, weight: .regular))
TestView(title: "No Button", isButton: false)
TestView(title: "Button", isButton: true)
}
.padding()
}
}
struct TestView: View {
let title: String
let isButton: Bool
var body: some View {
VStack {
Text(title)
.font(.system(size: 16))
.foregroundColor(.secondary)
if isButton {
Button {} label: {
Image(systemName: "divide")
.font(.system(.largeTitle))
}
.buttonStyle(.bordered)
.frame(height: 50)
} else {
Image(systemName: "divide")
.font(.system(.largeTitle))
.foregroundColor(.blue)
.frame(height: 50)
.background(Color.gray.opacity(0.2))
}
}
}
}
Expected Result
Both the button and non-button images should continue to scale up proportionally when moving to larger accessibility text sizes.
Actual Result
When going from XXX Large to AX 1…
Non-button image gets larger ✅
Button image gets smaller ❌
Screen Recording
System Info
Xcode Version 26.0 (17A321)
iOS 26.0 and 18.6
Hi everyone,
I’ve run into a strange localization issue with macOS document-based apps in SwiftUI/AppKit. I created a standard document-based macOS app in Xcode (SwiftUI template) and added a French localization to the project.
All system-generated menu bar commands (File → New, Close, Print, etc.) are correctly translated into French… except for “Save”, which remains in English.
To rule out problems in my own code, I created a fresh, unmodified document-based app project in Xcode, and immediately added French localization without touching any code. Same result: all commands are translated except “Save”.
This suggests the issue isn’t specific to my app code, but either the project template, or possibly macOS itself.
My environment
• Xcode version: 16.4
• macOS version: 15.6.1 Sequoia]
• Swift: Swift 6
Questions
1. Has anyone else seen this issue with the “Save” command not being localized?
2. Is this expected behavior (maybe “Save” is handled differently from other menu items)?
3. If it’s a bug in the template or OS, is there a known workaround?
Thanks for any insights
P.S. Please note that I'm a total beginner
When displaying a view with a Button inside a ScrollView using the sheet modifier, if you try to close the sheet by swiping and your finger is touching the Button, the touch is not canceled.
This issue occurs when building with Xcode 16 but does not occur when building with Xcode 15.
Here is screen cast.
https://drive.google.com/file/d/1GaOjggWxvjDY38My4JEl-URyik928iBT/view?usp=sharing
Code
struct ContentView: View {
@State var isModalPresented: Bool = false
var body: some View {
ScrollView {
Button {
debugPrint("Hello")
isModalPresented.toggle()
} label: {
Text("Hello")
.frame(height: 44)
}
Button {
debugPrint("World")
} label: {
Text("World")
.frame(height: 44)
}
Text("Hoge")
.frame(height: 44)
.contentShape(Rectangle())
.onTapGesture {
debugPrint("Hoge")
}
}
.sheet(isPresented: $isModalPresented) {
ContentView()
}
}
}
I tried the new WebView api in swiftui and tried to pass webPage for this view to be able to control the navigation of the user by giving him the option to go back or forward using nav buttons but the view doesn't get's updated when the webPage.backForwardList.backList so the buttons remains disabled.
code snippet:
@available(iOS 26, *)
struct LinkWebViewFor26: View {
let url: URL
@State var webPage = WebPage()
@Environment(\.dismiss) private var dismiss
var body: some View {
WebView(webPage)
.webViewBackForwardNavigationGestures(.disabled)
.task { webPage.load(url) }
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button {
dismiss()
} label: {
Image(systemName: "checkmark")
}
.buttonStyle(.glassProminent)
}
ToolbarItemGroup(placement: .topBarLeading) {
BackForwardMenu(
list: webPage.backForwardList.backList,
label: .init(text: "Backward", systemImage: "chevron.backward")
) { item in
webPage.load(item)
}
BackForwardMenu(
list: webPage.backForwardList.forwardList.reversed(),
label: .init(text: "Forward", systemImage: "chevron.forward")
) { item in
webPage.load(item)
}
}
}
.onChange(of: webPage.backForwardList) { _, _ in
print(webPage.backForwardList.backList)
}
}
}
I currently have a SwiftUI TabView that has 5 Tab's. The first tab has a UIScrollView in a UIViewRepresentible with scrollView.scrollsToTop = false and that works fine for when the user hits the navigation bar, however if the user taps the first tab when it is already selected my UIScrollView scrolls to top.
My UIScrollView is essentially 5 views, a center view, top, bottom, right, and left view. All views except for the center are offscreen but available for the user to scroll horizontal or vertical (and the respective views get updated based on the new center view).
The issue I have is that clicking the first tab when its already selected, sets the content offset (for the y axis) to 0, which messes me up 2x, first it scrolls up but since its not really scrolling the right, left, and upper views dont exist, which makes the user think it can't be scrolled or it's broken.
For now I subclassed UIScrollView like this
class NoScrollToTopScrollView: UIScrollView {
override func setContentOffset(_ contentOffset: CGPoint, animated: Bool) {
if contentOffset.y == .zero {
// Ignore SwiftUI’s re-tap scroll-to-top
return
}
super.setContentOffset(contentOffset, animated: animated)
}
}
which seems to work, but I'm just wondering if there is a better way to do this, or maybe a way to disable SwiftUI Tab from doing its default action which can help with a SwiftUI ScrollView as well?
I updated my App to iOS26 and I have some strange tinting with Liquid Glass elements.
Sometime the elements are tinted and sometime not. Look at the screenshots. This is the same view, without any changes.
Just go back and forth to see the different Button tinting.
And this is not just happing in the View. It happens all over the app.
Why is this happening?
If you create a SwiftUI App where a ‘.sheet’ is presented and use a NavigationStack within that Sheet, when you use NavigationLink to present a view, the title of the Nav Bar will start at a height of 46px and pop to the Default Height of 54px when it loads causing a visual pop in the UI.
In iOS 18 it functions correctly, in iOS 26 the visual pop is present. This impacts both inline and large styles, if you disable the back button it is still present, the only way I have discovered to get rid of it is by using 'fullScreenCover' instead of '.sheet'. This feels like buggy UI. This issue has been present since iOS 26 Beta 5, I was hoping it would be fixed but is still present in the GM.
Feedback has been filed via Feedback Assistant:
FB20228369
This is the code to re-produce the issue:
import SwiftUI
struct ContentView: View {
@State private var showSheet: Bool = false
var body: some View {
VStack {
Button {
showSheet.toggle()
} label: {
Text("Show Sheet")
}
}
.padding()
.sheet(isPresented: $showSheet) {
NavigationStack {
List {
NavigationLink {
Rectangle()
.foregroundStyle(.red)
.navigationTitle("Red")
} label: {
Text("Show Red")
}
}
}
.presentationSizing(.page)
}
}
}
#Preview {
ContentView()
}
I'm adapting my app on iOS 26, and I just found out withAnimation fuction's completion not called in some cases. The same code on iOS 18 was fine. The problem is very fatal, When you check the api, it saids "The completion callback will always be fired exactly one time",but this time it doens't work.
I'm using the Xcode Version 26.0 (17A321) RC1,still not test on a real devcie yet.
[Also submitted as FB20213961]
SwiftUI Button with a label: closure containing only an Image view has a smaller tap target than buttons created with a Label or the convenience initializer. The hit area shrinks to the image bounds instead of preserving the standard minimum tappable size.
SCREEN RECORDING
On a physical device, the difference is obvious—it’s easy to miss the button. Sometimes it even shows the button-tapped bounce animation but doesn’t trigger the action.
SYSTEM INFO
Xcode Version 26.0 (17A321)
macOS 15.6.1 (24G90)
iOS 26.0 (23A340)
SAMPLE CODE
The following snippet shows the difference in hit targets between the convenience initializer, a Label, and an Image (the latter two in a label: closure).
// ✅ Hit target is entire button
Button("Button 1", systemImage: "1.square.fill") {
print("Button 1 tapped")
}
// ✅ Hit target is entire button
Button {
print("Button 2 tapped")
} label: {
Label("Button 2", systemImage: "2.square.fill")
}
// ❌ Hit target is smaller than button
Button {
print("Button 3 tapped")
} label: {
Image(systemName: "3.square.fill")
}
.preferredColorScheme(.dark) doesn't seem to affect app toolbar, when .scrollEdgeEffectStyle(.hard, for: .top) is used. In the attachment, you can see the title and toolbar items don't change according to current value of .preferredColorScheme (you may need to scroll a bit to achieve it)
iOS 26 RC
Feedback ID - FB19769073
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationStack {
ScrollView(.vertical) {
ForEach(0..<100) { index in
Text("\(index)")
.padding()
.border(.blue)
.background(.blue)
.frame(maxWidth: .infinity)
}
}
.scrollEdgeEffectStyle(.hard, for: .top)
.navigationTitle("Test Title")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button(action: {
}) {
Text("Test")
}
}
}
}
.preferredColorScheme(.dark)
}
}
#Preview {
ContentView()
}
When I try to show/hide the content in .safeAreaBar(edge: .bottom), especially the content with a large height, the background animation of the toolbar is very laggy.
iOS 26 RC
Feedback ID - FB19768797
import SwiftUI
struct ContentView: View {
@State private var isShown: Bool = false
var body: some View {
NavigationStack {
Button("Toggle") {
withAnimation {
isShown.toggle()
}
}
ScrollView(.vertical) {
ForEach(0..<100) { index in
Text("\(index)")
.padding()
.border(.blue)
.background(.blue)
.frame(maxWidth: .infinity)
}
}
.scrollEdgeEffectStyle(.soft, for: .bottom)
.safeAreaBar(edge: .bottom) {
if isShown {
Text("Safe area bar")
.padding(64)
.background(.red)
}
}
}
}
}
#Preview {
ContentView()
}
When using .scrollEdgeEffectStyle(.hard, for: .top), search bar background doesn't match with . safeAreaBar view background (you can see that is is darker than the rest of the toolbar). Please find the screenshot in the attachment
iOS 26 RC
Light Mode
Feedback ID - FB19768159
import SwiftUI
struct ContentView: View {
@State private var count = 0
var body: some View {
NavigationStack {
ScrollView(.vertical) {
ForEach(0..<100) { index in
Text("\(index)")
.background(.red)
}
}
.scrollEdgeEffectStyle(.hard, for: .top)
.searchable(
text: .constant(""),
placement: .navigationBarDrawer(displayMode: .always)
)
.safeAreaBar(edge: .top) {
Text("Safe area bar")
}
}
}
}
#Preview {
ContentView()
}
As GeoCoder is now deprecated I am struggling to get the country only information from the new MKReverseGeocoding.
Maybe someone can guide me or give me direction? Or is this just not possible anymore?
let request = MKReverseGeocodingRequest(location: self.lastLocation ?? fallbackLocation)
request?.getMapItems { items, error in
guard let items = items else { return }
self.cityName = items.first?.addressRepresentations?.cityWithContext ?? ""
self.countryName = items.first?.addressRepresentations?.regionName ?? ""
}
I couldn't find anything here, sure you can get the full Address but I need single values to store so the user can search for (example City, Country)
In case the structure is always the same, let us say the country is always third part, sure I could split the string but it is not a reliable way to do this, at least for me.
Any help would be much appreciated.
In a SwiftUI DocumentGroup, the "Create Document" button remains permanently disabled when attempting to open a document that is in a conflict state (e.g., due to simultaneous edits across devices). As a result, the user cannot create new documents, and the app becomes stuck.
On macOS, the expected conflict resolution dialog appears, and the app continues to function normally.
On iOS, however, the "Create Document" button stays disabled indefinitely.
This behavior occurs consistently in a default SwiftUI document-based app.
Steps to Reproduce:
Create a new SwiftUI document-based project in Xcode;
Setup iCloud Storage in Signing & Capabilities;
Create an empty document and place it in a conflict state (e.g., save it simultaneously from two devices);
Attempt to open the conflicted document on an iPhone or iPad;
Expected Result:
The user should be able to resolve the conflict and continue working;
The "Create Document" button should remain functional;
Actual Result:
The "Create Document" button is disabled permanently;
The app cannot create new documents until restarted;
Environment;
iOS 18, iOS 26 (latest tested);
Xcode Version 16.4 (16F6)
Reproduced on iPhone and iPad;
Works as expected on macOS;
This appears to be a blocking issue in SwiftUI’s DocumentGroup on iOS.
FB20203775
I’m using SwiftUI’s Text(_:style:) with the .relative style to show how long ago a date occurred. According to the docs:
A style displaying a date as relative to now.
I expected it to show the precise difference between a past date and the current date. However, I noticed that two dates that are 3 days apart both display the same relative string under certain conditions.
Code snippet to reproduce- (using GMT time zone and the system calendar)
IMPORTANT: To reproduce this, set your Mac’s system clock to 8 September 2025, 3:00 AM. SwiftUI’s relative style uses the current system time as its reference point, so changing the clock is necessary to see the behavior.
Settings
Mac is set to Central European Time zone (but this behaviour was also reproduced by one of my app's users in the US.)
Mac OS Sequoia 15.5
XCode 16.4
tested on an iOS Simulator and a real iPhone both running iOS 18.5
struct TestDateView: View {
var body: some View {
// 8. July 10AM to 8. September 3AM = Shows 2 months 2 days
let startDate1: Date = Calendar.current.date(from: .init(calendar: .current, timeZone: .gmt,
year: 2025, month: 7, day: 8, hour: 10, minute: 0, second: 0))!
// 5. July 10AM to 8. September 3AM = Shows 2 months 2 days
let startDate2: Date = Calendar.current.date(from: .init(calendar: .current, timeZone: .gmt,
year: 2025, month: 7, day: 5, hour: 10, minute: 0, second: 0))!
// IMPORTANT!: Need to set MAC's clock to 8. September 3:00 AM to reproduce this bug
VStack {
Text(startDate1, style: .relative)
Text(startDate2, style: .relative)
}
}
}
How exactly does the .relative style work internally?
Is it expected that different dates can collapse into the same result like this, or is there a better way to use .relative to get more precise results?
PS: I know about DateComponents and DateFormatter for exact calculations, but I’d like to understand this approach since it auto-updates natively with no timers or publishers.
As the title indicates the problem, the large title is shown but the small title in Navitation Bar view is not shown when scrolled up with iOS26 beta7.
It works with iOS18 or earlier.
Is this iOS26 bug?
Experiencing 100% CPU usage in SwiftUI app using UIHostingController, only on iOS 26 beta and Xcode beta. Issue involves excessive view updates in AttributeGraph propagation.
Stack trace (main thread):
thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
frame #0: 0x00000001c38b9aa4 AttributeGraph`AG::Graph::propagate_dirty(AG::AttributeID) + 416
frame #1: 0x00000001d9a743ec SwiftUICore`SwiftUI.ObservationGraphMutation.apply() -> () + 656
frame #2: 0x00000001d97c0d4c SwiftUICore`function signature specialization <Arg[2] = [Closure Propagated : closure #1 () -> () in SwiftUI.(AsyncTransaction in _F9F204BD2F8DB167A76F17F3FB1B3335).apply() -> (), Argument Types : [SwiftUI.AsyncTransaction]> of generic specialization <()> of closure #1 () throws -> τ_0_0 in SwiftUI.withTransaction<τ_0_0>(SwiftUI.Transaction, () throws -> τ_0_0) throws -> τ_0_0 + 336
frame #3: 0x00000001d9a6ac80 SwiftUICore`merged function signature specialization <Arg[3] = Owned To Guaranteed> of function signature specialization <Arg[1] = [Closure Propagated : implicit closure #2 () -> () in implicit closure #1 @Sendable (SwiftUI.(AsyncTransaction in _F9F204BD2F8DB167A76F17F3FB1B3335)) -> () -> () in SwiftUI.GraphHost.flushTransactions() -> (), Argument Types : [SwiftUI.AsyncTransaction]> of SwiftUI.GraphHost.runTransaction(_: Swift.Optional<SwiftUI.Transaction>, do: () -> (), id: Swift.Optional<Swift.UInt32>) -> () + 196
frame #4: 0x00000001d9a52ab0 SwiftUICore`SwiftUI.GraphHost.flushTransactions() -> () + 176
frame #5: 0x00000001d8461aac SwiftUI`closure #1 (SwiftUI.GraphHost) -> () in SwiftUI._UIHostingView._renderForTest(interval: Swift.Double) -> () + 20
frame #6: 0x00000001d9bf3b38 SwiftUICore`partial apply forwarder for closure #1 (SwiftUI.ViewGraph) -> τ_1_0 in SwiftUI.ViewGraphRootValueUpdater.updateGraph<τ_0_0>(body: (SwiftUI.GraphHost) -> τ_1_0) -> τ_1_0 + 20
frame #7: 0x00000001d9e16dc4 SwiftUICore`SwiftUI.ViewGraphRootValueUpdater._updateViewGraph<τ_0_0>(body: (SwiftUI.ViewGraph) -> τ_1_0) -> Swift.Optional<τ_1_0> + 200
frame #8: 0x00000001d9e1546c SwiftUICore`SwiftUI.ViewGraphRootValueUpdater.updateGraph<τ_0_0>(body: (SwiftUI.GraphHost) -> τ_1_0) -> τ_1_0 + 136
frame #9: 0x00000001d8461a7c SwiftUI`closure #1 () -> () in closure #1 () -> () in closure #1 () -> () in SwiftUI._UIHostingView.beginTransaction() -> () + 144
frame #10: 0x00000001d846aed0 SwiftUI`partial apply forwarder for closure #1 () -> () in closure #1 () -> () in closure #1 () -> () in SwiftUI._UIHostingView.beginTransaction() -> () + 20
frame #11: 0x00000001d984f814 SwiftUICore`closure #1 () throws -> τ_0_0 in static SwiftUI.Update.ensure<τ_0_0>(() throws -> τ_0_0) throws -> τ_0_0 + 48
frame #12: 0x00000001d984e114 SwiftUICore`static SwiftUI.Update.ensure<τ_0_0>(() throws -> τ_0_0) throws -> τ_0_0 + 96
frame #13: 0x00000001d846aeac SwiftUI`partial apply forwarder for closure #1 () -> () in closure #1 () -> () in SwiftUI._UIHostingView.beginTransaction() -> () + 64
frame #14: 0x00000001851eab1c UIKitCore`___lldb_unnamed_symbol311742 + 20
* frame #15: 0x00000001852b56a8 UIKitCore`___lldb_unnamed_symbol315200 + 44
frame #16: 0x0000000185175120 UIKitCore`___lldb_unnamed_symbol308851 + 20
frame #17: 0x00000001d984e920 SwiftUICore`static SwiftUI.Update.dispatchImmediately<τ_0_0>(reason: Swift.Optional<SwiftUI.CustomEventTrace.ActionEventType.Reason>, _: () -> τ_0_0) -> τ_0_0 + 300
frame #18: 0x00000001d95a7428 SwiftUICore`static SwiftUI.ViewGraphHostUpdate.dispatchImmediately<τ_0_0>(() -> τ_0_0) -> τ_0_0 + 40
frame #19: 0x00000001852b59dc UIKitCore`___lldb_unnamed_symbol315204 + 192
frame #20: 0x00000001852b54a4 UIKitCore`___lldb_unnamed_symbol315199 + 64
frame #21: 0x0000000185745dd4 UIKitCore`_UIUpdateSequenceRunNext + 120
frame #22: 0x0000000186144fac UIKitCore`schedulerStepScheduledMainSectionContinue + 56
frame #23: 0x00000002505ad150 UpdateCycle`UC::DriverCore::continueProcessing() + 36
frame #24: 0x0000000180445b20 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
frame #25: 0x0000000180445a68 CoreFoundation`__CFRunLoopDoSource0 + 168
frame #26: 0x00000001804451f4 CoreFoundation`__CFRunLoopDoSources0 + 220
frame #27: 0x00000001804443a8 CoreFoundation`__CFRunLoopRun + 756
frame #28: 0x000000018043f458 CoreFoundation`_CFRunLoopRunSpecificWithOptions + 496
frame #29: 0x00000001928d19bc GraphicsServices`GSEventRunModal + 116
frame #30: 0x0000000186224480 UIKitCore`-[UIApplication _run] + 772
frame #31: 0x0000000186228650 UIKitCore`UIApplicationMain + 124
frame #32: 0x000000010bb1b504 MyApp.debug.dylib`main at main.swift:13:1
frame #33: 0x00000001043813d0 dyld_sim`start_sim + 20
frame #34: 0x000000010468ab98 dyld`start + 6076
Used let _ = Self.printChanges() in my SwiftUI View and got infinite changes of \_UICornerProvider.<computed 0x000000018527ffd8 (Optional<UICoordinateSpace>)> changed.
Reproduces only on beta; works on stable iOS. Likely beta-specific bug in SwiftUI rendering.