Search results for

“column”

2,085 results found

Post

Replies

Boosts

Views

Activity

Reply to NavigationSplitView macOS
While we can't share exactly how this was done in the Mail app, I was able to achieve a similar layout with the following code: NavigationSplitView { // ... } content: { VStack { HStack{ sampleButton sampleButton } .cornerRadius(12) .padding(.top) List() { ForEach(0..<10) { index in Text(Email (index)) } } } } detail: { ContentUnavailableView(Select an email, systemImage: envelope) .toolbar { sampleButton } } To make certain columns collapsable, see NavigationSplitViewVisibility. This would require adding a @State to manage column visibility. Feel free to change it to your liking.  Travis
Topic: UI Frameworks SubTopic: SwiftUI
3d
Reply to NSFileManager getRelationship:ofDirectoryAtURL:toItemAtURL:error: returning NSURLRelationshipSame for Different Directories
It means apps don't need to actively track the current location of their files, but can instead determine its current location whenever the user actually asks for it. What should happen if you expand a directory with four subfolders in a NSBrowser (so four columns). And the third folder moves? If an app just follows the file reference URL the UI is broken. I mean if there are/were APIs that handled this in file reference world I'm with you! The concept of file location matters to users and to a lot of apps. I hope Apple doesn't want to put apps in single file jail. Here you get that one txt document and if it moves don't worry we got you. There are other types of apps that do other things. Please don't turn macOS into iOS :)
Topic: App & System Services SubTopic: Core OS Tags:
1w
Reply to Has anyone successfully used NSStagedMigrationManager?
So, after spending quite some time testing how the staged migration works, I think I figured out most of the nuances with NSLightweightMigrationStage. I want to share my finding in as many places as possible so that other troubled developers would be able to find this info and avoid the struggle 😇 The experimental project: The model V1 initial V2 added Required String name V3 added Required UUID id V4 added Optional String bs V5 added Optional Int attr5. Default: 0 V6 added Optional Int attr6. Changed attr5 default to 2 V7 added Optional String attr7. Chanded attr5 default to 4. V8 added Required Int count. Default: 0. V9 deleted attr7. V10 deleted attr6 Custom Mappings I've also included Model Mapping files with some custom policies: V1 => V2: Fills name field from the custom policy's function. V2 => V3: Fills id with new generated UUIDs from custom policy's function. V4 => V5: Fills attr5 with a random number from 1 to 10 through the custom policy. V7 => V8: Fills count with a random number fro
1w
Terminal.app crashes with Japanese IME input when text wraps to next line
Environment: macOS 26.3 (25D125) Terminal.app 2.15 (466) Apple Silicon Input method: Japanese (Romaji) - built-in Kotoeri Issue: Terminal.app crashes consistently when typing Japanese text using the built-in Japanese input method (Romaji) and the input line wraps beyond the terminal width. Steps to Reproduce: Open Terminal.app with default profile (Basic) Set terminal window width to ~80 columns Start typing Japanese text using macOS built-in Japanese input (Romaji) Continue typing until the text wraps to the next line Wait a few seconds after the wrap occurs Terminal.app crashes Key info from crash report: Crash thread name: (input method 992 com.apple.inputmethod.Kotoeri.RomajiTyping) ASI: BUG IN CLIENT OF LIBMALLOC: memory corruption of free block Exception: EXC_BREAKPOINT (SIGTRAP) Stack trace involves: IMKInputSession_Modern setMarkedText → SendTextInputEvent → NSTextInputContext The crash occurs in _xzm_xzone_malloc_freelist_outlined called from _CFRuntimeCreateInstance → __CFStringCreateImmuta
0
0
62
1w
Reply to CSS Grid subpixel column width misalignment at non-100% zoom levels in Safari
The issue you're encountering with CSS grid columns misaligning at certain zoom levels, despite using fractional widths, is likely due to subpixel rounding behavior inherent in rendering engines. Here's a deeper dive into why this happens and some potential strategies to mitigate it: Understanding the Issue Fractional Widths and Subpixel Precision: CSS fractional widths (e.g., 518.7875px) aim to distribute space precisely across columns. However, rendering engines often round these values to the nearest whole pixel to fit display resolutions, which can lead to misalignment, especially noticeable at non-100% zoom levels. Subpixel Rounding: At zoom levels like 85% or 115%, the pixel grid becomes more pronounced, and small rounding discrepancies can become visually apparent, causing columns to appear misaligned with background patterns or other elements. Device Display Scaling: MacBook models with Retina displays use higher pixel densities, which can exacerbate subpixel rounding issues
Topic: Safari & Web SubTopic: General Tags:
2w
TabularData doesn't respect Double type when values match Int
Hello, I'm trying to figure out why an Int is being inferred over my explicit Double I'm parsing a CSV that contains 2 tables. I don't own the data so I'm not able to change it. The first row contains one cell that's used as a title for the document The second row is empty The third row contains one cell that's used as the header for the first table There is a header row for the table There's a dynamic number of rows for this table The an empty spacer row There is a row that's used as a title for the second table There is a header row for the table There's a dynamic number of rows for this table Im able to separate and create two DataFrame's from the data without issue. And this is the initializer I'm using. DataFrame( csvData: csvData, rows: rows, types: types, options: options ) Column names and their CSV types looks like this var types: [String: CSVType] { [ // ... Column 38: .double, // ... ] } The data in the CSV is 0 nil nil nil 2 And this is what the one of the columns in que
1
0
41
2w
CSS Grid subpixel column width misalignment at non-100% zoom levels in Safari
Steps to reproduce: Create a CSS grid with fractional column widths e.g. grid-template-columns: repeat(3, 518.7875px) Set browser zoom to 85% or 115% Observe columns misalign with background-size pattern Expected: Columns render consistently at all zoom levels Actual: Subpixel rounding causes visual misalignment macOS: 13/14/15 inch MacBook
1
0
154
3w
How to delete a row from a table
To display rows and columns of data in a nice layout like a spreadsheet I use a table like the code here .. Table(array) { TableColumn(Ticker, value: .ticker) TableColumn(Other, value: .other) } To delete a row from the table the advice is to use a ForEach loop. Since I don’t use a ForEach loop, how do I delete rows from the table ? With this code there is no way to attach a .onDelete modifier or a Button Any advice would be much appreciated Thank you
Topic: UI Frameworks SubTopic: SwiftUI
1
0
54
3w
RealityView attachment draw order
My visionOS 26.3 app displays a diorama-like scene in a RealityView in a mixed immersive space, about 1 meter square, with view attachments floating above the scene. Each view attachment fades out after user interaction, by animating the view's opacity. What I'm observing is that depending on the position of a view attachment relative to the scene and the camera, an unwanted cutout effect is observed (presumably because of draw order issues), as shown in the right column in the screenshots below. YouTube video link of these sequences: https://youtu.be/oTuo0okKCkc (19 seconds) My question: How does visionOS determine the view attachment draw order relative to the RealityView scene? If I better understood how the draw order is determined, I could modify my scene to ensure that the view attachments were always drawn after the scene, fixing the unwanted cutout effect. I've successfully used ModelSortGroupComponent to control the draw order of entities within the RealityView scene, but my understanding is
0
0
206
3w
Zoom transition source tile lags after back navigation when LazyVGrid is scrolled immediately
[Submitted as FB21961572] When navigating from a tile in a scrolling LazyVGrid to a child view using .navigationTransition(.zoom) and then returning, the source tile can lag behind the rest of the grid if scrolling starts immediately after returning. The lag becomes more pronounced as tile content gets more complex; in this simplified sample, it can seem subtle, but in production-style tiles (as used in both of my apps), it is clearly visible and noticeable. This may be related to another issue I recently filed: Source item disappears after swipe-back with .navigationTransition(.zoom) CONFIGURATION Platform: iOS Simulator and physical device Navigation APIs: matchedTransitionSource + navigationTransition(.zoom) Container: ScrollView + LazyVGrid Sample project: ZoomTransition (DisappearingTile).zip REPRO STEPS Create a new iOS project and replace ContentView with the code below. Run the app in sim or physical device Tap any tile in the scrolling grid to navigate to the child view. Return to the grid (back butt
Topic: UI Frameworks SubTopic: SwiftUI
0
0
69
Feb ’26
How to align views in a LazyVGrid to a common base-line?
I have the following snippet (but you can see my entire code in GitHub, if you want): LazyVGrid(columns: columns) { ForEach(books) { book in BookView(book: book) .draggable(Book.BookTransferable(persistanceIdentifier: book.id)) } } and BookView is: VStack { Image(nsImage: book.image) .resizable() .frame(width: 150, height: 200) .scaledToFill() Text(book.title) .lineLimit(1) .font(.headline) HStack { ForEach(book.tags.sorted(), id: .self) { tag in TagView(tag: tag, showText: false) } } } .padding() This will render each BookView on a different base-line because of the fact that the Text view sometimes takes 1, 2 or even 3 lines (as shown). How can I have all BookViews alligned at a common base-line (as it would if Text would only take one line, for example)?
0
0
47
Feb ’26
NSTableView/NSScrollView jumping scroll position during NSSplitView resize
This is a very basic macOS Finder-style test app using AppKit. I am experiencing a jump in the vertical scroll position of my NSTableView (inside an NSScrollView) specifically when the window is resized horizontally. This happens when columns are visually added or removed. Framework: AppKit (Cocoa) Xcode/macOS: 26.2 Code: https://github.com/MorusPatre/Binder/blob/main/ContentView%20-%20Scroll%20Jump%20during%20Resize.swift
0
0
191
Feb ’26
Severe Frame Drops When Resizing macOS Window with Dynamic LazyVGrid
Context: I am building a macOS file (currently image only) browser using SwiftUI. The core view is a ScrollView containing a LazyVGrid. The layout is dynamic: as the window resizes, I calculate the optimal number of columns and spacing using a GeometryReader. The Issue: While scrolling is pretty smooth (thanks to custom image caching and prefetching), window resizing is significantly laggy. After having scrolled the UI stutters and drops frames heavily while dragging the window edge. The Code: https://github.com/MorusPatre/Binder
2
0
101
Feb ’26
Reply to Titles and Header Auto Changing Color?
The first image with time 9:35 shows a list of transactions sorted by date using List{}. The column headers are displaying in DARK mode with a black stripe, and header items have switched from black to white. The second image (9:39) changed to a ScrollView {}. The column headers did not change color, but scrolled out of the view. The header is showing that the text has changed from black to white while scrolling. The final image is a ScrollView with LazyVStack pinnedViews. Google suggested using .toolbarColorScheme(.light, for: .navigationBar) at the bottom of the ScrollView to prevent the header stuff from changing color. So my question is: Is this change in color for these views a bug or is this normal behavior with Liquid Glass?
Topic: Design SubTopic: General Tags:
Feb ’26
Reply to NavigationSplitView macOS
While we can't share exactly how this was done in the Mail app, I was able to achieve a similar layout with the following code: NavigationSplitView { // ... } content: { VStack { HStack{ sampleButton sampleButton } .cornerRadius(12) .padding(.top) List() { ForEach(0..<10) { index in Text(Email (index)) } } } } detail: { ContentUnavailableView(Select an email, systemImage: envelope) .toolbar { sampleButton } } To make certain columns collapsable, see NavigationSplitViewVisibility. This would require adding a @State to manage column visibility. Feel free to change it to your liking.  Travis
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
3d
Reply to NSFileManager getRelationship:ofDirectoryAtURL:toItemAtURL:error: returning NSURLRelationshipSame for Different Directories
It means apps don't need to actively track the current location of their files, but can instead determine its current location whenever the user actually asks for it. What should happen if you expand a directory with four subfolders in a NSBrowser (so four columns). And the third folder moves? If an app just follows the file reference URL the UI is broken. I mean if there are/were APIs that handled this in file reference world I'm with you! The concept of file location matters to users and to a lot of apps. I hope Apple doesn't want to put apps in single file jail. Here you get that one txt document and if it moves don't worry we got you. There are other types of apps that do other things. Please don't turn macOS into iOS :)
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
1w
Reply to Has anyone successfully used NSStagedMigrationManager?
So, after spending quite some time testing how the staged migration works, I think I figured out most of the nuances with NSLightweightMigrationStage. I want to share my finding in as many places as possible so that other troubled developers would be able to find this info and avoid the struggle 😇 The experimental project: The model V1 initial V2 added Required String name V3 added Required UUID id V4 added Optional String bs V5 added Optional Int attr5. Default: 0 V6 added Optional Int attr6. Changed attr5 default to 2 V7 added Optional String attr7. Chanded attr5 default to 4. V8 added Required Int count. Default: 0. V9 deleted attr7. V10 deleted attr6 Custom Mappings I've also included Model Mapping files with some custom policies: V1 => V2: Fills name field from the custom policy's function. V2 => V3: Fills id with new generated UUIDs from custom policy's function. V4 => V5: Fills attr5 with a random number from 1 to 10 through the custom policy. V7 => V8: Fills count with a random number fro
Replies
Boosts
Views
Activity
1w
Terminal.app crashes with Japanese IME input when text wraps to next line
Environment: macOS 26.3 (25D125) Terminal.app 2.15 (466) Apple Silicon Input method: Japanese (Romaji) - built-in Kotoeri Issue: Terminal.app crashes consistently when typing Japanese text using the built-in Japanese input method (Romaji) and the input line wraps beyond the terminal width. Steps to Reproduce: Open Terminal.app with default profile (Basic) Set terminal window width to ~80 columns Start typing Japanese text using macOS built-in Japanese input (Romaji) Continue typing until the text wraps to the next line Wait a few seconds after the wrap occurs Terminal.app crashes Key info from crash report: Crash thread name: (input method 992 com.apple.inputmethod.Kotoeri.RomajiTyping) ASI: BUG IN CLIENT OF LIBMALLOC: memory corruption of free block Exception: EXC_BREAKPOINT (SIGTRAP) Stack trace involves: IMKInputSession_Modern setMarkedText → SendTextInputEvent → NSTextInputContext The crash occurs in _xzm_xzone_malloc_freelist_outlined called from _CFRuntimeCreateInstance → __CFStringCreateImmuta
Replies
0
Boosts
0
Views
62
Activity
1w
Reply to CSS Grid subpixel column width misalignment at non-100% zoom levels in Safari
The issue you're encountering with CSS grid columns misaligning at certain zoom levels, despite using fractional widths, is likely due to subpixel rounding behavior inherent in rendering engines. Here's a deeper dive into why this happens and some potential strategies to mitigate it: Understanding the Issue Fractional Widths and Subpixel Precision: CSS fractional widths (e.g., 518.7875px) aim to distribute space precisely across columns. However, rendering engines often round these values to the nearest whole pixel to fit display resolutions, which can lead to misalignment, especially noticeable at non-100% zoom levels. Subpixel Rounding: At zoom levels like 85% or 115%, the pixel grid becomes more pronounced, and small rounding discrepancies can become visually apparent, causing columns to appear misaligned with background patterns or other elements. Device Display Scaling: MacBook models with Retina displays use higher pixel densities, which can exacerbate subpixel rounding issues
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
2w
TabularData doesn't respect Double type when values match Int
Hello, I'm trying to figure out why an Int is being inferred over my explicit Double I'm parsing a CSV that contains 2 tables. I don't own the data so I'm not able to change it. The first row contains one cell that's used as a title for the document The second row is empty The third row contains one cell that's used as the header for the first table There is a header row for the table There's a dynamic number of rows for this table The an empty spacer row There is a row that's used as a title for the second table There is a header row for the table There's a dynamic number of rows for this table Im able to separate and create two DataFrame's from the data without issue. And this is the initializer I'm using. DataFrame( csvData: csvData, rows: rows, types: types, options: options ) Column names and their CSV types looks like this var types: [String: CSVType] { [ // ... Column 38: .double, // ... ] } The data in the CSV is 0 nil nil nil 2 And this is what the one of the columns in que
Replies
1
Boosts
0
Views
41
Activity
2w
CSS Grid subpixel column width misalignment at non-100% zoom levels in Safari
Steps to reproduce: Create a CSS grid with fractional column widths e.g. grid-template-columns: repeat(3, 518.7875px) Set browser zoom to 85% or 115% Observe columns misalign with background-size pattern Expected: Columns render consistently at all zoom levels Actual: Subpixel rounding causes visual misalignment macOS: 13/14/15 inch MacBook
Replies
1
Boosts
0
Views
154
Activity
3w
How to delete a row from a table
To display rows and columns of data in a nice layout like a spreadsheet I use a table like the code here .. Table(array) { TableColumn(Ticker, value: .ticker) TableColumn(Other, value: .other) } To delete a row from the table the advice is to use a ForEach loop. Since I don’t use a ForEach loop, how do I delete rows from the table ? With this code there is no way to attach a .onDelete modifier or a Button Any advice would be much appreciated Thank you
Topic: UI Frameworks SubTopic: SwiftUI
Replies
1
Boosts
0
Views
54
Activity
3w
RealityView attachment draw order
My visionOS 26.3 app displays a diorama-like scene in a RealityView in a mixed immersive space, about 1 meter square, with view attachments floating above the scene. Each view attachment fades out after user interaction, by animating the view's opacity. What I'm observing is that depending on the position of a view attachment relative to the scene and the camera, an unwanted cutout effect is observed (presumably because of draw order issues), as shown in the right column in the screenshots below. YouTube video link of these sequences: https://youtu.be/oTuo0okKCkc (19 seconds) My question: How does visionOS determine the view attachment draw order relative to the RealityView scene? If I better understood how the draw order is determined, I could modify my scene to ensure that the view attachments were always drawn after the scene, fixing the unwanted cutout effect. I've successfully used ModelSortGroupComponent to control the draw order of entities within the RealityView scene, but my understanding is
Replies
0
Boosts
0
Views
206
Activity
3w
Zoom transition source tile lags after back navigation when LazyVGrid is scrolled immediately
[Submitted as FB21961572] When navigating from a tile in a scrolling LazyVGrid to a child view using .navigationTransition(.zoom) and then returning, the source tile can lag behind the rest of the grid if scrolling starts immediately after returning. The lag becomes more pronounced as tile content gets more complex; in this simplified sample, it can seem subtle, but in production-style tiles (as used in both of my apps), it is clearly visible and noticeable. This may be related to another issue I recently filed: Source item disappears after swipe-back with .navigationTransition(.zoom) CONFIGURATION Platform: iOS Simulator and physical device Navigation APIs: matchedTransitionSource + navigationTransition(.zoom) Container: ScrollView + LazyVGrid Sample project: ZoomTransition (DisappearingTile).zip REPRO STEPS Create a new iOS project and replace ContentView with the code below. Run the app in sim or physical device Tap any tile in the scrolling grid to navigate to the child view. Return to the grid (back butt
Topic: UI Frameworks SubTopic: SwiftUI
Replies
0
Boosts
0
Views
69
Activity
Feb ’26
Finder not adjustable in column mode
Is the MacOs tahoe 26.2 Finder's Column column width not adjustable in column mode?
Replies
1
Boosts
0
Views
69
Activity
Feb ’26
How to align views in a LazyVGrid to a common base-line?
I have the following snippet (but you can see my entire code in GitHub, if you want): LazyVGrid(columns: columns) { ForEach(books) { book in BookView(book: book) .draggable(Book.BookTransferable(persistanceIdentifier: book.id)) } } and BookView is: VStack { Image(nsImage: book.image) .resizable() .frame(width: 150, height: 200) .scaledToFill() Text(book.title) .lineLimit(1) .font(.headline) HStack { ForEach(book.tags.sorted(), id: .self) { tag in TagView(tag: tag, showText: false) } } } .padding() This will render each BookView on a different base-line because of the fact that the Text view sometimes takes 1, 2 or even 3 lines (as shown). How can I have all BookViews alligned at a common base-line (as it would if Text would only take one line, for example)?
Replies
0
Boosts
0
Views
47
Activity
Feb ’26
NSTableView/NSScrollView jumping scroll position during NSSplitView resize
This is a very basic macOS Finder-style test app using AppKit. I am experiencing a jump in the vertical scroll position of my NSTableView (inside an NSScrollView) specifically when the window is resized horizontally. This happens when columns are visually added or removed. Framework: AppKit (Cocoa) Xcode/macOS: 26.2 Code: https://github.com/MorusPatre/Binder/blob/main/ContentView%20-%20Scroll%20Jump%20during%20Resize.swift
Replies
0
Boosts
0
Views
191
Activity
Feb ’26
Severe Frame Drops When Resizing macOS Window with Dynamic LazyVGrid
Context: I am building a macOS file (currently image only) browser using SwiftUI. The core view is a ScrollView containing a LazyVGrid. The layout is dynamic: as the window resizes, I calculate the optimal number of columns and spacing using a GeometryReader. The Issue: While scrolling is pretty smooth (thanks to custom image caching and prefetching), window resizing is significantly laggy. After having scrolled the UI stutters and drops frames heavily while dragging the window edge. The Code: https://github.com/MorusPatre/Binder
Replies
2
Boosts
0
Views
101
Activity
Feb ’26
Reply to Titles and Header Auto Changing Color?
The first image with time 9:35 shows a list of transactions sorted by date using List{}. The column headers are displaying in DARK mode with a black stripe, and header items have switched from black to white. The second image (9:39) changed to a ScrollView {}. The column headers did not change color, but scrolled out of the view. The header is showing that the text has changed from black to white while scrolling. The final image is a ScrollView with LazyVStack pinnedViews. Google suggested using .toolbarColorScheme(.light, for: .navigationBar) at the bottom of the ScrollView to prevent the header stuff from changing color. So my question is: Is this change in color for these views a bug or is this normal behavior with Liquid Glass?
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’26