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

Navigation Title no longer showing for first Tab in iOS/iPadOS 26
Navigation Title no longer showing for first Tab in iOS/iPadOS 26 (Directives) in my app Starship SE Corps when running is Xcode 26 simulator and on iPad device itself running iPadOS 26 beta. Launch app Notice Navigation Title “Directives” is missing from top tab in Sidebar and Floating Tab View (iPad) and TabView (iOS). Navigate to other tabs and Navigation Titles appear as expected. Worked fine (as expected) in iOS/iPadOS 18.5, but broken in iOS/iPadOS 26. Reference Feedback: FB17987650
0
0
54
1w
About CarPlay entitlement of EV
I'm developing a CarPlay version of my app, with the CarPlay EV Charging App entitlement (com.apple.developer.carplay-charging). However, I would like to use the Search template to searching for charging stations — but it seems this template is only available for Navigation Apps(maps). In this case, what is the recommended approach? Is it possible to apply both entitlements simultaneously and use the Search template only?
0
0
17
1w
In navigationLink closure, FocusState doesn't work in sheet
Hello, I have a question about FocusState, navigationLink and sheet, the code which in navigationLink closure doesn’t work, but work without navigationLink, just like the following code struct ContentView: View { var body: some View { NavigationStack { // this work interView() // this doesn't work NavigationLink { interView() } label: { Text("into interView") } } } } struct interView: View { @FocusState var focusStateA : Int? @State var show : Bool = false @State var text: String = "" var body: some View { ScrollView { VStack { coreView Button("Detail") { show.toggle() } } .sheet(isPresented: $show, content: { coreView }) } } } extension interView { var coreView : some View { VStack { VStack { putdown TextField("hi", text: $text) .focused($focusStateA , equals: 1) } } } var putdown : some View { Button(action: { if focusStateA != nil { focusStateA = nil print("OK") } else { print("It's nil") } }, label: { Text("Put down the keyboard") }) } } and there are some strange phenomena, I must put all view into a scrollview, otherwise, it even doesn’t work without navigationLink This problem has existed in IOS 18, and now in IOS26 still doesn’t be settled, is it a problem or some character?
Topic: UI Frameworks SubTopic: SwiftUI
0
0
24
1w
iOS 26 beta: UIResponder inputAccessoryView no longer integrates seamlessly with system keyboard
Prior to iOS 26, it was possible to design an inputAccessoryView(Controller) that would integrate seamlessly with the system keyboard, by which I mean appearing as a natural extension of the system keyboard. For example, using CYRKeyboardButton https://github.com/tmcintos/CYRKeyboardButton. To date, I have successfully used this to provide an enhanced numeric key row within my apps, which is a distinguishing feature of these apps. It took a lot of engineering and testing effort to perfect this design. However, with iOS 26 the design is completely broken due to the system keyboard UI change, which makes it impossible to display an inputAccessoryView seamlessly along the top of the system keyboard (see attached screenshots). In my opinion, it is just plain reckless for Apple to make these kinds of trivial UI changes, which break existing app designs without adding any significant value to the user experience. iOS ≤ 18.x: iOS 26 beta:
2
3
80
1w
IOS 26 Beta, Unexpected Liquid Navigation Bar Blured the whole View
I use .scaleEffect(x: 1, y: -1, anchor: .center) to reverse the messages list, so that the latest message always at the bottom. This is correct in ios18, but blurred the whole view in ios26. Complete code: ScrollView { Rectangle() .fill(.clear) .frame(height: 10) // if messages.isEmpty { // MessagesEmpty() // .padding(.horizontal, 10) // .scaleEffect(x: 1, y: -1, anchor: .center) // } MessageInput(chat: chat) .padding(.horizontal, 10) .scaleEffect(x: 1, y: -1, anchor: .center).id("#messag-input-identifier") LazyVStack(spacing: 10) { ForEach(messages) { (message: Message) in MessageItem(message: message, activation: $activeMessageId, audioAdapter: AudioAdapter.shared).id(message.id) } .padding(.horizontal, 10) .scaleEffect(x: 1, y: -1, anchor: .center) } Rectangle() .fill(.clear) .frame(height: 20) } .scaleEffect(x: 1, y: -1, anchor: .center) As shown in the screenshot WechatIMG49.jpg(using ios26beta which is incorrect), WechatIMG50.jpg(using ios18 which is correct) my messages list displays normally on iOS 18, but when using iOS 26 Beta, the entire view is blurred. IOS 26 Beta(Error): IOS 18(Correct):
Topic: UI Frameworks SubTopic: SwiftUI Tags:
0
0
96
1w
Question about `UITextField`'s `markedTextRange` when handling Korean input
I'm currently working on implementing a character limit for Korean text input using UITextField, but I've encountered two key issues. 1. How can I determine if Korean input is complete? I understand that markedTextRange represents provisional (composing) text during multistage text input systems (such as Korean, Japanese, Chinese). While testing with Korean input, I expected markedTextRange to reflect the composing state. However, it seems that markedTextRange remains nil throughout the composition process. 2. Problems limiting character count for Korean input I’ve tried two methods to enforce a character limit. Both lead to incorrect behavior due to how Korean characters are composed. Method 1 – Before replacement: func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { guard let text = textField.text else { return true } return text.count <= 5 } This checks the text length before applying the replacementString. The issue is that when the user enters a character that is meant to combine with the previous one to form a composed character, the input should result in a single, combined character. However, because the character limit check is based on the state before the replacement is applied, the second character does not get composed as expected. Method 2 – After change: textField.addTarget(self, action: #selector(editingChanged), for: .editingChanged) @objc private func editingChanged(_ sender: UITextField) { guard var text = sender.text else { return } if text.count > limitCount { text.removeLast() sender.text = text } } This removes the last character if the count exceeds the limit after the change. But when a user keeps typing past the limit, the last character is overwritten by new input. I suspect this happens because the .editingChanged event occurs before the multistage input is finalized, and the final composed character is applied after that event. My understanding of the input flow: Standard input: shouldChangeCharactersIn is called replacementString is applied .editingChanged is triggered With multistage input (Korean, etc.): shouldChangeCharactersIn is called replacementString is applied .editingChanged is triggered Final composed character is inserted (after all the above) Conclusion Because both approaches lead to incorrect character count behavior with Korean input, I believe I need a new strategy. Is there an officially recommended way to handle multistage input properly with UITextField in this context? Any advice or clarification would be greatly appreciated. MacOS 15.5(24F74) Xcode 16.4 (16F6)
2
0
68
1w
UISplitViewController changes behavior of `viewControllers` property on iOS 26
I am attempting to start my application on iOS 26 with Xcode 26. It uses an UISplitViewController that is instantiated through a Storyboard. It uses the "Unspecified" style, which is a holdover from a previous version of iOS. I'm not sure if this is a bug in iOS, or if I am supposed to change it now. The viewControllers property only has the primary view controller on iOS, although it has the primary and detail view controllers on iPadOS. When I start the application on iOS 18.5, it has both primary and detail controllers on both platforms.
0
0
53
1w
Popover, Menu and Sheet not working with RealityView Attachment SwiftUI
Hi, I have a SwiftUI View, that is attached to a 3D object in Reality View. This is supposed to be a HUD for the user to select a few things. I wanted a sub menu for one of the top level buttons. But looks like none of the reasonable choices like Menu, Sheet or Popover work. Is there a known limitation of RealityKit Views where full SwiftUI cannot be used? Or am I doing something wrong? For example, Button { SLogger.info("Toggled") withAnimation { showHudPositionMenu.toggle() } } label: { HStack { Image(systemName: "rectangle.3.group") Text("My Button") } } .popover(isPresented: $showHudPositionMenu, attachmentAnchor: attachmentAnchor) { HudPositionMenuItems(showHudPositionMenu: $showHudPositionMenu, currentHudPosition: $currentHudPosition) } This will print "Toggled" but will not display the MenuItems Popover. If it makes any difference, this is attached to a child of a head tracked entity.
1
0
36
1w
Pencil "Touches" on Catalyst are interrupted with modifier
I'm working on a catalyst video editor and I'm using my wacom graphic tablet to work. The wacom input gets translated into a pencil touch. Whenever I hold down a modifier (shift, cmd etc) the touch gets ended and also ends all gestures. The mouse (indirectPointer touch) doesn't exhibit this kind of behavior. Is this expected behavior? If so is there a way to opt out? Any way to prevent this? This basically makes the typical transform gestures impossible to do when using the graphic tablet.
2
0
27
1w
iOS 26 beta - Crash using QLPreviewController (QuickLook) in simulator.
Using the iOS 26 beta simulator, I am experiencing a crash using the QLPreviewController. This is easily reproduced using a small sample app and a sample excel file in the bundle. It does work in prior Xcode 16.4 and simulators (18.5). I didn't find any mention of this in Xcode 26 or iOS 26 release notes but I could have missed something. I don't have a spare device to update to iOS 26 and try on a real device so it may just be a simulator issue? Any feedback would be helpful. Thanks. Error: QuickLook/QLHostRemoteViewModel.swift:37: Fatal error: No extensions could be found matching '_AppExtensionQuery(extensionPointIdentifier: "com.apple.quicklook.UIExtensionPoint", predicate: nil, hostAuditToken: nil, extensionPoint: nil, allowsDuplicates: true)' Sample view controller... import UIKit import QuickLook class ViewController: UIViewController, QLPreviewControllerDataSource { var excelFileURL: URL! override func viewDidLoad() { super.viewDidLoad() // Load the Excel file (example: from bundle) if let url = Bundle.main.url(forResource: "file_example_XLSX_100", withExtension: "xlsx") { excelFileURL = url presentPreviewController() } } func presentPreviewController() { let previewController = QLPreviewController() previewController.dataSource = self present(previewController, animated: true, completion: nil) } // MARK: - QLPreviewControllerDataSource func numberOfPreviewItems(in controller: QLPreviewController) -> Int { return 1 } func previewController(_ controller: QLPreviewController, previewItemAt index: Int) -> QLPreviewItem { return excelFileURL as QLPreviewItem } }
2
1
237
1w
How to have different colors in Charts with AreaMark
I would like to have different fill colors in my chart. What I want to achieve is that if the values drop below 0 the fill color should be red. If they are above the fill color should be red. My code looks as follows: import SwiftUI import Charts struct DataPoint: Identifiable {     let id: UUID = UUID()     let x: Int     let y: Int } struct AlternatingChartView: View {          enum Gradients {         static let greenGradient = LinearGradient(gradient: Gradient(colors: [.green, .white]), startPoint: .top, endPoint: .bottom)         static let blueGradient = LinearGradient(gradient: Gradient(colors: [.white, .blue]), startPoint: .top, endPoint: .bottom)     }          let data: [DataPoint] = [         DataPoint(x: 1, y: 10),         DataPoint(x: 2, y: -5),         DataPoint(x: 3, y: 20),         DataPoint(x: 4, y: -8),         DataPoint(x: 5, y: 15),     ]               var body: some View {         Chart {             ForEach(data) { data in                 AreaMark(                     x: .value("Data Point", data.x),                     y: .value("amount", data.y))                 .interpolationMethod(.catmullRom)                 .foregroundStyle(data.y < 0 ? Color.red : Color.green)                                  LineMark(                 x: .value("Data Point", data.x),                 y: .value("amount", data.y))                 .interpolationMethod(.catmullRom)                 .foregroundStyle(Color.black)                 .lineStyle(StrokeStyle.init(lineWidth: 4))                              }         }         .frame(height: 200)     } } #Preview {     AlternatingChartView() } The result looks like this: I also tried using foregroundStyle(by:) and chartForegroundStyleScale(_:) but the result was, that two separate areas had been drawn. One for the below and one for the above zero datapoints. So, what would be the right approach to have two different fill colors?
0
0
32
1w
interactive glassEffect bug?
Applying glass effect, providing a shape isn't resulting in the provided shape rendering the interaction correctly. .glassEffect(.regular.tint(Color(event.calendar.cgColor)).interactive(), in: .rect(cornerRadius: 20)) results in properly drawn view but interactive part of it is off. light and shimmer appear as a capsule within the rect.
0
1
53
1w
Xcode 26, macOS 26, attempting to use alternate dock icons
I have added multiple status icons to my project, in the form of .icon files created with Icon Composer. The main app icon works, but the status icons are not working. I am attempting to load the images from the asset catalog using NSImage imageNamed:, and apply them to the NSApp dockTile using NSGlassEffectContainerView. I don't even know if that attempt is going to work, as I never get past the stage of NSImage loading the icons. Maybe someone on the forums knows what to do there? I'd be willing to use one of my coding support incidents to work through this if necessary, as my two incidents will expire as my subscription rolls over in August anyway. My project lives at https://github.com/losnoco/cog/, and the Tahoe attempt WIP lives in the wip.tahoe branch, with the latest commit as of this post being the attempt to adapt the Dock Icon generation. I'd love to know if I can adapt this easily. I'm also still trying to support existing non-Glass custom .png icons the user can add to their profile folder with buttons in the preferences, as well as supporting legacy status icons on pre-Tahoe installs. I also try to add a progress bar to the dock tile view when the app is processing something at length.
Topic: UI Frameworks SubTopic: AppKit Tags:
0
1
107
1w