When you use .navigationTransition(.zoom(sourceID: "placeholder", in: placehoder)) for navigation animation, going back using the swipe gesture is still very buggy on IOS26. I know it has been mentioned in other places like here: https://developer.apple.com/forums/thread/796805?answerId=856846022#856846022 but nothing seems to have been done to fix this issue.
Here is a video showing the bug comparing when the back button is used vs swipe to go back: https://imgur.com/a/JgEusRH
I wish there was a way to at least disable the swipe back gesture until this bug is fixed.
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.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hello. I have an 12 year old app that still has some objective-c code in it. I have a place where i have a flip animation between 2 view controllers that looks like this:
[UIView transitionFromView:origView
toView:newViewController.view
duration:0.5
options:UIViewAnimationOptionTransitionFlipFromRight
completion:nil];
It has looked like this since 2012 at least.
In our production release, it works prior to 26.1, but in 26.1 and 26.2, the flip is off-center and looks weird. it's like both edges flip the same way. It's a little bit hard to explain.
If seen at least 2 other app store apps that i have installed behave this way too, from 26.1 and onwards.
Anyone else seen this? Is there anything that can be done about it?
Thankful for thoughts.
I'm using one UITabBarController which leads to 6 NavigationController. Therefore the user will get 4 icons displayed and one icon with three points to see the rest of the Navigation Controller.
If the user now tries to edit the list and moves one item from the hidden area towards the TabBar at the bottom, the App crashes with the error:
Exception
NSException * "Can't add self as subview" 0x0000600000d16040
I can see this effect at least on both my apps.
If the same compilation is run on a older iOS version, there is no crash.
Is there anything I have to take care of the configuration of the TabBar, when it comes to iOS26?
Topic:
UI Frameworks
SubTopic:
UIKit
NSWindow objects with custom styleMask configurations seem to behave erratically in macOS Tahoe 26.3 RC.
For example an NSWindow is not resizable after issuing .styleMask.remove(.titled) or some NSWindow-s become totally unresponsive (the NSWindow becomes transparent to mouse events) with custom styleMask-s.
This is a radical change compared to how all previous macOS versions or the 26.3 beta3 worked and seriously affects apps that might use custom NSWindows - this includes some system utilities, OSD/HUD apps etc, actually breaking some apps.
Such fundamental compatibility altering changes should not be introduced in an RC stage (if this is intentional and not a bug) imho.
When I use the .zoom transition in a navigation stack, I get a glitch when interrupting the animation by swiping back before it completes.
When doing this, the source view disappears. I can still tap it to trigger the navigation again, but its not visible on screen.
This seems to be a regression in iOS 26, as it works as expected when testing on iOS 18.
Has someone else seen this issue and found a workaround? Is it possible to disable interrupting the transition?
Filed a feedback on the issue FB19601591
Screen recording:
https://share.icloud.com/photos/04cio3fEcbR6u64PAgxuS2CLQ
Example code
@State var showDetail = false
@Namespace var namespace
var body: some View {
NavigationStack {
ScrollView {
showDetailButton
}
.navigationTitle("Title")
.navigationBarTitleDisplayMode(.inline)
.navigationDestination(isPresented: $showDetail) {
Text("Detail")
.navigationTransition(.zoom(sourceID: "zoom", in: namespace))
}
}
}
var showDetailButton: some View {
Button {
showDetail = true
} label: {
Text("Show detail")
.padding()
.background(.green)
.matchedTransitionSource(id: "zoom", in: namespace)
}
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
I've worked through Apple's dice demo for SwiftUI, so far so good. I've got a single Die view with a button to "roll" the die. This works perfectly using the code below:
struct DieView: View {
init(dieType: DieType) {
self.dieValue = Int.random(in: 1...dieType.rawValue)
self.dieType = dieType
}
@State private var dieValue: Int
@State private var dieType: DieType
var body: some View {
VStack {
if self.dieType == DieType.D6 {
Image(systemName: "die.face.\(dieValue)")
.resizable()
.frame(width: 100, height: 100)
.padding()
}
else {//self.dieType == DieType.D12{
Text("\(self.dieValue)")
.font(.largeTitle)
}
Button("Roll"){
withAnimation{
dieValue = Int.random(in: 1...dieType.rawValue)
}
}
.buttonStyle(.bordered)
}
Spacer()
}
}
Now I want to do a DiceSetView with an arbitrary number of dice. I've got the UI working with the following;
struct DiceSetView: View {
@State private var totalScore: Int = 0
var body: some View {
ScrollView(.horizontal) {
HStack{
DieView(dieType: DieType.D6)
DieView(dieType: DieType.D6)
DieView(dieType: DieType.D6)
}
}
HStack{
Button("Roll All"){}
.buttonStyle(.bordered)
Text("Score \(totalScore)")
.font(.callout)
}
Spacer()
}
}
Where I'm struggling is how to get the total of all the dice in a set and to roll all the dice in a set on a button click.
I can't iterate through the dice, and just "click" the buttons in the child views from their parents, and I can't think how it should be structured to achieve this (I'm new to this style of programming!) - can anyone point me in the right direction for how to achieve what I want? I realise that I'm probably missing something fundamentally conceptual here....
Topic:
UI Frameworks
SubTopic:
SwiftUI
I'm sure this is a basic question, but I'm new to this style of development, so thought Id ask...
I've worked through Apple's dice roller demo, so far so good - I'm using the code below to render and roll a single die;
struct DieView: View {
init(dieType: DieType) {
self.dieValue = Int.random(in: 1...dieType.rawValue)
self.dieType = dieType
}
@State private var dieValue: Int
@State private var dieType: DieType
var body: some View {
VStack {
if self.dieType == DieType.D6 {
Image(systemName: "die.face.\(dieValue)")
.resizable()
.frame(width: 100, height: 100)
.padding()
}
else {
Text("\(self.dieValue)")
.font(.largeTitle)
}
}
Button("Roll"){
withAnimation{
dieValue = Int.random(in: 1...dieType.rawValue)
}
}
.buttonStyle(.bordered)
Spacer()
}
}
Again, so far so good - works as I'd expect. I can now also add multiple DieViews to a DiceSetView and they display as I'd expect.
Where I'm stuck is in the DiceSetView, I want to both determine the total score across the dice, and also offer the ability to Roll All the dice in a set. (Ultimately I want another level above the set, so I'll be looking to roll all dice in all sets)
I can't simply call a func / method on the child view (i.e. iterate through them and sum their values, and roll each), I suspect I need to change how it's all structured, but not sure where to go from here...
Can anyone point me in the right direction?
Topic:
UI Frameworks
SubTopic:
SwiftUI
I have an icon button in toolbar but only the icon is triggering tap events while outside icon button gives tap feedback but event is not firing.
Code:
ToolbarItem(placement: .navigationBarTrailing) {
Button(action: toggleBookmark) {
Image(systemName: isBookmarked ? "bookmark.fill" : "bookmark")
.resizable()
.aspectRatio(0.8, contentMode: .fit)
.frame(width: 20, height: 20)
}
}
Here toggleBookmark function is only called if I click on Image but not if I click outside image but on the circular button that appears on iOS 26.
See this screen recording.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Hi, new developer here.
I have an issue where an image I have on app is not showing up on some devices.
The image is: Resources/Assets/logo:
I am using it in my app like:
ZStack {
Color.white
.ignoresSafeArea()
VStack {
Spacer()
Image("logo")
Spacer()
Text(dateString)
.font(.custom("LinLibertine", size: 17))
.fontWeight(.bold)
.tracking(5)
.padding(.bottom, 50)
}
}
The image appears fine on all simulators. And also on my real device iPad with A14. But when I run it on iPhone 8 or iPad Air M4, it shows empty space in place of image.
I tried many different options like:
Image("logo")
.renderingMode(.original)
.resizable()
.scaledToFit()
frame(width: 300)
.background(Color.red.opacity(0.3))
But nothing works. What can be the issue?
Hello dear developers!
Recently, I stumbled upon some really strange behavior of SwiftUI and I’m very curious why it works this way
struct ContentView: View {
@State private var title: String?
@State private var isSheetPresented: Bool = false
var body: some View {
Button("Hello, world!") {
title = "Sheet title"
isSheetPresented = true
}
.sheet(isPresented: $isSheetPresented, content: {
if let title {
Text(title)
} else {
EmptyView()
}
})
}
}
Why in this case when we tap the button and sheet comes in we go to the branch else even though we set title before isSheetPresented but it still somehow nil
But what really drive me crazy is that if we change a little bit code to this:
I just added another @State property 'number' and use it as the Button's title. In this scenario it works 😃 and Text in the sheet view appearing
struct ContentView: View {
@State private var title: String?
@State private var number = 0
@State private var isSheetPresented = false
var body: some View {
Button("\(number)") {
title = "Sheet title"
number += 0
isSheetPresented = true
}
.sheet(isPresented: $isSheetPresented, content: {
if let title {
Text(title)
} else {
EmptyView()
}
})
}
}
Is this somehow related to what happens under the hood like View Tree and Render Tree (Attribute Graph)?
Maybe because ContentView’s body doesn't capture title it cannot be stored in the Render Tree so it always would have the initial value of nil?
if there are any well-informed folks here, please help me figure out this mystery, I’d appreciate it!!!
p.s.
Don’t get me wrong. Im not interested in how to make it work. I’m interested in why this doesn’t work and what really happens under the hood that led to this result
I have a Menu in a Toolbar (specifically, the .bottomBar). If I open the menu quickly after it appears (within a few seconds), it flies to the top of the screen. I've created a minimum woking example below.
This appears to be a pretty glaring iOS 26 bug that has been present since the early betas, but I can't seem to find much discussion about it (apart from this post from 8 months ago), so I'm wondering if I might be doing something wrong. Or maybe someone managed to figure out a workaround.
If the Menu is very simple (just Text items), it seems to be okay. But if the Menu is even slightly complex (e.g. includes icons), then it exhibits the flying behavior. I've also been able to reproduce this bug under different types of navigation component (e.g. NavigationSplitView).
I'm seeing this behavior in the current version of iOS (26.2.1), both on device and in the simulator.
MWE
struct ContentView: View {
var body: some View {
NavigationStack {
VStack {
NavigationLink("Go to Detail") {
DetailView()
}
}
.navigationTitle("Root")
}
}
}
struct DetailView: View {
var body: some View {
VStack {
Text("Detail View")
}
.navigationTitle("Detail")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .bottomBar) {
Menu {
Button {
} label: {
Label("Delete", systemImage: "trash")
}
} label: {
Image(systemName: "ellipsis.circle")
}
}
}
}
}
Topic:
UI Frameworks
SubTopic:
SwiftUI
I can't seem to find information on this but this is causing a critical bug where the Strong Password suggestion sheet presents on any secure field (UIKit) and clears the others when closing it. This means the user cannot enter a password when there is a secure confirm password field because switching fields clears the other.
This looks to be a recent issue but I can't tell when this was introduced or if this is SDK / OS version related. I am finding it in both Xcode 26.2 and 16.4 when running on device (iOS 26.2.1 and XC 26 simulators).
Code to reproduce:
class ViewController: UIViewController {
override func loadView() {
let v = UIStackView()
v.axis = .vertical
v.layoutMargins = .init(top: 16, left: 16, bottom: 16, right: 16)
v.isLayoutMarginsRelativeArrangement = true
view = v
let t1 = UITextField()
t1.textContentType = .username
t1.placeholder = "Username"
v.addArrangedSubview(t1)
let t2 = UITextField()
t2.isSecureTextEntry = true
t2.textContentType = .newPassword
t2.placeholder = "Password"
t2.clearsOnInsertion = false
t2.clearsOnBeginEditing = false
t2.passwordRules = nil
t2.clearButtonMode = .always
v.addArrangedSubview(t2)
let t3 = UITextField()
t3.isSecureTextEntry = true
t3.textContentType = .newPassword
t3.placeholder = "Confirm Password"
t3.clearsOnInsertion = false
t3.clearsOnBeginEditing = false
t3.passwordRules = nil
t3.clearButtonMode = .always
v.addArrangedSubview(t3)
v.addArrangedSubview(UIView())
}
}
No matter what textContentType is used the strong password still forcefully breaks the flow and blocks the user.
It seems to me that NSStagedMigrationManager has algorithmic issues. It doesn't perform staged migration, if all its stages are NSLightweightMigrationStage.
You can try it yourself. There is a test project with three model versions V1, V2, V3, V4. Migrating V1->V2 is compatible with lightweight migration, V2->V3, V3->V4 is also compatible, but V1->V3 is not. I have following output:
Migrating V1->V2, error: nil
Migrating V2->V3, error: nil
Migrating V3->V4, error: nil
Migrating V1->V3, no manager, error: Optional("Persistent store migration failed, missing mapping model.")
Migrating V1->V3, lightweight[1, 2, 3], error: Optional("Persistent store migration failed, missing mapping model.")
Migrating V1->V3, lightweight[1]->lightweight[2]->lightweight[3], error: Optional("Persistent store migration failed, missing mapping model.")
Migrating V1->V3, custom[1->2]->lightweight[3], error: nil
Migrating V1->V3, lightweight[1]->custom[2->3], error: nil
Migrating V1->V3, custom[1->2]->custom[2->3], error: nil
Migrating V1->V4, error: Optional("Persistent store migration failed, missing mapping model.")
Migrating V2->V4, error: nil
Migrating V1->V4, custom[1->2]->lightweight[3, 4], error: nil
Migrating V1->V4, lightweight[3, 4]->custom[1->2], error: Optional("A store file cannot be migrated backwards with staged migration.")
Migrating V1->V4, lightweight[1, 2]->lightweight[3, 4], error: Optional("Persistent store migration failed, missing mapping model.")
Migrating V1->V4, lightweight[1]->custom[2->3]->lightweight[4], error: nil
Migrating V1->V4, lightweight[1,4]->custom[2->3], error: nil
Migrating V1->V4, custom[2->3]->lightweight[1,4], error: Optional("Persistent store migration failed, missing mapping model.")
I think that staged migration should satisfy the following rules for two consecutive stages:
Any version of lightweight stage to any version of lightweight stage;
Any version of lightweight stage to current version of custom stage;
Next version of custom stage to any version of lightweight stage;
Next version of custom stage to current version of custom stage.
However, rule 1 doesn't work, because migration manager skips intermediate versions if they are inside lightweight stages, even different ones.
Note that lightweight[3, 4]->custom[1->2] doesn't work, lightweight[1,4]->custom[2->3] works, but custom[2->3]->lightweight[1,4] doesn't work again.
Would like to hear your opinion on that, especially, from Core Data team, if possible.
Thanks!
I have a problem when applying rotationEffect to a map in in SwiftUI. The legal text in the map is transformed as shown in this image:
The following code is part of a much larger and complex view; it is a minimal example to reproduce the error:
import SwiftUI
import MapKit
struct ContentView: View {
@State private var offset = CGSize.zero
var body: some View {
ZStack {
let drag = DragGesture()
.onChanged { g in
offset.width = g.translation.width
offset.height = g.translation.height
}
Map(interactionModes: [.zoom])
.frame(width: 320, height: 220)
.rotationEffect(.degrees(Double(offset.width / 12)))
.highPriorityGesture(drag)
}
}
}
I hope you can help me with this problem.
Fatal Exception: NSInternalInconsistencyException
Cannot remove an observer <WKWebView 0x135137800> for the key path "configuration.enforcesChildRestrictions" from <STScreenTimeConfigurationObserver 0x13c6d7460>, most likely because the value for the key "configuration" has changed without an appropriate KVO notification being sent. Check the KVO-compliance of the STScreenTimeConfigurationObserver [class.]
I noticed that on iOS 26, WKWebView registers STScreenTimeConfigurationObserver, Is this an iOS 26 system issue? What should I do?
Platform
UIKit
iOS
UIActivityViewController
Environment
Device (issue reported): iPhone 16
iOS Version: 26.2
App Type: UIKit / Swift (standard modal presentation of UIActivityViewController)
Summary
When presenting UIActivityViewController to share a CSV file, the share sheet does not allow vertical scrolling, making lower actions (including Save to Files) unreachable.
The same flow works correctly when sharing a PDF, and the issue cannot be reproduced on other test devices.
Steps to Reproduce
Launch the app and log in
Navigate to More → Reports
Tap Export Report
Choose Export Report (CSV)
Observe the share sheet
Expected Result
The user should be able to vertically scroll the share sheet
All share actions (including Save to Files) should be reachable
Actual Result
Share sheet opens but vertical scrolling is disabled
Lower options (including Save to Files) are not reachable
No crash or console errors
I’m developing a share extension for iOS 26 with Xcode 26. When the extension’s sheet appears, it always shows a full white background, even though iOS 26 introduces a new “Liquid Glass” effect for partial sheets.
Expected:
The sheet background should use the iOS 26 glassmorphism effect as seen in full apps.
Actual behavior:
Custom sheets in my app get the glass effect, but the native system sheet in the share extension always opens as plain white.
Steps to reproduce:
Create a share extension using UIKit
Present any UIViewController as the main view
Set modalPresentationStyle = .pageSheet (or leave as default)
Observe solid white background, not glassmorphism
Sample code:
swift
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .clear
preferredContentSize = CGSize(width: UIScreen.main.bounds.width, height: 300)
}
Troubleshooting attempted:
Tried adding UIVisualEffectView with system blur/materials
Removed all custom backgrounds
Set modalPresentationStyle explicitly
Questions:
Is it possible to enable or force the Liquid Glass effect in share extensions on iOS 26?
Is this a limitation by design or a potential bug?
Any workaround to make extension sheet backgrounds match system glass appearance?
Hi.
In my project, I use the following property to access the safe area via UIApplication:
UIApplication
.shared
.connectedScenes
.flatMap { ($0 as? UIWindowScene)?.windows ?? [] }
.first { $0.isKeyWindow }?.safeAreaInsets
However, in Xcode 26 and iOS 26, this no longer works, and in some cases the app crashes. Views that rely on this property stop behaving as expected. For example, if it’s a sheet, it does not appear.
The same app built with Xcode 16 and distributed via TestFlight runs on iOS 26 without any issues.
What is the correct and safe way to obtain safeAreaInsets outside of a View now?
Topic:
UI Frameworks
SubTopic:
SwiftUI
I’m developing a share extension for iOS 26 with Xcode 26. When the extension’s sheet appears, it always shows a full white background, even though iOS 26 introduces a new “Liquid Glass” effect for partial sheets.
Expected:
The sheet background should use the iOS 26 glassmorphism effect as seen in full apps.
Actual behavior:
Custom sheets in my app get the glass effect, but the native system sheet in the share extension always opens as plain white.
Steps to reproduce:
Create a share extension using UIKit
Present any UIViewController as the main view
Set modalPresentationStyle = .pageSheet (or leave as default)
Observe solid white background, not glassmorphism
Sample code:
swift
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .clear
preferredContentSize = CGSize(width: UIScreen.main.bounds.width, height: 300)
}
Troubleshooting attempted:
Tried adding UIVisualEffectView with system blur/materials
Removed all custom backgrounds
Set modalPresentationStyle explicitly
Questions:
Is it possible to enable or force the Liquid Glass effect in share extensions on iOS 26?
Is this a limitation by design or a potential bug?
Any workaround to make extension sheet backgrounds match system glass appearance?
Hi — I’m seeing the DocumentGroup rename/title affordance get clipped on iPad when I populate the navigation bar with SwiftUI toolbar items in .topBarLeading, .principal, and .topBarTrailing (trailing is an HStack of controls). Example:
.toolbar {
ToolbarItem(placement: .topBarLeading) { UndoRedoControlsView(...) }
ToolbarItem(placement: .principal) { Text(canvasInfoTitle).lineLimit(1) }
ToolbarItem(placement: .topBarTrailing) { HStack { ... } }
}
.navigationBarTitleDisplayMode(.inline)
Is there a recommended way to structure toolbar content so the system’s document title/rename control always has space (or a way to reserve space / avoid clipping), short of removing .principal or moving items into menus?
Topic:
UI Frameworks
SubTopic:
SwiftUI