After updating to iOS 26.1, the popover opened from a menu bar button closes automatically without any user interaction.
When debugging, I found that onPop is being triggered on its own.
This behavior did not occur in previous versions of iOS, and there have been no code changes on the app side, so I suspect this may be due to a system behavior change or a potential OS bug.
main.dart
import 'package:flutter/material.dart';
import 'package:popover/popover.dart' as popover;
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
backgroundColor: Colors.cyan[100],
title: const Text('Popover Example'),
actions: const [
Padding(
padding: EdgeInsets.only(right: 8.0),
child: PopoverButton(),
),
],
),
body: const Center(child: PopoverButton(),),
),
);
}
}
class PopoverButton extends StatelessWidget {
const PopoverButton({super.key});
@override
Widget build(BuildContext context) {
return CupertinoButton(
padding: EdgeInsets.zero,
color: Colors.pink[100],
onPressed: () async {
final res = await popover.showPopover<bool>(
context: context,
transitionDuration: const Duration(milliseconds: 30),
bodyBuilder: (context) {
return SizedBox(
height: 100,
width: 100,
child: const Center(
child: Text(
'aaa',
style: TextStyle(fontSize: 24, color: Colors.black),
),
),
);
},
barrierDismissible: true,
direction: popover.PopoverDirection.bottom,
arrowHeight: 15,
arrowWidth: 30,
barrierColor: Colors.black.withValues(alpha: 0),
constraints: BoxConstraints(
maxWidth: MediaQuery.of(context).size.width,
maxHeight: MediaQuery.of(context).size.height * 2,
),
shadow: const [
BoxShadow(
color: Colors.black26,
spreadRadius: 10,
blurRadius: 80,
offset: Offset.zero,
),
],
);
},
child: const Text('menu'),
);
}
}
pubspec.yaml
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using flutter pub publish. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: ^3.6.0
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running flutter pub upgrade --major-versions. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run flutter pub outdated.
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.8
popover: 0.2.6+2
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the analysis_options.yaml file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^5.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/to/resolution-aware-images
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/to/asset-from-package
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/to/font-from-package
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
Created
On the California watchface (white) there are two complication slots. The upper one is seemingly not a standard slot and limited to a few Apple-owned apps (Calender, Time, …). It adopts the (default white) background of the watchface, so the date is neatly and cleanly displayed on the watchface backdrop.
The other lower circular complication makes up for a fat black bubble now on the clean face, which doesn‘t look too pretty (of course depending on the complication…). I would like to create a complication with rather minimalistic content, and it would look great if it could also share the white background and just produce that content on top of it.
While the documentation sounds like it would be possible to make the widget background adopt the context colors (which I would understand as using the same background color), for the life of me I can‘t get anything else than black for the circle. Has anyone achieved that? How would I do that?
(Image below shows the temperature widget…mine would have way less and smaller content….)
I have a UICollectionView using a UICollectionViewCompositionalLayout with an orthogonally scrolling section. When selecting a cell, I present a modal view controller with a zoom transition.
If I scroll quickly in that section after dismissing the presented view controller, the cells briefly overlap. See the attached screenshot.
This issue occurs only on iOS 26 and does not occur on iOS 18.
Has anyone found a way to mitigate this?
Sample project: https://github.com/antiraum/iOS26_UICollectionViewZoomTransitionIssue
Feedback FB21022192
My project uses the UINavigationController's largeTitle on the latest iOS 26.1, but I found that when I set the backgroundColor, the navigation bar's largeTitle disappeared after switching between normal and large titles. I checked the latest documentation and consulted AI, but I have not found any good solutions. For the demo project, please refer to FB20986869
I am using a ScrollViewReader, ScrollView, LazyVStack to organize a list of elements I want to be able to scroll to a specific location so i use elementID in the list and a UnitPoint value.
But the y value for unitpoint uses -0.1 to represent 100%. Is this intended behavior, a bug, or am i using something incorrectly?
I could not find this in the docs and it was only after debugging I found that proxy.scrollTo(id, UnitPoint(x:0, y:-0.1)) is how you scroll to the end of an item or proxy.scrollTo(id, UnitPoint(x:0, y:-0.05)) to scroll to the center.
Am I accessing the scrollTo property wrong or is this just how we use it? Also it seems .bottom is broken due to this aswell (as it uses 1 but the actual value that scrolls to the bottom is -0.1).
This seems like unintended behvaior as UnitPoints are supposed to be have values of 0-1
Here is a view which reproduces this behavior
struct ScrollTestView: View {
@State private var scrollToId: String = ""
@State private var scrollToAnchorY: String = "0.0"
@State private var scrollProxy: ScrollViewProxy?
var body: some View {
VStack {
HStack(spacing: 12) {
TextField("Enter ID (1-30)", text: $scrollToId)
.frame(width: 120)
.padding(8)
.background(Color.gray.opacity(0.1))
.cornerRadius(8)
TextField("Anchor Y (0-1)", text: $scrollToAnchorY)
.frame(width: 120)
.padding(8)
.background(Color.gray.opacity(0.1))
.cornerRadius(8)
Button {
guard let targetId = Int(scrollToId),
let anchorY = Double(scrollToAnchorY),
let proxy = scrollProxy else {
return
}
let anchorPoint = UnitPoint(x: 0.5, y: anchorY)
proxy.scrollTo(targetId, anchor: anchorPoint)
} label: {
Text("Scroll")
.font(.subheadline)
.padding(.horizontal, 16)
.padding(.vertical, 8)
.background(Color.blue)
.foregroundColor(.white)
.cornerRadius(8)
}
Spacer()
}
.padding(.horizontal, 16)
.padding(.vertical, 8)
ScrollViewReader { proxy in
ScrollView {
LazyVStack {
ForEach(1...30, id: \.self) { itemId in
VStack {
HStack {
Text("Item \(itemId)")
.font(.title2)
.bold()
Spacer()
}
.padding(.vertical, 16)
Divider()
.background(Color.gray.opacity(0.6))
}
.id(itemId)
}
}
.padding()
}
.onAppear {
scrollProxy = proxy
}
}
}
}
}
Appkit starting logging these warnings in macOS 26.1 about my app's MainMenu.
**Internal inconsistency in menus - menu <NSMenu: 0xb91b2ff80>
Title: AppName
Supermenu: 0xb91a50b40 (Main Menu), autoenable: YES
Previous menu: 0x0 (None)
Next menu: 0x0 (None)
Items: ()
believes it has [<NSMenuSubclassHereThisIsTheMenuBarMenuForMyApp:] 0xb91a50b40>
Title: Main Menu
Supermenu: 0x0 (None), autoenable: YES
Previous menu: 0x0 (None)
Next menu: 0x0 (None)
Items: (
) as a supermenu, but the supermenu does not seem to have any item with that submenu
**
I don't what that means. The supermenu is the menu that represents the menu used for my app's menu bar (as described by NSMenuSubclassHereThisIsTheMenuBarMenuForMyApp
Everything seems to work fine but log looks scary. Please don't throw!
I just updated to macOS 26.1.
I have a pure AppKit app (I guess that's not possible anymore but as close to a pure AppKit app as you can get).
I use NSButton with the glass bezel style and SF symbol images. It looks like the minor OS update brought layout changes because now some of these buttons are scaling the symbol image much larger than was being done on macOS 26. The image can sometimes draw outside the glass 'bezel'. It looks like using the 'info' symbol in a button results in much larger image scaling than it did on the previous Tahoe for some SF Symbols.
With the glass bezel style and a SF Symbol image how am I supposed to consistently make the button look good? With certain symbols I have to use imageScaling NSImageScaleProportionallyUpOrDown and on others I have to use NSImageScaleProportionallyDown. If I'm using a system image shouldn't it just do the right thing? Is trial and error the only way to tell? That's what I was doing before but it seems that the minor 26.1 update changed things.
Additionally calling -sizeToFit on a button multiple times can cause it to shrink for example:
[button sizeToFit]; // <-- At fitting size
// Then later
[button sizeToFit]; // Now button is shrunk
But if the button is already at its fitting size an additional call later shouldn't make it shrink, it should stay the same size. FB20517174
I see I now inherit SwiftUI, not sure if that has anything to do with this but if I wanted to opt in to fragile layout I wouldn't be using Appkit...
I want to check whether a sandboxed application already has access permission to a specific URL.
Based on my investigation, the following FileManager method seems to be able to determine it:
FileManager.default.isReadableFile(atPath: fileURL.path)
However, the method name and description don't explicitly mention this use case, so I'm not confident there aren't any oversights.
Also, since this method takes a String path rather than a URL, I'd like to know if there's a more modern API available.
I want to use this information to decide whether to prompt the user about the Sandbox restriction in my AppKit-based app.
I need to paste a string to the findNavigator of a TextEditor
Hello, I’m trying to present my custom SwiftUI dialog with text field in UIKit with modalPresentationStyle = .overFullScreen, but it leads to the UI being completely frozen once I select the TextField and memory constantly leaking. The minimal reproducible code is:
class ModalBugViewController: UIViewController {
var hostingController: UIHostingController<Content>!
struct Content: View {
@State private var text = ""
var body: some View {
ZStack {
Color.black.opacity(0.5).ignoresSafeArea()
VStack {
TextField("Test", text: $text)
.textFieldStyle(.roundedBorder)
.padding()
}
}
}
}
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .clear
hostingController = UIHostingController(rootView: Content())
addChild(hostingController)
view.addSubview(hostingController.view)
hostingController.view.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
hostingController.view.topAnchor.constraint(equalTo: view.topAnchor),
hostingController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor),
hostingController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
hostingController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor)
])
hostingController.didMove(toParent: self)
}
}
And then in UIKit source view:
let viewController = ModalBugViewController()
viewController.modalPresentationStyle = .overFullScreen
present(viewController, animated: true)
The bug is reproducible on iOS 18 - 26.1, even on the simulator, although on iOS 26 it's in landscape mode only.
Is there some workaround for this issue that doesn't involve rewriting the whole dialog in UIKit?
I am experiencing a frustrating bug on iOS 26.1 that makes my app look as if it lacks attention to detail.
Basically, when having a NavigationStack, where the root view has a top-right confirmation bar button item, and a pushed detail view does not have any button in the navigation bar trailing position, upon poping back to the root view, the confirmation bar button item shows a white overlay for about 1-2 seconds before finally disappearing and showing the correct appearance.
Here is the incorrect appearance right after the pop transition:
Eventually after about 1,5 seconds it gets turned back to what it should look like:
Here is the full code that you can use to reliably reproduce this issue on iOS 26.1:
@State private var path: [Int] = []
var body: some View {
NavigationStack(path: $path) {
VStack {
Text("First View")
.font(.title)
}
.navigationDestination(for: Int.self, destination: { param in
Text("Detail View")
.font(.title)
})
.navigationTitle("First")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItemGroup(placement: .confirmationAction) {
Button("Next", role: .confirm, action: {
self.path.append(1)
})
}
}
}
}
}
I submitted a Feedback for it: FB21010613 . Is there anything at all I can do on my end to work around this issue?
We're observing several localization issues with VNDocumentCameraViewController on devices running iOS 26. These localizations were correct in earlier iOS versions.
Images indicate that some English labels appear when the device's language is changed to German.
The issue can be reproduced by using the Note app.
Hi,
I have an iOS app that I’m trying to update with Liquid Glass.
In this app, I’m using a tab bar, which works fine with Liquid Glass, but as soon as I enable the “Reduce Transparency” setting in dark mode, I get a strange effect: at launch, the tab bar appears correctly in dark mode, but after scrolling a bit in the view, it eventually switches to light mode 😅
At launch:
After a bit of scrolling:
I can’t figure out whether this is intended behavior from the framework or not (I don’t have this issue with other apps).
I can reproduce it in a project built from scratch, here is the code (don't forget to set dark mode to the device and activate the reduce transparency option in the accessibility menu):
struct ContentView: View {
var body: some View {
TabView {
ScrollView {
LazyVStack {
ForEach(0..<100) { _ in
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello world").foregroundStyle(.primary)
}
}
.padding()
}
.tabItem {
Label("Menu", systemImage: "list.dash")
}
}
}
}
Do you know if this is expected behavior? Or if there’s something that can be done about it?
Thanks,
In the latest version of Watchos 26, an issue has been discovered with the following symptoms:
Placing a button on an overlay page, buttonStyle(PlainButtonStyle()), Long press and slide, the button can actually slide and return to its original position. Previously, watchos did not have this problem. Can experts take a look
Topic:
UI Frameworks
SubTopic:
SwiftUI
The application crashes immediately when the system attempts to display the automatic password input view controller (_SFAutomaticPasswordInputViewController). This occurs during the login or password-filling process.
OS Version: iOS 26.2 Beta 1
Build Number: (23C5027f)
Fatal Exception: NSInvalidArgumentException
*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil
Summary
I’m experiencing two issues with SwiftUI’s navigationTransition(.zoom) on iOS 26.0 and 26.1 that break previously smooth transitions. These issues appear both on real devices and Simulator. The same code works correctly on iOS 18.
Issue 1 - Source View Disappears After Drag-Dismiss
When using .navigationTransition(.zoom(sourceID:..., in:...)), the source view disappears completely after the transition finishes.
This only happens when the detail view is dismissed via drag (interactive dismiss).
When the view is dismissed by tapping the back button, the source view remains visible as expected.
Reproduced on: iOS 26.0, iOS 26.0.1 (17A400), iOS 26.1 (Simulator + physical device)
Issue 2 — Flickering and Geometry Mismatch During Transition
Compared to iOS 18 behavior, the outgoing view and incoming view no longer share consistent geometry.
Current behavior on iOS 26:
The disappearing view flickers during the drag-dismiss interaction.
The source and destination views no longer align geometrically.
Instead of smoothly morphing as in previous iOS versions, the two views briefly overlap incorrectly before applying the zoom animation.
Expected (iOS 18) behavior:
Matched geometry between source and destination.
Smooth, stable zoom transition with no flickering.
//
// ContentView.swift
// DummyTransition
//
// Created by Sasha Morozov on 12/11/25.
//
import SwiftUI
struct RectItem: Identifiable, Hashable {
let id: UUID = UUID()
let title: String
let color: Color
}
struct ContentView: View {
@Namespace private var zoomNamespace
private let items: [RectItem] = [
RectItem(title: "Red card", color: .red),
RectItem(title: "Blue card", color: .blue),
RectItem(title: "Green card", color: .green),
RectItem(title: "Orange card", color: .orange)
]
var body: some View {
NavigationStack {
ScrollView {
VStack(spacing: 16) {
ForEach(items) { item in
NavigationLink {
DetailView(item: item, namespace: zoomNamespace)
.navigationTransition(
.zoom(sourceID: item.id, in: zoomNamespace)
)
} label: {
RoundedRectangle(cornerRadius: 16)
.fill(item.color.gradient)
.frame(height: 120)
.overlay(
Text(item.title)
.font(.headline)
.foregroundStyle(.white)
)
.padding(.horizontal, 16)
.matchedTransitionSource(id: item.id, in: zoomNamespace)
}
.buttonStyle(.plain)
}
}
.padding(.vertical, 20)
}
.navigationTitle("Cards")
}
}
}
struct DetailView: View {
let item: RectItem
let namespace: Namespace.ID
var body: some View {
ZStack {
item.color
Text(item.title)
.font(.largeTitle.bold())
.foregroundStyle(.white)
}
.ignoresSafeArea()
.navigationTitle("Detail")
.navigationBarTitleDisplayMode(.inline)
}
}
#Preview {
ContentView()
}
Testing Environment
MacBook Pro (2023, M2 Pro, 16 GB RAM)
macOS 26.2 Beta (25C5031i)
Xcode: Version 26.0.1 (17A400)
Devices tested:
Simulator (iOS 26.0 / 26.1)
Physical device (iPhone 16) running iOS 26.1
Topic:
UI Frameworks
SubTopic:
SwiftUI
I want to scale the Image.
If my Image (or GIF) is 11x33 (width=3 and height=11)
but I want the Image size be 220x660 and how to auto expand the pixel?
the pixel (0,0) in my image will be a 20x20 with same color.
which means the Image(which I want) will has a pixel(0,0) to (20,20) is the same color to the (0,0)
I am having an issue with the code that I posted below. I capture voice in my CarPlay app, then allow the user to have it read back to them using AVSpeechUtterance.
This works fine on some cars, but many of my beta testers report no audio being played. I have also experienced this in a rental car where the audio was either too quiet or the audio didn't play.
Does anyone see any issue with the code that I posted? This is for CarPlay specifically.
class CarPlayTextToSpeechService: NSObject, ObservableObject, AVSpeechSynthesizerDelegate {
private var speechSynthesizer = AVSpeechSynthesizer()
static let shared = CarPlayTextToSpeechService()
/// Completion callback
private var completionCallback: (() -> Void)?
override init() {
super.init()
speechSynthesizer.delegate = self
}
func configureAudioSession() {
do {
try AVAudioSession.sharedInstance().setCategory(.playback, mode: .voicePrompt, options: [.duckOthers, .interruptSpokenAudioAndMixWithOthers, .allowBluetoothHFP])
} catch {
print("Failed to set audio session category: \(error.localizedDescription)")
}
}
public func speak(_ text: String, completion: (() -> Void)? = nil) {
self.configureAudioSession()
// Store the completion callback
self.completionCallback = completion
Task(priority: .high) {
let speechUtterance = AVSpeechUtterance(string: text)
let langCode = Locale.preferredLocalLanguageCountryCode
if langCode == "en-US" {
speechUtterance.voice = AVSpeechSynthesisVoice(identifier: AVSpeechSynthesisVoiceIdentifierAlex)
} else {
speechUtterance.voice = AVSpeechSynthesisVoice(language: langCode)
}
try AVAudioSession.sharedInstance().setActive(true, options: .notifyOthersOnDeactivation)
speechSynthesizer.speak(speechUtterance)
}
}
func speechSynthesizer(_ synthesizer: AVSpeechSynthesizer, didFinish utterance: AVSpeechUtterance) {
Task {
stopSpeech()
try AVAudioSession.sharedInstance().setActive(false)
}
// Call completion callback if available
self.completionCallback?()
self.completionCallback = nil
}
func stopSpeech() {
speechSynthesizer.stopSpeaking(at: .immediate)
}
}
I have following code and made it invoke every time when a UIViewController presents another UIViewController through method swizzling. When I try to access the Password management app while input password, these code will be invoked and the presenting VC is instance of UITrackingElementWindowController. It will crash
[presentingVC beginAppearanceTransition:NO animated:NO];
[presentingVC endAppearanceTransition];
Hello. I am searching the appearance icons from System Settings to select Dark Mode, Light Mode or Auto.
I am searching for the path (including file name) in Finder so that my app can use it no matter the macOS version. I will gladly include a screenshot of what I am looking for.
(sorry for the french)
I hope I will find an answer that will work out, as this is a personal project that I am most interested in to work for
Topic:
UI Frameworks
SubTopic:
General