Search results for

column

2,070 results found

Post

Replies

Boosts

Views

Activity

Missing required column 'label' in json. at "HandPoseAssests.json"
I have created the .json file according to the https://developer.apple.com/documentation/createml/building-an-object-detector-data-source here is my .json file below { imagefilename:Five Fingers.HEIC, annotation: [ { coordinates: { y: 156.062, x: 195.122, height: 148.872, width: 148.03 }, label: Five Fingers } ] }, { imagefilename: One Finger.HEIC, annotation: [ { coordinates: { y: 156.062, x: 195.122, height: 148.872, width: 148.03 }, label: One Finger } ] }, { imagefilename: Two Finger.HEIC, annotation: [ { coordinates: { y: 156.062, x: 195.122, height: 148.872, width: 148.03 }, label: Two Finger } ] }, { imagefilename: Four Finger.HEIC, annotation: [ { coordinates: { y: 156.062, x: 195.122, height: 148.872, width: 148.03 }, label: Four Finger } ] } ] but it shows error as Missing required column 'label' in json. at NameOfJsonFile.json Were am I Wrong
2
0
1.5k
Dec ’22
NavigationSplitView content column renders list in plain style – even on iPhone
Hi everyone, I’m building an iOS app that originally targeted iPhone using NavigationStack. Now I’m adapting it for iPad and switched to using NavigationSplitView to support a three-column layout. The structure looks like this: NavigationSplitView { A // Sidebar } content: { B // Middle column – this shows a list } detail: { C // Detail view } The issue is with the list shown in view B (the content column). It appears completely unstyled, as if it’s using .listStyle(.plain) — with no background material, and a very flat look. I can understand that this might be intentional on iPad to visually distinguish the three columns. However, the problem is that this same unstyled list also appears on iPhone, even though iPhone only shows a single column view at a time! I tried explicitly setting .listStyle(.insetGrouped) or .listStyle(.grouped) on the list in view B, but it makes no difference. When I go back to NavigationStack, the list in B is styled properly, just as expe
0
0
86
Aug ’25
Reply to Populate one column based on values of other column in a NSTableView
Here is how I would do: You have a dataSource for the table, which is a 2 dimensional array. Right ? array[column][row] Then the second column array[1] should be computed based on the values of first column array[0] So, when you change an item in column 0, recompute column 1 and ask for reloading with func reloadData(forRowIndexes rowIndexes: IndexSet, columnIndexes: IndexSet)
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21
Reply to NavigationSplitView Collapse Button
Hi @Ammar S. Mittori, The way that mail works on my iPad is that it shows two columns at first, and when you press the button to expand to three columns, that button disappears. To go back to the two column view, you click on the rightmost detail column and it will collapse. If you do want to show a button to collapse the third column, you can try code like this: struct ContentView: View { @State private var columnVisibility: NavigationSplitViewVisibility = .all var body: some View { NavigationSplitView(columnVisibility: $columnVisibility) { Text(Column 1) } content: { Text(Column 2) .toolbar { Group { if columnVisibility == .all { ToolbarItem(placement: .navigation) { Button(Back){ columnVisibility = .doubleColumn } } } } } } detail: { Text(Column 3) } } } This code sets a variable for the column visibility to be all the columns, and then changes that variable to just two columns when the back button is clicked
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’23
Growing entries to natural width of column in SwiftUI Grid
The new Grid View looks like it brings us a simple way to get row-column layouts into our SwiftUI apps! I wonder if someone can help me with one aspect: I have a situation similar to the one described for the Pet Leaderboard App in the Compose custom layouts with SwiftUI video. But I want to save space by putting the Cat/Goldfish/Dog voting buttons in the leaderboard table itself, in the first column, instead of the labels. Here's the code for a simplified version of that table: import SwiftUI struct TableDemo: View { var body: some View { Grid(alignment: .leading) { GridRow { Button { // vote for Cat } label: { Text(Cat).fontWeight(.bold).foregroundColor(.white).padding().background(.green).cornerRadius(8) } Text(23).fontWeight(.bold).foregroundColor(.white).gridColumnAlignment(.trailing) } GridRow { Button { // vote for Goldfish } label: { Text(Goldfish).fontWeight(.bold).foregroundColor(.white).padding().background(.green).cornerRadius(8) } Text(3).fontWeight(.bold).foregroundColor(.white
0
0
738
Oct ’22
Reply to Make method less repetative
This is the best I can come up with:private func generateLoserLocationFunction(numberOfPlayers: Int) -> (column: Int, row: Int) -> (column: Int, row: Int) { let closure : (column: Int, row: Int) -> (Int) if numberOfPlayers == 8 { closure = { row, column in switch column { case 0: return row / 2 case 1: return row ^ 1 default: return 0 } } } else if numberOfPlayers == 16 { closure = { row, column in switch column { case 0: return row / 2 case 1: return 3 - row case 2: return row ^ 1 default: return 0 } } } else if numberOfPlayers == 32 { closure = { row, column in switch column { case 0: return row / 2 case 1: return (row + 4) % 8 case 2: return row case 3: return row ^ 1 default: return 0 } } } else { abort() } return { row, column in let newCol = -2 * column return (newCol, closure(column: row, row: column)) } }
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’15
Reply to UILabels of three UIPickerViews revert to previous value (sometimes) and change without selection.
Thanks Claude for taking a look. This is the grid table with the pickers in the top row. The user should be able to pick a different gender (eg, Masculine, Neutral or Feminine) for each column, and the values below, in that column, should update (of course, the picker should also show the selected value - which is the problem).| Masculine | | Masculine | Masculine |-- -- -- -- -- -- --- -- -- -- -- --- -- - -- --- - - -- -| Der Mann | gibt | dem Hund | den Ball. |additional rows of examplesThe UILabels that behave strangely are the 3 picker labels in the top row.The cases, 4...28, are for the attributed text (put together in a separate method). The rest of the cellForItem, is simply: case 1: cell.label.text = nil case 4...32: cell = cVCellContents(cell: cell, indexPath: indexPath, offset: 0) default: cell.label.attributedText = NSAttributedString(string: No case) } return cell }To demo what I mean about the picker labels, if I roll the column 1 picker to 'Neutral', the data for the
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’19
Printer Dialogue Box: Subject appears in long vertical column
When trying to print an email with eM Client, the dialogue box pops up and the preview show the email's subject, To, and From lines in a long vertical column. This seems to only occur within the eM Client app and only on my Macbook Pro. I use the same email client on my Air with no issues. This is a recent development. I'm on Tahoe Beta 26.2.
0
0
134
Nov ’25
Reply to .navigationViewStyle(.columns) doesn't work
Can you clarify what you mean by fixed Navigation View? Anyway, you may need to define at least two columns inside NavigationView to test how .columns work. A simple example: struct CollectionView: View { var body: some View { if #available(iOS 15.0, *) { NavigationView { //First column VStack { NavigationLink(destination: //Second column replacement Text(Hello) .navigationBarTitle(Hello) ) { Text(To hello) } } .navigationBarTitle(List, displayMode: .large) //Second column EmptyView() } .navigationViewStyle(.columns) } else { // Fallback on earlier versions } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’21