Post

Replies

Boosts

Views

Activity

Map view in UIKit does not have a soft edge effect with navigation bar on iOS 26
I have a map view that is presented as a modal in a navigation bar with a title view. The navigation bar is completely transparent in iOS 26 and the bar button items are displayed with a glassy effect. Since there is no soft edge effect, like we have on scroll views, it can be hard to read the text in the title view. Is there a way to get the soft edge effect on a map view that has a navigation bar? Not sure if I'm missing something obvious.
1
0
103
Jul ’25
Locale.Script seems to be returning a value even though the language has no script
We just dropped support for iOS 16 in our app and migrated to the new properties on Locale to extract the language code, region, and script. However, after doing this we are seeing an issue where the script property is returning a value when the language has no script. Here is the initializer that we are using to populate the values. The identifier is coming from the preferredLanguages property that is found on Locale. init?(identifier: String) { let locale = Locale(identifier: identifier) guard let languageCode = locale.language.languageCode?.identifier else { return nil } language = languageCode region = locale.region?.identifier script = locale.language.script?.identifier } Whenever I inspect locale.language I see all of the correct values. However, when I inspect locale.language.script directly it is always returning Latn as the value. If I inspect the deprecated locale.scriptCode property it will return nil as expected. Here is an example from the debugger for en-AU. I also see the same for other languages such as en-AE, pt-BR. Since the language components show the script as nil, then I would expect locale.language.script?.identifier to also return nil.
1
0
86
Jun ’25
Text is cut off when selected on macOS
When I select text in a text field or regular text view in SwiftUI the text shifts and is cut off and I can only see half of the value on screen. Example of a text field using .textFieldStyle(.plain). Example of text view using .textSelection(.enabled). The text color also changes from white to black when in dark mode. I'm not sure what I'm doing wrong here for these views.
0
0
575
Jan ’23
NSDiffableDataSourceSectionSnapshot with more than 80 sections causes UI hangs
I am trying to create this UI using a diffable data source. I have everything working, however, we experience a severe UI hang, between 2200-3000ms, if there are more than 80 sections. It doesn't matter how many items are in the sections, just that there are over 80. Here is the setup for the snapshots. var snapshot = Snapshot() snapshot.appendSections(sections.map(\.branch)) apply(snapshot, animatingDifferences: animatingDifferences) sections.forEach { section in var sectionSnapshot = SectionSnapshot() if let currentBuild = section.builds.first.map({ SectionItem.currentBuild($0) }) { sectionSnapshot.append([currentBuild]) } if section.builds.count > 1 { let additionalBuildsHeader = SectionItem.additionalBuildsHeader(forSection: section.branch) sectionSnapshot.append([additionalBuildsHeader]) let additionalBuilds = section.builds .dropFirst() .map({ SectionItem.additionalBuild($0) }) sectionSnapshot.append(additionalBuilds, to: additionalBuildsHeader) if expandedSections.contains(additionalBuildsHeader) { sectionSnapshot.expand([additionalBuildsHeader]) } } apply(sectionSnapshot, to: section.branch, animatingDifferences: animatingDifferences) } I tried to do this with a single data source snapshot, instead of using the section snapshots and then the UI does not experience any hangs. While this works, we don't get the nice collapsible sections and all builds are displayed at the same level. Here is the code for that setup. var snapShot = Snapshot() snapShot.appendSections(sections.map(\.branch)) sections.forEach { section in     if let currentBuild = section.builds.first.map({ SectionItem.currentBuild($0) }) {         snapShot.appendItems([currentBuild], toSection: section.branch)     } if section.builds.count > 1 {         let additionalBuilds = section.builds                 .dropFirst()                 .map({ SectionItem.additionalBuild($0) })         snapShot.appendItems(additionalBuilds, toSection: section.branch)     } } apply(snapShot, animatingDifferences: animatingDifferences) Am I doing something wrong here with this setup in using the section snapshots? It seems like the hangs might be due to a layout pass being triggered on each apply, but I don't know any other way to build the section snapshots.
2
0
727
Jan ’23