Search results for

“column”

2,137 results found

Post

Replies

Boosts

Views

Activity

Reply to NSTableView: checking for mouse-driven selection changes on macOS 27
I don't think you're supposed to read clickedRow in -tableView:selectionIndexesForProposedSelection:. Unless something has changed in macOS 27 the documentation for clickedRow states: The value of this property is meaningful in the target object’s implementation of the action and double-action methods. NSTableView is a subclass of NSControl. You should be able to pick up a click change by setting the table view's target-action instead of trying to do it in the delegate methods. Doing it in the delegate method like that might work but IMO this is cleaner and probably safer: -(void)windowDidLoad { [super windowDidLoad]; self.tableView.target = self; self.tableView.action = @selector(tableViewAction:); } -(void)tableViewAction:(NSTableView*)sender { NSLog(@Clicked Column: %li Clicked row: %li, sender.clickedColumn, sender.clickedRow); } That will trigger on click. NSTableView does not invoke the action on keyboard navigation (at least not on macOS 26). I'm a bit worried that these AppKit changes might b
Topic: UI Frameworks SubTopic: AppKit Tags:
Jun ’26
How to display UISplitViewController columns next to each other again.
Since iOS26 the UISplitViewController is displayed in a way where the primary column (red) overlaps the secondary column (blue) instead of displaying them next to each other like before. Several Apple apps still display the columns next to each other, like Notes, Mail and Photos. What is the correct way to display the columns next to each other again using UIKit and if possible Storyboards.
Topic: UI Frameworks SubTopic: UIKit
5
0
356
Jun ’26
NavigationSplitView no longer pops back to the root view when selection = nil in iOS 26.4 (with a nested TabView)
In iOS 26.4 (iPhone, not iPad), when a NavigationSplitView is combined with a nested TabView, it no longer pops back to the root sidebar view when the List selection is set to nil. This has been working fine for at least a few years, but has just stopped working in iOS 26.4. Here's a minimal working example: import SwiftUI struct ContentView: View { @State var articles: [Article] = [Article(articleTitle: Dog), Article(articleTitle: Cat), Article(articleTitle: Mouse)] @State private var selectedArticle: Article? = nil var body: some View { NavigationSplitView { TabView { Tab { List(articles, selection: $selectedArticle) { article in Button { selectedArticle = article } label: { Text(article.title) } } } label: { Label(Explore, systemImage: binoculars) } } } detail: { Group { if let selectedArticle { Text(selectedArticle.title) } else { Text(No selected article) } } .navigationBarBackButtonHidden(true) .toolbar { ToolbarItem(placement: .topBarTrailing) { Button(Close, systemImage: xmark) { selectedArticle = nil
2
0
357
Jun ’26
Reply to Xcode 27: Bugs / Feedbacks
@DTS Engineer, I have filed some more bugs, please have a look, thanks! Xcode - Markdown Feedbacks: FB23145660 (Xcode crash - table deletion) FB23144227 (Table column copy) FB23144606 (Code formatting in same line) FB23144989 (Table column word wrap) FB23145786 (table column leading and trailing space) FB23145488 (Insert table) FB23145909 (Table cell right click) FB23146021 (Table width)
Jun ’26
Better alternative to WWDC's `withContinuousObservation` in View initializers for SwiftData?
Hi everyone, I was watching the Code-along: Add persistence with SwiftData session and noticed a strange architectural choice at the end. They track model side-effects directly inside a SwiftUI View's initializer like this: init(activity: Activity, isLast: Bool, isEditing: Bool) { activity.token = withContinuousObservation(options: .didSet) { event in // ... side effects here } } This feels like a significant architectural smell. SwiftUI views are transient structures with no guaranteed lifetime—they can be initialized dozens of times a second during standard layout passes. Furthermore, if multiple views display or interact with the same Activity, this tracking work gets duplicated redundantly. I understand this is a workaround because attaching a standard didSet directly to a stored property inside a @Model class doesn't trigger cleanly due to how the macro expands back-end storage. To keep this data-logic in the model layer where it belongs, I came up with an alternative that maps a custom computed property
1
0
661
Jun ’26
Reply to Better alternative to WWDC's `withContinuousObservation` in View initializers for SwiftData?
WWDC sample code and code-alongs aren't meant to be architectural endorsements, just quick and easy ways to introduce new stuff in the shortest, most isolated way possible so you can see how the syntax works in a brief video. Your proposed workaround has a couple of key flaws and risks: It will silently fail during CloudKit Sync and database loads. When SwiftData pulls an item from the SQLite database into memory or when CK downloads a remote sync change, it will bypass computed properties entirely, and instead directly populate the underlying stored backing field (_title) using the internal BackingData engine. So if a user modifies an item's title on their iPad, CK will sync that change down to their iPhone. The iPhone will directly apply the update to _title and as a result, because the custom setter for title is completely bypassed updatedAt will never be updated. So now you're dealing with permanent data drift and desync across user devices. It also breaks the context transaction and undo engine. The tran
Jun ’26
Reply to Inspector built-in navigation bar missed in iOS26
NavigationSplitView() { // Sidebar column SidebarView() .environmentObject(navState) .navigationTitle(LocalizedStringKey(Everycards)) .navigationBarTitleDisplayMode(.large) .toolbar { ToolbarItemGroup(placement: .navigationBarLeading) { AccountMenuView( openSettings: openSettings, sendEmail: { self.sendEmail(subject: $0) }, showProView: $showProView, showStatisticsView: $showStatisticsView ) if syncMonitor.isSyncing { ProgressView() .progressViewStyle(.circular) .tint(.secondary) } } ToolbarItemGroup(placement: .navigationBarTrailing) { OnboardingMenuView( showWelcome: { showWelcomeView = true }, showFlashTheoryView: $showFlashTheoryView, showQuizTheoryView: $showQuizTheoryView, showOnBdGestureStack: $showOnBdGestureStack, showOnBdWhereToStartView: $showOnBdWhereToStartView, showOnBdImportView: $showOnBdImportView, showOnBdHomeCollectionView: $showOnBdHomeCollectionView, showOnBdStylingView: $showOnBdStylingView, showOnBdLockingView: $showOnBdLockingView, showOnBdSlidesView: $showOnBdSlidesView, show
Topic: SwiftUI SubTopic:
SwiftUI Q&A
Jun ’26
Reply to UISplitViewController primary column differences in 27 vs 26
In iPadOS 27, sidebars are edge-to-edge. The sidebar adds a safe area inset to the adjacent column in the split view controller. To prevent content from being occluded by a sidebar, ensure that it is positioned within the safe area. For more information, check out Make your UIKit app more flexible from WWDC25.
Topic: UIKit SubTopic:
UIKit Q&A
Jun ’26
How to get an NSSegmentedControl in toolbar look like in the Finder?
Hey Team, In the Finder, the segmented control in the toolbar where the user can choose to display the files as icons, list, columns, or gallery, indicates its selection using a gray background. Is that done via custom drawing or is it a semantic option in AppKit? When I adopt Liquid Glass in my app by removing UIDesignRequiresCompatibility, my segmented control indicates the selections with a strong accent color. This could be distracting to my users and I'd like to duplicate the Finder behavior. Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
2
0
222
Jun ’26
Reply to How to display UISplitViewController columns next to each other again.
While the columns overlap where blue flows under red, it's important to note that the safeArea of the blue view is just the area not obscured by the red column. By positioning the content of the blue view within the safe area, the content will be next to the red column while the background can flow under it for visual effect. In a storyboard, this can be done by anchoring to constraints the safe area of the view instead of the bounds of the view. Or in code using the safe area layout guide.
Topic: UIKit SubTopic:
UIKit Q&A
Jun ’26
CoreData lightweight migration fails on iOS 26 only — "no such column: Z_110GROUPITEMS1"
We've spent several days diagnosing a CoreData migration crash that is iOS 26-specific and reproducible 100% of the time. Posting here in case others have hit this and because we believe it's an Apple bug worth documenting. Upgrading from our App Store build (CoreData model v10) to our latest TestFlight build (model v11) crashes on iOS 26 with: NSCocoaErrorDomain / Code 134110 no such column: Z_110GROUPITEMS1 The same upgrade path on iOS 17 and iOS 18 works perfectly. What v10→v11 changes Two new entities added alphabetically early in the alphabet One new optional boolean attribute on an existing entity One new optional to-many relationship on the same existing entity All changes are lightweight-migration compatible. We use shouldMigrateStoreAutomatically = true and shouldInferMappingModelAutomatically = true Here's what we observed Adding two entities alphabetically shifts Z_ENT numbers for all subsequent entities. A central entity (EntityA) moves from Z_ENT 110 (v10) to Z_ENT 112 (v11). It has many
2
0
596
Jun ’26
Reply to Reorderable with Xcode previews
Hi, thanks for getting back Here is a code snippet where this issue will occur: import SwiftUI struct TestItem: Identifiable { let id = UUID() let color: Color } struct POSView: View { @State private var items = [ TestItem(color: .orange), TestItem(color: .purple), TestItem(color: .teal), TestItem(color: .blue), TestItem(color: .pink), TestItem(color: .green) ] let columns = [GridItem(.adaptive(minimum: 100))] var body: some View { ScrollView { LazyVGrid(columns: columns, spacing: 16) { ForEach(items) { item in RoundedRectangle(cornerRadius: 15) .fill(item.color.gradient) .frame(width: 100, height: 100) } .reorderable() } .reorderContainer(for: TestItem.self) { difference in items.apply(difference: difference) } .padding() } } } extension Array { mutating func apply( difference: ReorderDifference ) where Element: Identifiable, Element.ID: Sendable { guard let sourceIndex = firstIndex(where: { $0.id == difference.sources[0] }) else { return } let movedCard = remove(at: sourceIndex) v
Jun ’26
Reply to NSTableView: checking for mouse-driven selection changes on macOS 27
I don't think you're supposed to read clickedRow in -tableView:selectionIndexesForProposedSelection:. Unless something has changed in macOS 27 the documentation for clickedRow states: The value of this property is meaningful in the target object’s implementation of the action and double-action methods. NSTableView is a subclass of NSControl. You should be able to pick up a click change by setting the table view's target-action instead of trying to do it in the delegate methods. Doing it in the delegate method like that might work but IMO this is cleaner and probably safer: -(void)windowDidLoad { [super windowDidLoad]; self.tableView.target = self; self.tableView.action = @selector(tableViewAction:); } -(void)tableViewAction:(NSTableView*)sender { NSLog(@Clicked Column: %li Clicked row: %li, sender.clickedColumn, sender.clickedRow); } That will trigger on click. NSTableView does not invoke the action on keyboard navigation (at least not on macOS 26). I'm a bit worried that these AppKit changes might b
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jun ’26
Reply to Push new views to sidebar when using NavigationPath
Speaking from memory: I believe there is a navigationSplitView initializer that lets you specify each of the three columns manually. Maybe try dropping NavigationStacks in each of those spots to have more navigation control over them? It’s still an odd navigation experience, though. You may need to make your own!
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jun ’26
How to display UISplitViewController columns next to each other again.
Since iOS26 the UISplitViewController is displayed in a way where the primary column (red) overlaps the secondary column (blue) instead of displaying them next to each other like before. Several Apple apps still display the columns next to each other, like Notes, Mail and Photos. What is the correct way to display the columns next to each other again using UIKit and if possible Storyboards.
Topic: UI Frameworks SubTopic: UIKit
Replies
5
Boosts
0
Views
356
Activity
Jun ’26
NavigationSplitView no longer pops back to the root view when selection = nil in iOS 26.4 (with a nested TabView)
In iOS 26.4 (iPhone, not iPad), when a NavigationSplitView is combined with a nested TabView, it no longer pops back to the root sidebar view when the List selection is set to nil. This has been working fine for at least a few years, but has just stopped working in iOS 26.4. Here's a minimal working example: import SwiftUI struct ContentView: View { @State var articles: [Article] = [Article(articleTitle: Dog), Article(articleTitle: Cat), Article(articleTitle: Mouse)] @State private var selectedArticle: Article? = nil var body: some View { NavigationSplitView { TabView { Tab { List(articles, selection: $selectedArticle) { article in Button { selectedArticle = article } label: { Text(article.title) } } } label: { Label(Explore, systemImage: binoculars) } } } detail: { Group { if let selectedArticle { Text(selectedArticle.title) } else { Text(No selected article) } } .navigationBarBackButtonHidden(true) .toolbar { ToolbarItem(placement: .topBarTrailing) { Button(Close, systemImage: xmark) { selectedArticle = nil
Replies
2
Boosts
0
Views
357
Activity
Jun ’26
Reply to Xcode 27: Bugs / Feedbacks
@DTS Engineer, I have filed some more bugs, please have a look, thanks! Xcode - Markdown Feedbacks: FB23145660 (Xcode crash - table deletion) FB23144227 (Table column copy) FB23144606 (Code formatting in same line) FB23144989 (Table column word wrap) FB23145786 (table column leading and trailing space) FB23145488 (Insert table) FB23145909 (Table cell right click) FB23146021 (Table width)
Replies
Boosts
Views
Activity
Jun ’26
Better alternative to WWDC's `withContinuousObservation` in View initializers for SwiftData?
Hi everyone, I was watching the Code-along: Add persistence with SwiftData session and noticed a strange architectural choice at the end. They track model side-effects directly inside a SwiftUI View's initializer like this: init(activity: Activity, isLast: Bool, isEditing: Bool) { activity.token = withContinuousObservation(options: .didSet) { event in // ... side effects here } } This feels like a significant architectural smell. SwiftUI views are transient structures with no guaranteed lifetime—they can be initialized dozens of times a second during standard layout passes. Furthermore, if multiple views display or interact with the same Activity, this tracking work gets duplicated redundantly. I understand this is a workaround because attaching a standard didSet directly to a stored property inside a @Model class doesn't trigger cleanly due to how the macro expands back-end storage. To keep this data-logic in the model layer where it belongs, I came up with an alternative that maps a custom computed property
Replies
1
Boosts
0
Views
661
Activity
Jun ’26
Reply to Better alternative to WWDC's `withContinuousObservation` in View initializers for SwiftData?
WWDC sample code and code-alongs aren't meant to be architectural endorsements, just quick and easy ways to introduce new stuff in the shortest, most isolated way possible so you can see how the syntax works in a brief video. Your proposed workaround has a couple of key flaws and risks: It will silently fail during CloudKit Sync and database loads. When SwiftData pulls an item from the SQLite database into memory or when CK downloads a remote sync change, it will bypass computed properties entirely, and instead directly populate the underlying stored backing field (_title) using the internal BackingData engine. So if a user modifies an item's title on their iPad, CK will sync that change down to their iPhone. The iPhone will directly apply the update to _title and as a result, because the custom setter for title is completely bypassed updatedAt will never be updated. So now you're dealing with permanent data drift and desync across user devices. It also breaks the context transaction and undo engine. The tran
Replies
Boosts
Views
Activity
Jun ’26
Inspector built-in navigation bar missed in iOS26
The inspector attached to the multi-column Split View, does not display its navigation elements on iOS 26. How to fix it?
Topic: UI Frameworks SubTopic: SwiftUI
Replies
5
Boosts
0
Views
178
Activity
Jun ’26
Reply to Inspector built-in navigation bar missed in iOS26
NavigationSplitView() { // Sidebar column SidebarView() .environmentObject(navState) .navigationTitle(LocalizedStringKey(Everycards)) .navigationBarTitleDisplayMode(.large) .toolbar { ToolbarItemGroup(placement: .navigationBarLeading) { AccountMenuView( openSettings: openSettings, sendEmail: { self.sendEmail(subject: $0) }, showProView: $showProView, showStatisticsView: $showStatisticsView ) if syncMonitor.isSyncing { ProgressView() .progressViewStyle(.circular) .tint(.secondary) } } ToolbarItemGroup(placement: .navigationBarTrailing) { OnboardingMenuView( showWelcome: { showWelcomeView = true }, showFlashTheoryView: $showFlashTheoryView, showQuizTheoryView: $showQuizTheoryView, showOnBdGestureStack: $showOnBdGestureStack, showOnBdWhereToStartView: $showOnBdWhereToStartView, showOnBdImportView: $showOnBdImportView, showOnBdHomeCollectionView: $showOnBdHomeCollectionView, showOnBdStylingView: $showOnBdStylingView, showOnBdLockingView: $showOnBdLockingView, showOnBdSlidesView: $showOnBdSlidesView, show
Topic: SwiftUI SubTopic:
SwiftUI Q&A
Replies
Boosts
Views
Activity
Jun ’26
Reply to UISplitViewController primary column differences in 27 vs 26
In iPadOS 27, sidebars are edge-to-edge. The sidebar adds a safe area inset to the adjacent column in the split view controller. To prevent content from being occluded by a sidebar, ensure that it is positioned within the safe area. For more information, check out Make your UIKit app more flexible from WWDC25.
Topic: UIKit SubTopic:
UIKit Q&A
Replies
Boosts
Views
Activity
Jun ’26
UISplitViewController primary column differences in 27 vs 26
The primary column sidebar in iPadOS 26 has a 10pt padding (not sure if we can access this value programmatically) which we hard-coded for edge inset calculations of the secondary view. It appears this padding is still present with the new design. Can we derive this property reliably somehow?
Topic: UI Frameworks SubTopic: UIKit
Replies
1
Boosts
0
Views
157
Activity
Jun ’26
How to get an NSSegmentedControl in toolbar look like in the Finder?
Hey Team, In the Finder, the segmented control in the toolbar where the user can choose to display the files as icons, list, columns, or gallery, indicates its selection using a gray background. Is that done via custom drawing or is it a semantic option in AppKit? When I adopt Liquid Glass in my app by removing UIDesignRequiresCompatibility, my segmented control indicates the selections with a strong accent color. This could be distracting to my users and I'd like to duplicate the Finder behavior. Thanks, Ari
Topic: UI Frameworks SubTopic: AppKit
Replies
2
Boosts
0
Views
222
Activity
Jun ’26
Reply to How to display UISplitViewController columns next to each other again.
While the columns overlap where blue flows under red, it's important to note that the safeArea of the blue view is just the area not obscured by the red column. By positioning the content of the blue view within the safe area, the content will be next to the red column while the background can flow under it for visual effect. In a storyboard, this can be done by anchoring to constraints the safe area of the view instead of the bounds of the view. Or in code using the safe area layout guide.
Topic: UIKit SubTopic:
UIKit Q&A
Replies
Boosts
Views
Activity
Jun ’26
CoreData lightweight migration fails on iOS 26 only — "no such column: Z_110GROUPITEMS1"
We've spent several days diagnosing a CoreData migration crash that is iOS 26-specific and reproducible 100% of the time. Posting here in case others have hit this and because we believe it's an Apple bug worth documenting. Upgrading from our App Store build (CoreData model v10) to our latest TestFlight build (model v11) crashes on iOS 26 with: NSCocoaErrorDomain / Code 134110 no such column: Z_110GROUPITEMS1 The same upgrade path on iOS 17 and iOS 18 works perfectly. What v10→v11 changes Two new entities added alphabetically early in the alphabet One new optional boolean attribute on an existing entity One new optional to-many relationship on the same existing entity All changes are lightweight-migration compatible. We use shouldMigrateStoreAutomatically = true and shouldInferMappingModelAutomatically = true Here's what we observed Adding two entities alphabetically shifts Z_ENT numbers for all subsequent entities. A central entity (EntityA) moves from Z_ENT 110 (v10) to Z_ENT 112 (v11). It has many
Replies
2
Boosts
0
Views
596
Activity
Jun ’26
Reply to Reorderable with Xcode previews
Hi, thanks for getting back Here is a code snippet where this issue will occur: import SwiftUI struct TestItem: Identifiable { let id = UUID() let color: Color } struct POSView: View { @State private var items = [ TestItem(color: .orange), TestItem(color: .purple), TestItem(color: .teal), TestItem(color: .blue), TestItem(color: .pink), TestItem(color: .green) ] let columns = [GridItem(.adaptive(minimum: 100))] var body: some View { ScrollView { LazyVGrid(columns: columns, spacing: 16) { ForEach(items) { item in RoundedRectangle(cornerRadius: 15) .fill(item.color.gradient) .frame(width: 100, height: 100) } .reorderable() } .reorderContainer(for: TestItem.self) { difference in items.apply(difference: difference) } .padding() } } } extension Array { mutating func apply( difference: ReorderDifference ) where Element: Identifiable, Element.ID: Sendable { guard let sourceIndex = firstIndex(where: { $0.id == difference.sources[0] }) else { return } let movedCard = remove(at: sourceIndex) v
Replies
Boosts
Views
Activity
Jun ’26