I have a Core Data entity with a few properties, the ones of interest here are a UUID column named id and an Int16 column containing values between 0 and 3. I have a Table in SwiftUI which is correctly arranging the items stored by Core Data into its rows. The selection: binds a Set of the id values. I have another view to which I have sent the Set of id values (Set) (Bin is the name of my entity) using @Binding var ... - so far so good. Within that view, I can determine that I am correctly getting the set of interest, and most of what I am trying to accomplish I can get to work. What is driving me up the wall, however, is that I am trying to get a Picker in the child view to let me change the value of the Int16 property (called playMode) of the first selected object from the table. I have tried numerous things to create that binding but I can't seem to find the magic combination that works in any sensible way. Here is what I am currently doing, which seems to come closest. I set up a @State
Search results for
column
2,052 results found
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I have a weird problem using a popover - this behavior is pretty random to me so I somehow think it's a bug - but I cannot reproduce the problem in a smaller project to give you reproducible code. I'm showing a table with a few rows and columns, one of this items per row is editable. If the user taps on the button a popover does appear, presenting a View with a TextField or a TextEditor (tried both with the same result). It all works fine on the iPhone (any situation), it works on the iPad in horizontal format, it works on the iPad in vertical format if there is an external keyboard connected. But - as soon as iOS needs to show the on screen keyboard, the popover disappears and so does the keyboard again. I replaced the popover view with a simplified version, to make sure there is nothing wrong with the popoverView and still got the same behavior. struct SimpleRemarkPopover: View { @Binding var showPopover:Bool @State var comment:String var body: some View { TextEditor(text: $comment) Button(action:
The Grid shrinks contained views as more columns are added. Is there a way to set a maximum number of columns/rows such that, instead of shrinking, the grid becomes scrollable?
Just discovered that... We can not have a nil NSDate field in CloudKit, when I save a record it is set to a default date 2001,01,01 but it is not nil. I do not want to add a boolean column or a placeholder value to know if the date is nil or not + always think about it otherwise I will have incorrect data shown to the user. Is there something we can do ? Does someone has an answer? I miss something I think as I can not find many resources on this BIG disadvantage to use CloudKit!
Topic:
App & System Services
SubTopic:
iCloud & Data
Tags:
So it doesn't appear to be possible to determine when a UISplitViewController is in a column resizing event. Would be great to be able to determine this to be able to optimize the number of layout passes until after the column resize event finishes... FB11775512
Topic:
UI Frameworks
SubTopic:
UIKit
Tags:
Looking to get column resizing events for UISplitViewController. I have a UITableView inside on of the columns and when the column is resized I need to invalidate the intrinsic content size of the table view cells to recompute row height. Best place to handle this?
I am trying to use a SwiftUI Table View [1] with an Array of class objects so that updates to properties in the class objects are reflected in the table. This works fine for me with structs and @State, however, I'm trying to find a way to achieve the same effect with @StateObject given that @State only supports value types. The only problem is that @StateObject doesn't seem to be supported by Array. When I try to extend Array to conform to ObservableObject, I get: Non-class type 'Array' cannot conform to class protocol 'ObservableObject' It seems that wrapping the array with an object and using @Published to publish changes does not work as evidenced by this [2] other post. Appreciate if anyone has any ideas on how to make this work! And if there is no way to make it work, I don't understand why Apple has made it so that a TableColumn initializer would require [3] the RowValue to conform to NSObject. Because this effectively means that to have sorting capabilities for a column, the underlying data ty
Hi all, I have just started to learn swiftUI for macOS, and am struggling with the view set-up. The view below is the one I am trying to achieve. I had no issues with using navigation view to get the column style with View 1 and View 2&3, being able to stretch/resize each column as well. I have not however been able to make a stretchable 'row' view for View 2 and View 3. How can I achieve this? I tried using a Navigation Stack to wrap View 2 and View 3, which gave me the layout I want, though the 'rows' (being View 2 and View 3) are fixed, and can't be resized/dragged, like the columns of View 1 and View 2&3 can. How can I allow resizing between View 2 and View 3 as well, while preserving the overall layout show in the image? Thank you for the help :)
Xcode GPU Frame Capture shows that PreZ Test Fails percent is zero. I can't understand what is wrong.. I drawed the opaque primitives with depth test, no alpha test, no alpha blend. I thought that Hidden Surface Removal removes hidden surfaces, so There is no killed fragments by PreZ Test Kill. But I couldn't find the column about Hidden Surface Removal. It looks that xcode gpu frame capture doesn't show the data about hidden surface removal. I tested it on iphone 13 mini(ios 16.3), M1 Mac Ventura
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags:
Metal
Metal Performance Shaders
Xcode
Graphical Debugger
So the droid you’re looking for here is Developer Account Help > Reference > Supported capabilities (macOS). The rightmost column, confusingly labelled “Apple Developer”, lists the capabilities available to folks using free provisioning (a Personal Team in Xcode parlance). You’ll note that Network Extension is not listed there so, yes, you’ll need a developer account. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic:
App & System Services
SubTopic:
Networking
Tags:
The export to CSV option on a testflight group table only gives you First/Last/Email and I'd like to include the status/build/install date on the export to create reports on Beta user engagement. I used to be able to low-tech copy the table of users and paste it into excel, but seems like the table format has changed to some React Div view and it no longer copies/pastes. I've also tried to run some browser extensions that scrape table data and I haven't been successful. (they don't even recognize this list as an HTML table) Anyone know how to get a report of the testflight users that includes the Status column?
Topic:
App Store Distribution & Marketing
SubTopic:
App Store Connect
Tags:
App Store Connect
Beta
TestFlight
Hi himav, for the follow up questions you had, clicking on the Family name column header would change the sortOrder array property to include the Comparator for that column (or reverse that Comparator if the sortOrder array already had one for that column). You could see the sortOrder binding as a representation of how different columns want to take part in sorting - and then you could sort the data accordingly. For custom Comparator on individual columns, you could use one of TableColumn's initializers that come with comparator as a parameter, and that custom comparator you provided will be included into sortOrder if you click on the corresponding column header. Hope this helps!
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Hello everyone, I am new to the Swift and the SwiftUI. Trying to understand how sorting works on SwiftUI Table view. The following code does what I intend to do, but I am not able to understand how does it actually work. Need help with the answers for the questions posted below the code. import SwiftUI struct Person: Identifiable { let givenName: String let familyName: String let emailAddress: String let id = UUID() } private var people = [ Person(givenName: f1, familyName: l1, emailAddress: e1@example.com), Person(givenName: f2, familyName: l2, emailAddress: e2@example.com), Person(givenName: f3, familyName: l3, emailAddress: e3@example.com) ] struct ContentView: View { @State private var selected = Set() // Question 1 @State private var sortOrder = [KeyPathComparator(Person.givenName)] var body: some View { Table(people, selection: $selected, sortOrder: $sortOrder) { TableColumn(Given name, value: .givenName) TableColumn(Family name, value: .familyName) TableColumn(Email, value: .emailAddress) } // Question
Still not completely clear to me. Lets say I click on Family name column, what happens next? Does the value of sortOrder variable change if I click on Family name column? If yes, what will be the new value? Also, how can I use custom Comparator for different columns?
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags:
Question 1 : I want to be able to sort by all the columns. How many KeyPathComparators should be in the sortOrder array? Surprisingly, a single comparator works for all columns . Question 2: What is the value of newOrder? Is it same as the sortOrder? What does it contain? You get the same behaviour with this: .onChange(of: sortOrder) { _ in people.sort(using: sortOrder) } . Question 3: sortOrder contains the comparator for only givenName. How does the above code able to provide sort functionality for all the columns? Same as question 1 ? I found this tutorial interesting. https://www.kodeco.com/books/macos-by-tutorials/v1.0/chapters/4-using-tables-custom-views And changed your code to make it work better (immediately change rows when tapping another column header) struct Person: Identifiable { let givenName: String let familyName: String let emailAddress: String let id = UUID() } private var people = [ Person(givenName: f1, familyName: Bob, emailAddress: xbob@ example.com),
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: