Search results for

column

2,048 results found

Post

Replies

Boosts

Views

Activity

Reply to CSV to SwiftUI
How do I now separate the two columns from each other You could use a HStack . how do I implement this in a ForEach struct If I understand correctly, I would create 2 computed var to hold each of the columns content. And use these var in 2 ForEach in the HStack
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’22
Reply to Illegal NSTableViewDataSource
Hello Claude31:I get a crash on line 5 of this code when I move viewForTableColumn outside configureCell:func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView?{ let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView let column = tableView.tableColumns.firstIndex(of: tableColumn!)! configureCell(cell: cell!, row: row, column: column) return cell }Crash log: unexpectedly found nil when implicitly unwrapping ...
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’20
Reply to Checkbox in NSTableView
Is this table view cell-based or view-based?If it's cell-based, the content of a column is a NSCell. Replace the text field cell with a checkbox button cell.It it's view-based, you just delete the text field in the column and drag a checkbox in instead. However, you have to be very careful because the pieces are labelled confusingly.— Make sure you do not delete the text field NSCell that's at the first level under the column. It's something used internally by the table view— The other first level items within the column are alternative cell views. Unless you've added some, I think you'll find only one in a NSTableView columns. (NSOutlineView columns start with two.) That item is the NSTableCellView. Expand it, and you should see the actual text field. Delete this and put a checkbox in its place.If your table has all the standard IB item names, you should have gone down to Scroll View -> Clip View -> Table View -> Table Column -> Table
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’16
Reply to NSBrowser....conditionally suppress right-click menu
I guess menuForEvent: must get called on a subview of NSBrowser, and it must eat it. There doesn't seem to be a clean way to handle this. I can override menuForEvent: on a NSMatrix subclass, if I set a custom matrix class..though that API is deprecated.What I want to do, is when a user right-clicks, and no column/row is selected, I want nothing to happen (no menu to show). I can be a bit hacky by using validateMenuItem: and hiding everything in there. Doing this isn't great either, because I can right click in a different column than the selected column and the menu will show...since I don't have the NSEvent to check the location of the click against, it seems that I have to add another layer of nasty code by converting the current cursor's position. None of this feels clean.Edit: Seems that I can set the menu property on each cell in browser:willDisplayCell:atRow:column:Far as handling right clicks in blank areas and showing an alternative menu depening on what that column
Topic: UI Frameworks SubTopic: AppKit Tags:
Jul ’15
Reply to How to turn off background extension effect in UISplitViewController?
I just had a chance to test this under iPadOS 26.1 beta 2. Great news - if the primaryBackgroundStyle property of the split view is set to .none then we get back the old style tile layout and none of the content of the other columns appear behind the primary column. Thank you. If the primaryBackgroundStyle is set to .sidebar, the primary column is inset a bit as it has been since iPadOS 26.0 (and that's fine for a sidebar). But there is still some unwanted extension of content from the other columns behind the primary column. It's not nearly as bad as iPadOS 26.0. Running the app I used for the screenshot in the first post of this thread now results in just the background color of the selected row appearing on the far left. The section headers do not extend to the far left any more. Here's how it looks now with primaryBackgroundStyle = .none with iPadOS 26.1 beta 2: Here's how it looks now with primaryBackgroundStyle = .sidebar with iPadOS 26.1 beta 2 (note the row
Topic: UI Frameworks SubTopic: UIKit Tags:
1w
Reply to connecting windows and doors to a wall.
CapturedRoom.Surface has a transform simd_float4x4 and a dimensions simd_float3. The wall length is the dimensions.x and the position can be extracted from the transform with extension matrix_float4x4 { var position:SCNVector3 { return SCNVector3(columns.3.x, columns.3.y, columns.3.z) } } The Euler angles for the wall can be extracted using extension float4x4 { var eulerAngles: simd_float3 { simd_float3( x: asin(-self[2][1]), y: atan2(self[2][0], self[2][2]), z: atan2(self[0][1], self[1][1]) ) } }
Topic: App & System Services SubTopic: General Tags:
Jul ’22
Reply to Font Collection Column Missing
I reset Xcode using CleanMyMac, the font collection is now selecting English collection for me, where it stuck at Fixed Width previously, although, the collection column still hiding itself.I remember the last time I see the Font picker window is when I change the editor font, but I can't really remember the collection column is there or not.I try to install a fresh copy of Xcode (7.2.1) with another fresh OS X Yosemite 10.10.5/14F27 (with no xcode installed previously), the font collection column is there.Bug Report: 24608642
Feb ’16
Reply to Xcode 13.2.1 (13C100) Preview Not Working but Simulator Works!
I tested this code with Xcode 13.2.1. It runs perfectly. Which version of Xcode ? Did you inspect the disgnostics ? let columns: [GridItem] = [GridItem(.flexible()), GridItem(.flexible()), GridItem(.flexible())] struct ContentView: View { var body: some View { LazyVGrid(columns: columns) { ForEach(0..<9) { i in ZStack { Circle() .foregroundColor(.red) .opacity(3) } } } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } Here is screenshot (only difference is ContentView17 vs ContentView).
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’22