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.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

.hidden not working when making UIBarButtonItem visibles on iOS 26
Hi, I have a UIToolbar at the bottom of my screen. The UIToolbar is made of UIBarButtonItems. At some point, I change the status of some buttons to hidden: button.isHidden = true This works: the buttons become invisible. At a later point in the process, I turn the buttons visible again: button.isHidden = false This did work on iOS 18, and does not work with the iOS 26 SDK: the buttons remain hidden, even though the property has been set to false. Am I doing it wrong? Is there anything I can do to fix this?
Topic: UI Frameworks SubTopic: General
3
0
127
1d
How to resolve 'multiple UTIs, one file extension'
My PreviewCode app provides QuickLook previews and Finder icon thumbnails for source code files written in many popular programming languages. The only one it doesn't work will with is TypeScript, which typically uses the ts file extension. This is because Apple's CoreTypes bundle maps the ts file extension to its own MPEG-4 Transport Stream UTI. Right now I have two UTIs mapped to the ts extension: the above one and another, com.microsoft.typescript. The question is, how can I tell macOS' Launch Services to favour the latter over the former so that PreviewCode's previewer app extension is called whenever then user QuickLooks a TypeScript file and not (as currently happens) macOS' MPEG-4 previewer? I'd like to code this into PreviewCode or at the very least provide the technique in the response to the many tech support requests I get about this ts mix-up specifically.
2
0
131
1d
Using HealthKit to display data on CarPlay UI
I'd like to investigate creating a safety feature for Type 1 Diabetics driving a car. Allowing HealthKit glucose data (read from a Dexcom G7 or similar) to be displayed as part of the CarPlay UI background or show an icon/button with the number visible. I'd also like to include a warning system for glucose low's that alerts the driver audibly. Has anyone looked into that before?
2
0
227
2d
Core Text omits all remaining content and breaks rendering when truncation is enabled and after encountering a line containing only spaces
When drawing multiline text using Core Text (by preparing a paragraph and issuing a call to CTDrawFrame): if truncation is enabled via a paragraph setting (spec=kCTParagraphStyleSpecifierLineBreakMode and value=kCTLineBreakByTruncatingMiddle), and if one of the lines to render contains a line with spaces only (codepoint=U+0020), and if the available width for rendering is less than the natural width of the line containing only spaces, then the rendering is incomplete, all content in the lines following the spaces is omitted. Many other codepoints cause the same problem: tabs (U+0009), no-break spaces (U+00A0), control characters ... The issue is quite severe because the rendering can break with a simple ASCII input ! Here is a recording with a yellow text background to help see the spaces : To reproduce : CGContextRef ctx = [[NSGraphicsContext currentContext] CGContext]; // String to display: 3 lines, the middle one contains only spaces (40) CFStringRef str = CFSTR("Hello World!\n \nThis is a multiline example with a long line."); // Font used for rendering CTFontRef font = CTFontCreateWithName(CFSTR("Helvetica"), 20, nullptr); // Paragraph style with middle truncation CTLineBreakMode lineBreak = kCTLineBreakByTruncatingMiddle; CTParagraphStyleSetting settings[] = { { kCTParagraphStyleSpecifierLineBreakMode, sizeof(CTLineBreakMode), &lineBreak } }; CTParagraphStyleRef paragraphStyle = CTParagraphStyleCreate(settings, 1); // Prepare text attributes NSDictionary *attrs = @{ (__bridge id)kCTFontAttributeName : (__bridge id)font, (__bridge id)kCTForegroundColorAttributeName : (__bridge id)[NSColor blackColor].CGColor, (__bridge id)kCTBackgroundColorAttributeName : (__bridge id)[NSColor yellowColor].CGColor, (__bridge id)kCTParagraphStyleAttributeName : (__bridge id)paragraphStyle, }; NSAttributedString *attrStr = [[NSAttributedString alloc] initWithString:(__bridge NSString*)str attributes:attrs]; // Create framesetter CTFramesetterRef fs = CTFramesetterCreateWithAttributedString((CFAttributedStringRef)attrStr); CGMutablePathRef path = CGPathCreateMutable(); CGPathAddRect(path, nullptr, self.bounds); CTFrameRef frame = CTFramesetterCreateFrame(fs, CFRangeMake(0, 0), path, nullptr); // Draw the paragraph CTFrameDraw(frame, ctx); This seems like a bug in Core Text, unless I was missing some additional parameter to specify before calling CTFrameDraw()?
2
0
88
2d
[iOS 26] Can no longer detect whether iPhone has notch
I'm currently using the extension below to determine whether an iPhone has a notch so I can adjust my UI accordingly. extension UIDevice { var hasNotch: Bool { if userInterfaceIdiom == .phone, let window = (UIApplication.shared.connectedScenes .compactMap { $0 as? UIWindowScene } .flatMap { $0.windows } .first { $0.isKeyWindow }) { return window.safeAreaInsets.bottom > 0 } return false } } (Adapted from https://stackoverflow.com/questions/73946911/how-to-detect-users-device-has-dynamic-island-in-uikit) This no longer works in iOS 26, and I have yet to find a similar method that works. Does anyone have any fixes?
4
0
105
2d
iOS 26 Liquid Glass not showing
I’m not seeing Liquid Glass on any standard components. A month ago around July 17th I ran our app and saw Liquid Glass on our tab view and various standard components. Those components have not been changed and yet I’m no longer seeing Liquid Glass in our app at all. Components that were previously liquid glass but now are not include TabView and back navigation buttons. I set the UIDesignRequiresCompatibility key explicitly to false but no luck. I was seeing this in Beta 7 and Beta 8 on a real device and on a sim.
2
1
200
3d
App Clips don't work
We're building a UGC AR app and are leveraging App Clips to distribute AR experiences without app download. Since earlier this week, many of our users are reporting sharing experiences as App Clip doesn't work anymore. They are getting the message "AppClip unavailable" on a little card. We attached a QR code to try it yourself and a link to a different experience. We tried with multiple experiences and on multiple devices already. https://scenery.app/experience/1C925FDE-E49A-489B-BA14-58A4E532E645 Interestingly, we can't pinpoint the issue to an exact device or OS. We tested on many devices and on most, the AppClip is being displayed as unavailable, stating "App Clip unavailable", whereas it works on a few. It all worked fine last week (before September 12th). iPhone 13 Pro Max, iOS26: works iPhone SE, iOS 17: works iPhone 16 Pro, iOS 26: doesn't work iPhone 12 Pro Max, iOS 26: doesn't work iPhone 12 mini, iOS 18: does not work iPad 9th gen, iOS 26: doesn't work Please help. Our users are very dissatisfied as they expect this to work and it's a crucial feature. We already filed a radar via Feedback assistant: FB20303890
6
2
141
4d
Navigation Bar Large title issue in iOS 26
There’s an issue with the navigation bar’s large title. When the first screen uses a large title and the next screen uses a standard (small) title, the small title is delayed — it only appears after the transition animation finishes. However, if I scroll down on the first screen (so the large title collapses) before navigating to the second screen, the issue does not occur. Please see the attached video for reference.
Topic: UI Frameworks SubTopic: General
0
0
20
4d
App Clip Card’s “Open” Button takes 2–3 seconds to become active on first load
We are currently implementing App Clips in our app. While we have carefully optimized the App Clip size to keep it lightweight (~3.69MB), we have noticed that on the first load, displaying the App Clip Card and activating the “Open” button takes a surprisingly long time (approximately 2–3 seconds). Subsequent loads appear to perform normally. We understand that this behavior may not be directly controllable from the app development side, but we would like to know if there are any possible ways to improve it. Minimizing the time it takes for users to access the content is extremely important, as delays on the first interaction can negatively impact the user experience. Any guidance or best practices to make the App Clip Card and its “Open” button respond faster on first load would be greatly appreciated.
0
1
42
5d
Separate iPhone and iPad apps from each other Xcode
Without knowing is how two apps shares the resources. The problem is both are designed to be landscape with all screen orientations the same. The validated ipad process fails that it must have both the same screen orientations as the iPhone. The iPad app review fails in Apple Connect, with screen shots portrait clipped. Yet the iPhone was accepted with the same orientations. They both start in portrait which is ok, just turn them to landscape and they look fine. I have seen many apps that go back and forth and you know which orientation you want. Just turn 90 degrees. Is there a resolution to this situation? Charlie Coupe
Topic: UI Frameworks SubTopic: General
0
0
21
6d
PDFKit – How can I draw annotations behind text in PDFView?
Hi, I’m currently working with PDFKit and using PDFView to display documents. I’m adding free-drawing content as annotations, but I’ve noticed that these annotations are always rendered on top of the text, which ends up covering the text and making it hard to read. What I would like to do is render these drawing annotations behind the text layer, so that the document text remains visible above the drawing. Has anyone found a way to achieve this, or is there a recommended approach for controlling the annotation rendering order in PDFKit? Thanks in advance!
1
0
38
1w
Crashes launching app from Camera control button
I'm using the LockedCameraCaptureExtension to launch my Camera app from the camera button. Some of our users report our app crashing a few seconds after being launch from the camera button. The call stack is something inside BoardServices [BSServicesConfiguration activateXPCService] I'm not sure how to investigate or fix this, anyone else having the same issue? Basically in my LockedCameraCaptureExtension when it loads I just call openApplication on the LockedCameraCaptureSession to launch into my app. @main struct captureExtension: LockedCameraCaptureExtension { var body: some LockedCameraCaptureExtensionScene { LockedCameraCaptureUIScene { session in Button(action: { Task { await openCamera(session: session) } }, label: { Text("Open Camera") }) .buttonStyle(PlainButtonStyle()) .task { await openCamera(session: session) } } } private func openCamera(session: LockedCameraCaptureSession) async { try? await session.openApplication(for: NSUserActivity(activityType: "com.mycompany.camera")) } }
0
0
27
1w
Automatic menu translation ok with El Capitan, notok with Mojave
Hi everybody, I use a very old photo software called Snapseed v 1.2.1 on 2 MacBook, one runs with El Capitan and the second runs with Mojave. These app has no language selection during install, and no preferences language choice in menu when running. When I execute app on El Capitan, all menus and topics are translate in French, but on Mojave no translation is done. I looked Contents of app and found differents languages files (structured as xx.po where xx=country) located in Resources folder. I deduced translation was executed after getting language param. I checked values on both systems and there are same (LANG=fr_FR.UTF-8). So I tried to change Info.plist file to force code langage to 'fr' in CFBundleLocalizations key. Result is same. Does somebody has a idea of reason of issue and how to solve it ? Snapseed release was 2012, El Capitan 2015 and Mojave 2018, it seems framework used to code app runs differently and can't get language value.
2
0
54
1w
Using private API
A question for Apple engineers. Why is it that using a private API (for example, finding the corner radius of a device's screen) can result in the app being rejected for review or even an account being blocked, while using a private compiler API (for example, @_spi) has no consequences?
Topic: UI Frameworks SubTopic: General
2
0
81
1w
vision pro notifications too small for shareplay
A is there a way to get big huge notitifications for Shareplay invitations ? B can i have the notifications inside the app ? we have a corporate app to check archtecture projects we want to share these 3d spaces walking inside with near users in the same place to discuss about the project .. but it takes too long shareplay invitation is a small circle on top, if the others users just put the vision without configuring eyes and hands... it's gonna be impossible thanks for sharing and giving us support
4
0
131
1w
Guidance on Blocking Screenshots/Screen Recordings in macOS App (Unity 6000.0.51f1)
Dear Team, We have developed a macOS app using Unity (6000.0.51f1) that includes learning activities, assessments/tests, audio recording, and video playback functionalities. For security and content protection, we want to restrict the ability for users to capture screenshots or screen recordings of the app (especially via the built-in Cmd+Shift+5 / Screenshot toolbar). We have attempted several approaches, but they have not been reliable. We would appreciate guidance from Apple or the developer community on the feasibility of this requirement. Our requirements: Block or disable screenshots/screen recordings (particularly the built-in Cmd+Shift+5) for the app. Preferably achieve this using public APIs so that the app remains App Store compatible and passes review. If full blocking is not possible, then at least ensure that any captured content appears blank/black for sensitive sections of the app. Additionally, we would like our app’s window behavior to work like other apps do: Red button → Close the application completely. Yellow button → Minimize the application to the Dock. Green button → Maximize to full screen while still allowing access to the Dock and menu bar. Any advice, best practices, or references to relevant documentation would be highly valuable. Thank you for your support.
1
0
62
1w
Programmatically overriding Liquid Glass dock icon?
Hello, I recently updated my app’s icon to use the new Liquid Glass style by adding an .icon file created with Icon Composer to my project. Previously, I had two image sets (light and dark versions of the app icon), and I’d implemented a settings option that let users either manually select their preferred icon, or let the app automatically switch between light/dark based on the system appearance. Is there a way to achieve the same behavior with the new Liquid Glass .icon file?Specifically, can I programmatically override the system-selected Liquid Glass dock icon and force a particular variant? Thank you.
0
0
57
1w
Black Launch Screen with UIImageView - SwiftUI Xcode 26
I am trying to create a Launch Screen for a new SwiftUI app built with Xcode 26. However, upon adding a UIImageView, the launch screen appears black and does not show anything. I have followed the typical steps to create a screen: New file from template -> Launch Screen Add image to xcassets, reference in UIImageView Set to initial view controller, add file name in general tab to Launch Screen File I have troubleshooted with the following sources: https://stackoverflow.com/questions/63978396/launch-screen-not-working-on-ios-14-with-xcode-12 https://developer.apple.com/forums/thread/665358 I have created a minimally reproducible example here: https://github.com/nickdebaise/launch-screen-bug
Topic: UI Frameworks SubTopic: General
0
0
91
1w