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

A Summary of the WWDC25 Group Lab - UI Frameworks
At WWDC25 we launched a new type of Lab event for the developer community - Group Labs. A Group Lab is a panel Q&A designed for a large audience of developers. Group Labs are a unique opportunity for the community to submit questions directly to a panel of Apple engineers and designers. Here are the highlights from the WWDC25 Group Lab for UI Frameworks. How would you recommend developers start adopting the new design? Start by focusing on the foundational structural elements of your application, working from the "top down" or "bottom up" based on your application's hierarchy. These structural changes, like edge-to-edge content and updated navigation and controls, often require corresponding code modifications. As a first step, recompile your application with the new SDK to see what updates are automatically applied, especially if you've been using standard controls. Then, carefully analyze where the new design elements can be applied to your UI, paying particular attention to custom controls or UI that could benefit from a refresh. Address the large structural items first then focus on smaller details is recommended. Will we need to migrate our UI code to Swift and SwiftUI to adopt the new design? No, you will not need to migrate your UI code to Swift and SwiftUI to adopt the new design. The UI frameworks fully support the new design, allowing you to migrate your app with as little effort as possible, especially if you've been using standard controls. The goal is to make it easy to adopt the new design, regardless of your current UI framework, to achieve a cohesive look across the operating system. What was the reason for choosing Liquid Glass over frosted glass, as used in visionOS? The choice of Liquid Glass was driven by the desire to bring content to life. The see-through nature of Liquid Glass enhances this effect. The appearance of Liquid Glass adapts based on its size; larger glass elements look more frosted, which aligns with the design of visionOS, where everything feels larger and benefits from the frosted look. What are best practices for apps that use customized navigation bars? The new design emphasizes behavior and transitions as much as static appearance. Consider whether you truly need a custom navigation bar, or if the system-provided controls can meet your needs. Explore new APIs for subtitles and custom views in navigation bars, designed to support common use cases. If you still require a custom solution, ensure you're respecting safe areas using APIs like SwiftUI's safeAreaInset. When working with Liquid Glass, group related buttons in shared containers to maintain design consistency. Finally, mark glass containers as interactive. For branding, instead of coloring the navigation bar directly, consider incorporating branding colors into the content area behind the Liquid Glass controls. This creates a dynamic effect where the color is visible through the glass and moves with the content as the user scrolls. I want to know why new UI Framework APIs aren’t backward compatible, specifically in SwiftUI? It leads to code with lots of if-else statements. Existing APIs have been updated to work with the new design where possible, ensuring that apps using those APIs will adopt the new design and function on both older and newer operating systems. However, new APIs often depend on deep integration across the framework and graphics stack, making backward compatibility impractical. When using these new APIs, it's important to consider how they fit within the context of the latest OS. The use of if-else statements allows you to maintain compatibility with older systems while taking full advantage of the new APIs and design features on newer systems. If you are using new APIs, it likely means you are implementing something very specific to the new design language. Using conditional code allows you to intentionally create different code paths for the new design versus older operating systems. Prefer to use if #available where appropriate to intentionally adopt new design elements. Are there any Liquid Glass materials in iOS or macOS that are only available as part of dedicated components? Or are all those materials available through new UIKit and AppKit views? Yes, some variations of the Liquid Glass material are exclusively available through dedicated components like sliders, segmented controls, and tab bars. However, the "regular" and "clear" glass materials should satisfy most application requirements. If you encounter situations where these options are insufficient, please file feedback. If I were to create an app today, how should I design it to make it future proof using Liquid Glass? The best approach to future-proof your app is to utilize standard system controls and design your UI to align with the standard system look and feel. Using the framework-provided declarative API generally leads to easier adoption of future design changes, as you're expressing intent rather than specifying pixel-perfect visuals. Pay close attention to the design sessions offered this year, which cover the design motivation behind the Liquid Glass material and best practices for its use. Is it possible to implement your own sidebar on macOS without NSSplitViewController, but still provide the Liquid Glass appearance? While technically possible to create a custom sidebar that approximates the Liquid Glass appearance without using NSSplitViewController, it is not recommended. The system implementation of the sidebar involves significant unseen complexity, including interlayering with scroll edge effects and fullscreen behaviors. NSSplitViewController provides the necessary level of abstraction for the framework to handle these details correctly. Regarding the SceneDelagate and scene based life-cycle, I would like to confirm that AppDelegate is not going away. Also if the above is a correct understanding, is there any advice as to what should, and should not, be moved to the SceneDelegate? UIApplicationDelegate is not going away and still serves a purpose for application-level interactions with the system and managing scenes at a higher level. Move code related to your app's scene or UI into the UISceneDelegate. Remember that adopting scenes doesn't necessarily mean supporting multiple scenes; an app can be scene-based but still support only one scene. Refer to the tech note Migrating to the UIKit scene-based life cycle and the Make your UIKit app more flexible WWDC25 session for more information.
Topic: UI Frameworks SubTopic: General
0
0
805
Jun ’25
Live Q&A Summary - SwiftUI foundations: Build great apps with SwiftUI
Here’s a recap of the Live Q&A for SwiftUI foundations: Build great apps with SwiftUI. If you participated and asked questions, thank you for coming and participating! If you weren’t able to join us live we hope this recap is useful Where can I watch the VOD? Is the sample code “Wishlist” that was shown available for download? You can view the replay of the entire event here https://www.youtube.com/watch?v=Z3vloOtZLkQ The sample code for the Wishlist app will be made available in the coming weeks on the Apple Developer website, we'll send an update via email when it is available. What are the best practices when it comes to building complex navigations in SwiftUI? The developer website has documentation on navigation style best practices. Explore navigation basics like NavigationStack and TabView to get a ground-up understanding. For documentation on navigation APIs see Navigation. How can I integrate UIKit with my SwiftUI app? What about adding SwiftUI into my UIKit app? See UIKit integration: Add UIKit views to your SwiftUI app, or use SwiftUI views in your UIKit app. Both UIKit and SwiftUI provide API to show a view hierarchy of the other. For UIKit to SwiftUI, you would use UIViewControllerRepresentable. For SwiftUI to UIKit, you would use UIHostingController. Landmarks: Interfacing with UIKit walks you through step by step how to implement UIKit in SwiftUI with UIViewControllerRepresentable, and this WWDC22 video demonstrates UIHostingController, for those that want to add SwiftUI to their UIKit. Does Wishlist feature a new iOS 26 font? How can I add custom fonts and text of my app? We’re glad to hear many of you liked wide text shown in Wishlist, however, It is the default system font with some light SwiftUI styling! Check it out for yourself in the sample code when made available, and you can learn more about customizing fonts and text by seeing Font and Applying custom fonts to text. Does Xcode have a dependency graph we can use to optimize our SwiftUI Views? Xcode comes with Instruments. Instruments is the best way to figure out what is causing excessive updates and other issues with performance. That link provides direct tutorials and resources for how to use and understand. Previews also have many useful tools for analyzing SwiftUI views, for more info see Previews in Xcode Check out this video from our latest WWDC Optimize SwiftUI performance with Instruments for information on how to use Instruments to profile and optimize your app with real-world applications If you still have questions, Check out the Instruments section of these forums and create a post so the community has the opportunity to help guide you. Are there UI debugging tools to help diagnose layout issues? Yes, Xcode also features a View Debugger located by selecting the View Debug Hierarchy, pictured below. Use the View Debugger to capture and inspect your view hierarchy, identifying which views affect window sizing. The SwiftUI Inspector also lets you examine view frames and layout behavior. See Diagnosing issues in the appearance of a running app to learn about debugging visual and layout issues. As an absolute beginner, what would be the first go-to step to go for training? Do I need prior knowledge of frameworks to get started with SwiftUI? A great place to learn how to develop for Apple platforms is with Pathways! Many developers start with Develop in Swift tutorials, which exposes you to several frameworks while teaching you the basics of SwiftUI. When you're ready to take your learning further, you can read the documentation for the specific frameworks that interest you at https://developer.apple.com/documentation/.
Topic: UI Frameworks SubTopic: SwiftUI
2
0
69
3d
UITrackingElementWindowController crash when viewDidDisappear on iPadOS26.1
hello, I have been receiving crash reports on iPadOS 26.1, When UITrackingElementWindowController viewDidDisappear The feedback associated with this post is: FB20986398 and Exception Exception 'Cannot remove an observer <PKTextEffectsWindowObserver 0x10854cbe0> for the key path "frame" from <UITextEffectsWindow 0x10827ca00> because it is not registered as an observer.' #1 0x0000000183529814 in objc_exception_throw () #2 0x00000001845065a4 in -[NSObject(NSKeyValueObserverRegistration) _removeObserver:forProperty:] () #3 0x00000001845069c8 in -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:] () #4 0x00000001845068e0 in -[NSObject(NSKeyValueObserverRegistration) removeObserver:forKeyPath:context:] () #5 0x00000001cb22e894 in -[PKTextEffectsWindowObserver dealloc] () #6 0x000000018beafb28 in _setInteractionView () #7 0x000000018d81e8b8 in -[UIView(Dragging) removeInteraction:] () #8 0x00000001cb216448 in -[PKTextInputInteraction willMoveToView:] () #9 0x000000018beafb1c in _setInteractionView () #10 0x000000018d81e8b8 in -[UIView(Dragging) removeInteraction:] () #11 0x000000018d5ab094 in -[UIEditingOverlayViewController _removeInteractions] () #12 0x000000018cb166a8 in -[UIViewController _setViewAppearState:isAnimating:] () #13 0x000000018cb16d70 in __52-[UIViewController _setViewAppearState:isAnimating:]_block_invoke_2 () #14 0x000000018cb16c10 in __52-[UIViewController _setViewAppearState:isAnimating:]_block_invoke () #15 0x000000018655ef78 in __NSARRAY_IS_CALLING_OUT_TO_A_BLOCK__ () #16 0x00000001866b4a24 in -[__NSArrayI enumerateObjectsWithOptions:usingBlock:] () #17 0x000000018cb16a44 in -[UIViewController _setViewAppearState:isAnimating:] () #18 0x000000018cb1753c in -[UIViewController __viewDidDisappear:] () #19 0x000000018cb17638 in -[UIViewController _endAppearanceTransition:] () #20 0x000000018ca2401c in __48-[UIPresentationController transitionDidFinish:]_block_invoke () #21 0x000000018ca23cd0 in -[UIPresentationController transitionDidFinish:] () #22 0x000000018ca2d720 in -[_UICurrentContextPresentationController transitionDidFinish:] () #23 0x000000018ca27608 in __77-[UIPresentationController runTransitionForCurrentStateAnimated:handoffData:]_block_invoke.106 () #24 0x000000018cb31fec in -[_UIViewControllerTransitionContext completeTransition:] () #25 0x000000018d7f09bc in -[UITransitionView notifyDidCompleteTransition:] () #26 0x000000018d7f0750 in -[UITransitionView _didCompleteTransition:] () #27 0x000000018bf1c2a4 in __UIVIEW_IS_EXECUTING_ANIMATION_COMPLETION_BLOCK__ () #28 0x000000018d817960 in -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:] () #29 0x000000018d7f7168 in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:] () #30 0x000000018d7f75cc in -[UIViewAnimationState animationDidStop:finished:] () #31 0x000000018d7f763c in -[UIViewAnimationState animationDidStop:finished:] () #32 0x0000000186fedda4 in run_animation_callbacks () #33 0x000000010365e2d0 in _dispatch_client_callout () #34 0x000000010367f4c0 in _dispatch_main_queue_drain.cold.5 () #35 0x0000000103654778 in _dispatch_main_queue_drain () #36 0x00000001036546b4 in _dispatch_main_queue_callback_4CF () #37 0x00000001865b42c8 in __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ () #38 0x0000000186567b3c in __CFRunLoopRun () #39 0x0000000186566a6c in _CFRunLoopRunSpecificWithOptions () #40 0x0000000226ee5498 in GSEventRunModal () #41 0x000000018bf2aba4 in -[UIApplication _run] () #42 0x000000018bed3a78 in UIApplicationMain ()
Topic: UI Frameworks SubTopic: UIKit Tags:
2
0
203
37m
PHAssetCreationRequest merges new Burst Photos into "Recently Deleted" instead of Library
Description I am observing a critical issue when saving burst photos using the Photos Framework. If a burst photo with the same burstIdentifier already exists in the "Recently Deleted" album, any new assets saved via PHAssetCreationRequest are automatically merged into that deleted entry instead of appearing in the main Library or "All Photos." Environment Framework: Photos Framework (iOS) API: [[PHPhotoLibrary sharedPhotoLibrary] performChanges:...] Code Snippet The following logic is used to save the burst assets: [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ // 'paths' is a custom object providing the creation request PHAssetCreationRequest *assetCreationRqst = [paths assetCreationRqst]; assetCreationRqst.favorite = [FavorManager.shared isSetDownloadedAssetFavorite:self.curItem]; PHObjectPlaceholder *placeHolder = assetCreationRqst.placeholderForCreatedAsset; localIdentifier = placeHolder.localIdentifier; } completionHandler:^(BOOL success, NSError * _Nullable error) { if (success) { // The handler returns success, but the asset is invisible to the user [weakSelf handleDownloadSuccess:localIdentifier]; } // ... cleanup and completion ... }]; Steps to Reproduce Save a burst photo to the iPhone's built-in Photos app. Manually delete that burst photo so it moves to the "Recently Deleted" album. Execute the code above to save the same burst photo (or a new set containing the same burstIdentifier in its metadata). Check the main Photo Library / "All Photos" view. Observed Result The completionHandler returns success = YES, and a localIdentifier is generated. The photo does not appear in the main Library or "All Photos." The newly saved photo is silently merged into the existing burst set located inside the "Recently Deleted" folder. The user cannot see the new photo unless they manually "Restore" the deleted items from the album. Expected Behavior PHAssetCreationRequest should always result in a visible asset in the user's Library. Even if a matching burstIdentifier exists in "Recently Deleted," the system should treat the new request as a new independent asset or provide an error, rather than hiding it within a deleted collection.
0
0
8
37m
iOS 26: hidesSharedBackground does not work for backBarButtonItem
What works let backButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil) backButton.hidesSharedBackground = true self.navigationItem.rightBarButtonItem = backButton // or self.navigationItem.leftBarButtonItem = backButton What doesn't work let backButton = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil) backButton.hidesSharedBackground = true self.navigationItem.backBarButtonItem = backButton I've tried setting this property on all possible permutations and combinations e.g. Inside navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) and pushViewController(_ viewController: UIViewController, animated: Bool) of a custom UINavigationController to make sure. Expected vs Actual behavior Setting hidesSharedBackground = true should remove the glass background from both regular bar button items and back bar button items but it has no effect on backBarButtonItem. Additional context I’m aware of the UIDesignRequiresCompatibility Info.plist key, but I’m looking for a programmatic solution if there is one. The goal is to remove the glass background from back buttons.
1
1
109
39m
"NavigationLink in List incorrectly highlights when destination value exists in NavigationStack path"
In SwiftUI, when using NavigationStack with a path binding containing multiple instances of the same (or many with navigationPath()) model type (since model type are class type, this issue might occur on instances of class type too), any NavigationLink in a detail view that leads to a value already present anywhere in the navigation stack (which is in the path binding) will appear incorrectly highlighted upon the view's initial appearance. This bug seems manifests specifically when the links are contained within a List. The highlighting is inconsistent - only the earliest appended value in path has link in each section displays as pressed, while links to other value appear normal. Below is a simple code to reproduce the bug. import SwiftUI import SwiftData // Simple model @available(iOS 17, *) @Model class Item { var id = UUID() var name: String var relatedItems: [Item] init(name: String = "", relatedItems: [Item] = []) { self.name = name self.relatedItems = relatedItems } } // MARK: - Bug Reproducer @available(iOS 17, *) struct BugReproducerView: View { @State private var path: [Item] = [] let items: [Item] init() { let item1 = Item(name: "Item 1", relatedItems: []) let item2 = Item(name: "Item 2", relatedItems: [item1]) item1.relatedItems = [item2] self.items = [item1, item2] } var body: some View { NavigationStack(path: $path) { List(items) { item in NavigationLink(item.name, value: item) } .navigationTitle("Items") .navigationDestination(for: Item.self) { item in DetailView(item: item) } } } } // MARK: - Detail View with Bug @available(iOS 17, *) struct DetailView: View { let item: Item var body: some View { List { Section("Info") { Text("Selected: \(item.name)") } if !item.relatedItems.isEmpty { Section("Related") { ForEach(item.relatedItems) { related in NavigationLink(related.name, value: related) } } } } .navigationTitle(item.name) } } #Preview { if #available(iOS 17, *) { BugReproducerView() } else { } }
0
0
10
1h
How to Animate Fade of a View Simultaneously with Frame of Another View
Hi, I have two views in my view hierarchy searchButtonView and searchBarView. I am trying to fade out the searchButtonView while animating the change in the frame of searchBarView simultaneously within a UIView.animate block. However, when I run the app, the frame of searchBarView resizes correctly while the alpha of searchButtonView does not animate to 0 as expected. How can I fix this so that both view animate simultaneously? Please see my code below. Thank you class MovieTitlesViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } var searchButtonView: UIView! var searchBarView: UIView! override func viewDidLayoutSubviews() { createSearchButtonView() createSearchBarView() } func createSearchButtonView() { searchButtonView = UIView(frame: CGRect(x: 23, y: view.safeAreaInsets.top, width: 48, height: 48)) let searchImageView = UIImageView(image: UIImage(named: "Search Icon")!) searchImageView.frame = CGRect(x: searchButtonView.frame.width / 2 - 16, y: searchButtonView.frame.height / 2 - 16, width: 32, height: 32) searchButtonView.addSubview(searchImageView) searchButtonView.backgroundColor = .blue searchButtonView.layer.cornerRadius = 24 searchButtonView.layer.borderColor = UIColor.gray.cgColor searchButtonView.layer.borderWidth = 0.5 let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tappedSearchView)) tapGesture.numberOfTapsRequired = 1 searchButtonView.addGestureRecognizer(tapGesture) searchButtonView.isUserInteractionEnabled = true view.addSubview(searchButtonView) } func createSearchBarView() { searchBarView = UIView(frame: CGRect(x: 23, y: view.safeAreaInsets.top, width: 0, height: 48)) searchBarView.backgroundColor = .red // searchBarView.backgroundColor = UIColor(red: 217/255, green: 217/255, blue: 217/255, alpha: 1.0) searchBarView.layer.cornerRadius = 24 searchBarView.layer.borderColor = UIColor.gray.cgColor searchBarView.layer.borderWidth = 0.5 view.addSubview(searchBarView) } func animateExpandSearchView() { UIView.animate(withDuration: 0.25, delay: 0.0, options: .curveEaseInOut) { self.searchButtonView.alpha = 0.0 self.searchBarView.frame = CGRect(x: 23, y: self.view.safeAreaInsets.top, width: UIScreen.main.bounds.width - 46, height: 48) } } @objc func tappedSearchView() { print("tapped search view") animateExpandSearchView() } }
Topic: UI Frameworks SubTopic: UIKit
1
0
28
2h
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_TtGCs18_DictionaryStorageSSP__$ setFrame:]: unrecognized selector sent to instance 0x17ff59400'
We are facing some weird issue in the UILabel initialisation. Also it is occurring sometimes. class TextLabel: ConfigurableView<TextLabel.Config> { struct Config { var text: String = .empty var font: UIFont? var textColor: UIColor? var maxLines: Int = 0 var attributedText: NSAttributedString? var textAlignment: NSTextAlignment = .natural var truncateWithMore: Bool = false var onTapShowMore: (() -> Void)? var onTap: (() -> Void)? var accessibilityIdentifier: String? } private lazy var label: UILabel = { let label = UILabel() **//##### Crash is occurring in this line.** label.translatesAutoresizingMaskIntoConstraints = false label.adjustsFontForContentSizeCategory = true return label }() private lazy var tapGesture = UITapGestureRecognizer(target: self, action: #selector(onTap)) private var isTruncated = false override func setUp() { addSubview(label) label.equalsContainer() } override func layoutSubviews() { super.layoutSubviews() updateContent() } override func setConfig(_ config: Config) { super.setConfig(config) updateContent() } @objc func onTap() { if isTruncated { config?.onTapShowMore?() } else { config?.onTap?() } } func updateContent() { guard let config = config else { return } label.numberOfLines = config.maxLines label.text = config.text } } You can find my configurable view below. import UIKit class ConfigurableView<T>: UIControl { private(set) var config: T? init(_ config: T) { super.init(frame: .zero) setUp() setConfig(config) } override init(frame: CGRect) { super.init(frame: frame) setUp() } required init(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } func setUp() { } func setConfig(_ config: T) { self.config = config } } This crash is occurring randomly. Sometimes we could reproduce it in the app updates.
Topic: UI Frameworks SubTopic: UIKit
0
1
22
5h
AlarmKit SDK question
For the CountdownDuration initializer, since passing nil to both parameters of public init(preAlert: TimeInterval?, postAlert: TimeInterval?) is not considered valid, shouldn't the function signature be changed to be two separate inits, instead of a runtime error. EX: public init(preAlert: TimeInterval, postAlert: TimeInterval?) public init(preAlert: TimeInterval?, postAlert: TimeInterval)
Topic: UI Frameworks SubTopic: General
0
0
13
14h
Referencing IBOutlet to its class or to file's owner
In this Mac App, I have an IBOutlet (which is defined as instance of a subclass of NSView). When I connect the IBOutlet to the code, referencing as file's owner, it works OK. But if I reference to the class, it crashes, when I access a specific IBOutlet (but other IBOutlets are accessed just before it without crashing).. The IBOutlet turnPageControl is defined as instance of subclass of NSView. Note: I have implemented several init methods: override init(window: NSWindow!) { } required init?(coder: (NSCoder?)) { } // Yes, (NSCoder?) convenience init(parameters) { // loading from nib } override func windowDidLoad() { super.windowDidLoad() // Access turnpageControl I get those calls before crash: init(window:) init(parameters:) init(window:) windowDidLoad() -> crash inside on accessing the IBOutlet for turnPageControl.isHidden = true Is there any reason to this ?
1
0
30
15h
CoreText crash on iOS 26.0 Simulator (Xcode 26.2) when rendering string with zero-width non-joiner and combining marks
Environment: Xcode 26.2 Simulator: 26.0 / iPhone 17 Summary: Assigning a specific Unicode string to a UILabel (or any UITextView / text component backed by CoreText) causes an immediate crash. The string contains a visible base character followed by a zero-width non-joiner and two combining marks. let label = UILabel() label.text = "\u{274D}\u{200C}\u{1CD7}\u{20DB}" // ^ Crash in CoreText during text layout Crash stack trace: The crash occurs inside CoreText's glyph layout/shaping pipeline. The combining marks U+1CD7 and U+20DB appear to stack on the ZWNJ (which has no visible glyph), causing CoreText to fail during run shaping or bounding box calculation. Questions: Is this a known CoreText regression in the iOS 26.0 simulator? Is there a recommended fix or a more targeted workaround beyond stripping zero-width Unicode characters? Will this be addressed in an upcoming update
Topic: UI Frameworks SubTopic: General
3
0
81
17h
TimelineView using ExplicitTimelineSchedule ignores last date?
Hi, everyone. I'm trying my first TimelineView with an explicit schedule, but my attempt – and even the simple example from the documentation – doesn't seem to work as documented. Here's what the documentation says an explicit schedule does: The timeline view updates its content on exactly the dates that you specify, until it runs out of dates, after which it stops changing. And it gives this example: let dates = [ Date(timeIntervalSinceNow: 10), // Update ten seconds from now, Date(timeIntervalSinceNow: 12), // and a few seconds later. ] struct MyView: View { var body: some View { TimelineView(.explicit(dates)) { context in Text(context.date.description) } } } There are stipulations about what the view – which always displays some version of its content body – will do given only past or future dates, but it seems clear we should expect the view in this example to redraw at least once after it appears. Here's the rest of the discussion from the documentation with my comments after testing what's stated: If the dates you provide are in the past, the timeline view updates exactly once with the last entry. That seems true, considering the "update" to be the initial draw. If you only provide dates in the future, the timeline view renders with the current date until the first date arrives. Not exactly: it looks the "date" property of the initial render is the (future) date of the first schedule entry, even though it's drawn early. When the first date does arrive, the body closure doesn't seem to be called. Only on the next date, if there is one, is it called again. If you provide one or more dates in the past and one or more in the future, the view renders the most recent past date, refreshing normally on all subsequent dates. That also seems correct, except… … that in every scenario, the final date entry seems to be ignored completely! In other words, unless all date entries are in the past, the Timeline View stops before it runs out of dates. That documented example from the start, which we expect to redraw at least once after it appears? When I test it in a Playground, it appears, but doesn't redraw at all! So, that's my main point of confusion after experimenting with TimelineView for the first time. I can achieve my own goal by appending an extra entry to my explicit schedule – even appending an entry identical to the previous "final" entry seems to work – but naturally that leaves me unclear about why I need to. If anyone can tell me what I'm not understanding, I'd be grateful.
4
2
820
17h
UIKit Crash on iOS 18 when running tests on AWS Device Farm
1ada58e6-51b3-4cc5-98a3-31c8d1597de5.crash We are experiencing a segmentation fault crash when running our tests on AWS Device Farm. This crash only happens on iOS 18 and does not happen on iOS 26 also running on device farm. We have not been able to replicate this crash locally and we have not seen this in any of our production app usage. It appears there is some memory corruption going on and the trace always seems to crash inside Apple's UIKit code with -[UIImageSymbolConfiguration _initWithTraitCollection:]. I also see the following in the logs from CI: [TraitCollection] Class CKBrowserSwitcherViewController overrides the -traitCollection getter, which is not supported. If you're trying to override traits, you must use the appropriate API. We are not overriding traitCollection getter anywhere in our code and we have no usage of CKBrowserSwitcherViewController either. This crash happens when trying to go through the login flow to our app when KIF hits the login button. I have tried debugging with Zombies and the memory graph debugger but nothing is sticking out as to what would be causing this issue. When running locally with Zombies I do not get any memory warnings going through our login flow. Could this be a bug inside of UIKit on iOS18 which is getting exposed due to timing on AWS? Any help with next debugging steps would be appreciated.
Topic: UI Frameworks SubTopic: UIKit
0
1
25
17h
SwiftUI Link view corrupts destination URLs when using a leading-zero padded IPv4 address.
There appears to be a bug in Link with IPv4 addresses with padding in the second octet, on macOS and iOS both. struct LinkViewBug: View { let works = URL(string: "http://172.16.1.1")! let alsoWorks = URL(string: "http://172.16.001.001")! let doesntWork = URL(string: "http://172.016.001.001")! let alsoDoesntWork = URL(string: "http://172.016.1.1")! var body: some View { // destination -> http://172.16.1.1 Link(works.formatted(), destination: works) Link(alsoWorks.formatted(), destination: alsoWorks) // destination -> http://172.14.1.1 ? Link(doesntWork.formatted(), destination: doesntWork) Link(alsoDoesntWork.formatted(), destination: alsoDoesntWork) } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
0
0
15
1d
TabView with .page style vibrates and reloads content during sheet detent drag
FeedBack Id: FB22031397 (Demo proj Attached to Feedback) Description: When a TabView using .page tabViewStyle is placed inside a sheet configured with multiple presentationDetents, dragging the sheet handle to resize between detents causes the TabView to re-render all its pages on every frame of the drag gesture. This results in visible content vibration, scroll position jumping, and tab content flashing during the drag. The issue is fully reproducible with the attached minimal demo project. Steps to Reproduce: Run the attached TabViewSheetVibrationDemo.swift on any iOS device or simulator Tap "Open Sheet" on the main screen Swipe left to any tab Scroll down inside the tab so content is not at the top Grab the sheet drag indicator at the top and slowly drag upward or downward to resize between medium and large detent Observe the tab content while dragging Expected Results: The TabView page content should remain completely stable during sheet resize. Scroll positions should be preserved and no re-rendering should occur because the underlying data has not changed. The sheet should resize smoothly while tab content stays still. Actual Results: The TabView re-renders all pages on every frame of the drag gesture. This causes: Visible content vibration and jitter while dragging the sheet handle Scroll position jumping back toward the top mid-drag Tab content flashing as pages are recreated The problem is proportional to drag speed — slower drags show a stuttering effect, faster drags cause a full content flash Configuration: All Xcode including beta iOS 26 (also reproduced on iOS 16, iOS 17 and iOS 18) Reproducible on both Simulator and real device Affects iPhone and iPad
0
0
23
1d
In SwiftUI for macOS, is there an equivalent to NSControl.BorderShape?
In macOS 26, there is a new property on NSControl called .borderShape. The WWDC 2025-310 video says it can be used to "Override preferred shape of control to suit your design." and that it's available on NSButton, NSPopUpButton and NSSegmentedControl. Is there an equivalent to that property for SwiftUI? For example, given the following SwiftUI code: Button("Eject") { } .borderShape(...) <-- ? How can I apply a .borderShape that would match those on controls created in AppKit? I'm aware that SwiftUI offers a plethora of ways to custom design a button such that it can have rounded corners, but I'm interested in this particular property so that SwiftUI buttons and AppKit buttons in the same app have the same look-and-feel.
1
0
34
1d
Incorrect menu consistency warnings logged in Tahoe for NSStatusItem, performance issues related?
Is anyone else getting new warning about menu items with submenus when running on Tahoe? I'm getting big performance problems using my menu as well as seeing these messages and I'm wondering if there's a connection. My app is faceless with a NSStatusItem with an NSMenu. Specifically it's my own subclass of NSMenu where I have a lot of code to manage the menu's dynamic behavior. This code is directly in the menu subclass instead of in a controller because the app I forked had it this way, a little wacky but I don't see it being a problem. A nib defines the contents of the menu, and it's instantiated manually with code like: var nibObjects: NSArray? = [] guard let nib = NSNib(nibNamed: "AppMenu", bundle: nil) else { ... } guard nib.instantiate(withOwner: owner, topLevelObjects: &nibObjects) else { ... } guard let menu = nibObjects?.compactMap({ $0 as? Self }).first else { ... } Within that nib.instantiate call I see a warning logged that seems new to Tahoe, before the menu's awakeFromNib is called, that says (edited): Internal inconsistency in menus - menu <NSMenu: 0x6000034e5340> believes it has <My_StatusItem_App.AppMenu: 0x7f9570c1a440> as a supermenu, but the supermenu does not seem to have any item with that submenu My_StatusItem_App.AppMenu: 0x7f9570c1a440 is my menu belonging to the NSStatusItem, NSMenu: 0x6000034e5340 is the submenu of one of its menu items. At a breakpoint in the NSMenu subclass's awakeFromNib I print self and see clear evidence of the warning's incorrectness. Below is a snippet of the console including the full warning, only edited for clarity and brevity. It shows on line 32 menu item with placeholder title "prototype batch item" that indeed has that submenu. Internal inconsistency in menus - menu <NSMenu: 0x6000034e5340> Title: Supermenu: 0x7f9570c1a440 (My StatusItem App), autoenable: YES Previous menu: 0x0 (None) Next menu: 0x0 (None) Items: ( "<NSMenuItem: 0x6000010e4fa0 Do The Thing Again, ke mask='<none>'>", "<NSMenuItem: 0x6000010e5040 Customize\U2026, ke mask='<none>'>", "<NSMenuItem: 0x6000010e50e0, ke mask='<none>'>" ) believes it has <My_StatusItem_App.AppMenu: 0x7f9570c1a440> Title: My StatusItem App 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 (lldb) po self <My_StatusItem_App.AppMenu: 0x7f9570c1a440> Title: My StatusItem App Supermenu: 0x0 (None), autoenable: YES Previous menu: 0x0 (None) Next menu: 0x0 (None) Items: ( "<NSMenuItem: 0x6000010fd7c0 About My StatusItem App\U2026, ke mask='<none>', action: showAbout:, action image: info.circle>", "<NSMenuItem: 0x6000010fd860 Show Onboarding Window\U2026, ke mask='Shift', action: showIntro:>", "<NSMenuItem: 0x6000010fd900 Update Available\U2026, ke mask='<none>', action: installUpdate:, standard image: icloud.and.arrow.down, hidden>", "<NSMenuItem: 0x6000010e46e0, ke mask='<none>'>", "<NSMenuItem: 0x6000010e4780 Start The Thing, ke mask='<none>', action: startTheThing:>", "<NSMenuItem: 0x6000010e4dc0 \U2318-\U232b key detector item, ke mask='<none>', view: <My_StatusItem_App.KeyDetectorView: 0x7f9570c1a010>>", "<NSMenuItem: 0x6000010e4e60, ke mask='<none>'>", "<NSMenuItem: 0x6000010e4f00 saved batches heading item, ke mask='<none>', view: <NSView: 0x7f9570b4be10>, hidden>", "<My_StatusItem_App.BatchMenuItem: 0x6000016e02c0 prototype batch item, ke mask='<none>', action: replaySavedBatch:, submenu: 0x6000034e5340 ()>", "<NSMenuItem: 0x6000010f7d40, ke mask='<none>'>", "<My_StatusItem_App.ClipMenuItem: 0x7f956ef14fd0 prototype copy clip item, ke mask='<none>', action: copyClip:>", "<NSMenuItem: 0x6000010fa620 Settings\U2026, ke='Command-,', action: showSettings:>", "<NSMenuItem: 0x6000010fa6c0, ke mask='<none>'>", "<NSMenuItem: 0x6000010fa760 Quit My StatusItem App, ke='Command-Q', action: quit:>" ) Is this seemingly incorrect inconsistency message harmless? Am I only grasping at straws to think it has some connection to the performance issues with this menu?
14
6
1.6k
1d
Do SwiftUI Segmented Controls on macOS 26 support the icon and title label style?
On macOS 26.3, Xcode 26.3, why does a labelStyle of titleAndIcon not show both the title and the icon of a label? The label styles iconOnly and titleOnly behave as expected. Picker("Label Demo", selection: $selectedItem) { Label { Text("File") } icon: { Image(systemName: "doc") } Label { Text("Folder") } icon: { Image(systemName: "folder") } } .labelStyle(.titleAndIcon) .pickerStyle(.segmented) Note that there is no icon shown. Placing the .labelStyle modifier in different places has no effect. The icon is correctly shown when the labelStyle is set to .iconOnly. An NSSegmentedControl created with AppKit and presented in an NSViewRepresentable does correctly show titles and icons if configured appropriately. Tested on: macOS 26.3 (25D125) Xcode 26.3 (17C519) A brand new SwiftUI "macOS App" project.
2
0
45
1d
iOS 26 UIGlassEffect on custom UIButton
I have three custom UIButton instances inside a custom UIView subclass (not inside a UINavigationBar, UIToolbar, or UITabBar). I want to apply UIGlassEffect with interactive = YES to each button so they get the native liquid glass press animation. The problem is that the UIVisualEffectView containing the effect either: Has userInteractionEnabled = YES — glass animation works but the button's IBAction never fires Has userInteractionEnabled = NO — IBAction fires but no glass animation How can I have both the native interactive glass animation and the button action firing on the same button? Is this possible with the public API, or is the interactive glass animation on custom buttons simply not supported outside of standard UIKit controls?
1
0
26
1d
Button in ToolbarItem is not completely tapable on iOS 26
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
4
1
110
2d
CarPlay: Can third-party audio apps add a Search/Siri button next to the Now Playing button like Apple Music?
Hi, In Apple Music on CarPlay, there is a Search button shown next to the Now Playing (NPS) button in the top navigation bar. Tapping this Search button activates Siri voice search. I want to understand: Does CarPlay allow third-party audio apps to add a similar Search button in the top bar (next to the Now Playing button)? Which can be used to trigger Siri from the screen UI (not steering-wheel button or “Hey Siri”)? Is there any supported approach for screen-based Siri activation other than the guidance here: https://developer.apple.com/documentation/carplay/cplisttemplate#Integrating-Siri-Into-Your-Template-App Basically, is the Apple Music search/Siri button a publicly available CarPlay capability, or is it system-reserved?
0
0
26
2d
Performance degradation and redraw loops when syncing SwiftUI Charts with custom AxisMarks
I am reporting a reproducible performance issue in iOS 18.6 where synchronizing the scroll position of two Chart views via chartScrollPosition(id:) causes a complete redraw loop when custom AxisMarks are used. This occurs even when the axis marks are technically "hidden," leading to significant frame drops and stuttering on modern hardware like the iPhone 15. Environment Device: iPhone 15 OS: iOS 18.6 (22G86) Frameworks: SwiftUI, Swift Charts, Observation The Issue When using a shared @Observable state to sync two charts, the scrolling is fluid only if the axes are at their default settings. As soon as a custom AxisMarks block is added to either chart, the following behavior is observed: Diffing Failure: The framework appears unable to maintain the identity of the axis components during the scroll update. Redraw Loop: Instead of an incremental scroll translation, the diffing algorithm triggers a full reload/re-render of both charts on every scroll offset change. Impact: CPU spikes to 100% and the UI becomes unresponsive. This happens even if the custom AxisMarks is used solely to hide the axis (e.g., AxisMarks { _ in }), suggesting the issue is with the custom declaration itself rather than the complexity of the marks being rendered. Steps to Reproduce Create two Chart views in a VStack. Bind both to a single @Observable property using .chartScrollPosition(id: $state.pos). Add any .chartXAxis { AxisMarks(...) { ... } } modifier. Scroll either chart; observe the stuttering. import SwiftUI import Charts import Observation @Observable class ChartState { var scrollPos: Date = .now } struct PerformanceBugView: View { @State private var state = ChartState() var body: some View { VStack { Chart(data) { ... } .chartScrollPosition(id: $state.scrollPos) .chartXAxis { // This custom mark triggers the performance issue AxisMarks { _ in AxisValueLabel() } } Chart(data) { ... } .chartScrollPosition(id: $state.scrollPos) } } } Questions for the Community/Apple Engineers: Is there a way to provide a stable identifier to AxisMarks to prevent them from being treated as "new" during a scroll update? Why does even an empty AxisMarks block (used for hiding) trigger a layout invalidation that standard axes do not? Are there internal optimizations for chartScrollPosition that are bypassed when the axis layout is customized?
0
0
18
2d