Questions tagged [swiftui-mac]

5 questions
1
vote
1 answer

List in NavigationView is calling init for every row

I'm making a Mac app using SwiftUI. I have a simple 2 column NavigationView. The first view is a Sidebar containing a list, the second view is a detail view. (I know NavigationView has been deprecated, but I can't use NavigationSplitView at the…
Martin
  • 1,570
  • 3
  • 19
  • 32
1
vote
0 answers

Navigating a SwiftUI List using arrow keys

In a Mac SwiftUI project, I have a simple list inside a NavigationView. When I try to navigate using up/down arrow keys, the list will only scroll to one element off the screen in either direction. In other words, in screenshot below, if I click…
1
vote
1 answer

SwiftUI on macOS - using Picker for each row in a Table Column

I am displaying some items in a Table on macOS (new in SwiftUI 3.0). I can get the table to work fine when displaying Text views in each column, but I really want to show a Picker view in one of the columns. But I'm not sure how I would 'bind' the…
Z S
  • 7,039
  • 12
  • 53
  • 105
0
votes
0 answers

OnTapGesture ALWAYS registers out of frame or view

I'm new to Swift, trying to do a personal project and I currently am stuck at a thing for which I cannot find a resolution anywhere for the past week. This is the code: import SwiftUI struct MainStatsView: View { var stat: StatElements …
0
votes
0 answers

Unterminated recursive List with SwiftUI on Mac OS

SwiftUI's List has an init accepting data elements along with a children: KeyPath parameter to neatly support recursive data. Any element with children provides a disclosure indicator and can be opened to show its children. Apple have an example to…
Benjohn
  • 13,228
  • 9
  • 65
  • 127