I am in the process of migrating from NavigationView as a root to NavigationSplitView. My model supports various different objects, and what would fit into the content column varies from a list, to a TabView with a list within. This particular example (which I refer to from here on,) the lists hold two different objects within the model. The layout looked like this: NavigationView // Used for sidebar, would now be NavigationSplitView(sidebar:content:detail) - NavigationLink -> TabView -> List(objectA) -> Object-Specific DetailView -> List(objectB) -> Object-Specific DetailView - NavigationLink -> List(objectC) -> Object-Specific DetailView - and more like the above As it stood, there was no third column functionality, but with the new API I am seeking to achieve this. I am however, hung up on how to change the detail pane properly from within these sub-views. Am I needing to pass the various objects up to the struct housing the root NavigationSplitView? I don't currently
Search results for
column
2,046 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am currently using a List and HStack to hack together a basic multi column Tableview. Fortunately I don't need more advanced features such as column resizing or moving - but scrolling horizontally has proved to be an issue. SwiftUI Lists normally won't scroll sideways so I placed mine in a horizontal scrollbar which does work but only when scrolled from the list 'header' which is separate from the list. Like so: ScrollView(.horizontal){ VStack{ Rectangle() // 'header' - scroll sideways from here List() // mousing here won't scroll sideways } } It 'works', but only just. I was hoping that the new LazyVGrid would work better and enable us to create at least a basic multi column tableview but it doesn't seem possible. Why doesn't Apple give the multi column tableview some love? It's a pretty basic control for many apps on macOS, but seems to have been completely ignored.
How do I add and or fit in more rows/columns of stickers other than the basic layout 3 across? ie How do I get say 6 of my Stickers per line, to pack in more choices in the space? Currently using the standard sticker pack app template.
I'm getting a CIVector from VNImageHomographicAlignmentObservation,which is supposed to represent a transformation matrix. Does this CIVector use row- or column- major order? In case, it matters, this matrix represents a homography:let observation: VNImageHomographicAlignmentObservation = ... // The input uses column-major order, so convert it to row-major for CIVector:let (col0, col1, col2) = observation.warpTransform.columnslet values: [CGFloat] = [CGFloat(col0.x), CGFloat(col1.x), CGFloat(col2.x), CGFloat(col0.y), CGFloat(col1.y), CGFloat(col2.y), CGFloat(col0.z), CGFloat(col1.z), CGFloat(col2.z)]let vector = CIVector(values: values, count: values.count)
`import Cocoa import TabularData let greeting = Decimal Type Evaluation let JSON = [{ product: Apple, type: Fruit, weight: 7.5, unit_price: 0.34 }, { product: Pear, type: Fruit, weight: 0.5, unit_price: 0.25 }] struct Product: Decodable { let product: String let type: String let weight: Double let unit_price: Double } let jsonData = JSON.data(using: .utf8)! let products: [Product] = try! JSONDecoder().decode([Product].self, from: jsonData) var dataframe = try! DataFrame(jsonData: jsonData) print (dataframe)` This results in the output below showing the columns are now ordered alphabetically and not in the order they appear in the array struct definition. ┏━━━┳━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┓ ┃ ┃ product ┃ type ┃ unit_price ┃ weight ┃ ┃ ┃ ┃ ┃ ┃ ┃ ┡━━━╇━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━┩ │ 0 │ Apple │ Fruit │ 0.34 │ 7.5 │ │ 1 │ Pear │ Fruit │ 0.25 │ 0.5 │ └───┴──────────┴──────────┴────────────┴──────────┘ 2 rows, 4 columns
Is there a way for a view to span multiple columns or rows when using LazyVGrid or LazyHGrid? I'm trying to make a calendar and would like to have a row that is the month and year label. I've tried using several LazyVGrid in a LazyVStack, but the scrolling performance seemed pretty poor, so I'm trying to see if I can make a single LazyVGrid work.
Im trying to troubleshoot some network issues and am running nettop to monitor live tcp traffic. My question is that I cannot find any documentation relating to the displayed column names. For example, what is rx ooo, or tx cwin? I can guess but would rather not assume anything. The man page is of no help and Googling has yet to return anything.Thanks in advance!
&TLDR; I see no documentation stating that during the life of UISplitViewController, that I cannot call setViewController(xxxxx, column) more than once on the same column. Yet in my experience calling it a second time does not work, unless I set the value to nil before calling it again to set it to the new value... I'm using a UISplitViewController in newer column-style layout and when bootstrapping the app, I create the UISplitViewController and use setViewController(primaryViewController, .primary) and setViewController(detailViewController, .secondary). In order to use the primaryViewController for the compact scenario, I return the .primary column in the UISplitViewControllerDelegate method: splitViewController(_ svc: UISplitViewController, topColumnForCollapsingToProposedTopColumn proposedTopColumn: UISplitViewController.Column) -> UISplitViewController.Column Tapping a cell in the primaryViewController, results in a call to splitViewController.show(.secondary)
Topic:
UI Frameworks
SubTopic:
UIKit
I'm following Apple WWDC video (https://developer.apple.com/videos/play/wwdc2021/10037/) about how to create a recommendation model. But I'm getting this error when I run the project on that like of code from their tutorial. Column keywords has element of unsupported type Dictionary. Here is the block of code took from the transcript of WWDC video that cause me issue: func featuresFromMealAndKeywords(meal: String, keywords: [String]) -> [String: Double] { // Capture interactions between content (the dish keywords) and context (meal) by // adding a copy of each keyword modified to include the meal. let featureNames = keywords + keywords.map { meal + : + $0 } // For each keyword, create an entry in a dictionary of features with a value of 1.0. return featureNames.reduce(into: [:]) { features, name in features[name] = 1.0 } } var trainingKeywords: [[String: Double]] = [] var trainingTargets: [Double] = [] for item in userPurchasedItems { // Add in the positive example. trainingKeywords.append( featur
-(nullable NSString*)browser:(NSBrowser*)sender titleOfColumn:(NSInteger)column { return @title; }No titles are showing up on screen. Just a blank gap where the titles go.
Hello! I've noticed that when I am using NavigationSplitView and I minimize the app on iPadOS and then resume, if I am using a 2 column setup it loses state upon resume. This does not appear to happen on with a 3 column setup though. I'm wondering if others have run into this and if anyone has figured out a way around it. It seems like it's a bug and I should file a bug for it, but wanted to check with more people first. Here's some example code, run it, select your number of columns, then minimize the app, count to 3 (because why not!) and open the app and you'll notice that $selection is now nil. import SwiftUI struct Item: Identifiable, Hashable { var id: Int var name: String var description: String } struct ContentView: View { @State var selection: Item? var items: [Item] = [ .init(id: 1, name: One, description: Is the loneliest number), .init(id: 2, name: Two, description: Two can be as bad as one), .init(id: 3, name: Three, description: Three Dog Night) ] var body: some View {
How to Recreate issue:1. Open Finder Window2. Switch to Column View3. Expand your colums sliders Left and right. (The Forcetouch Trckpad goes crazy with random clicks 100's of times while drging the sliders left and right. The haptic engine is going nuts.) This could cause hardware failures in the future, Trackpad is vibrating when dragging colum cliders.This only happens when there is actual content in column view, it does not happen when colums are blank. I can continue to recrate the issue. I only see the issue happening here. I'm on a 2015 Macbook 12 M3 Processor.
I have a SwiftUI macOS hierarchical table with 'children' initializer argument. Everything is working fine but I'd like to have expander arrows in different column. TableColumn definition order doesn't seem to have any effect nor has the order of properties in the model. Is there a way how to define which column should contain expander arrows?
Hi, I have an iPad app using a NavigationSplitView in 3 columns. The far left sidebar is initially hidden. NavigationSplitView automatically includes a button to show the sidebar but once it is displayed the button is removed so the user has no obvious way to close the sidebar again (you can swipe it away but who knows that?). The sidebar contains a List just like the builtin Notes app. I have a columnVisibility property to track the display state of the third column. Does anyone know how to either: Detect that the user has selected something in the sidebar List so the sidebar can be hidden using the columnVisibility property, or Keep the toggle button around so the user can close the sidebar with that? Thank you for any ideas you may have. J
The WWDC21 video Discover breakpoint improvements shows setting a column breakpoint on a closure and then inspecting the $0 anonymous argument. Did that make it into Xcode 13 beta 1? It doesn't seem to work for me when I try it? feedback FB9190264