Search results for

column

2,070 results found

Post

Replies

Boosts

Views

Activity

Reply to How SwiftUI Table sorting works ?
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:
Jan ’23
Reply to How to set different heights for rows of same UIPickerView?
It's unclear what you mean by One of the rows is of just plain string text. The other row of png images.A picker has different columns and each column has many rows. The column is called a component and is numbered from 0 to a few (like 2 or 5). There can be many rows. In your code, if wordPicker was 0 or 1 it would make sense - that would be the column, or component, that had the words in it. Each row in that column would have a height of 60. And each row in the other columns would have a height of 200.I suspect that wordPicker is not an NSInteger less than the number of columns (aka components) in the picker. The number of columns is set by your response to:- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{ return 2;}
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’16
With Swift, can Cocoa Bindings be used to sort by a column in NSTableView?
I'm building a Swift app, and can successfully populate the rows of an NSTableView using Cocoa bindings in a Storyboard. When I hook up a NSTableColumn's Sort Key & Selector, the click-on-column-heading becomes active (the sort-direction icons appear as expected), but the rows are not re-sorted. I've thrashed around a bit, replacing my Swift Array with an NSMutableArray, trying variations on Sort Key, but no joy... Anyone have any clues?
4
0
1.8k
Feb ’18
Missing "Download Size" column in "App Store File Sizes" in iTunes Connect
In documentation and online discussions, everyone refers to a Download Size column in the popup that appears when, in iTunes Connect, we click on Activity > [build number] > App Store File Sizes (under Compressed File Size). However, I only have the Installation Size column in my version.Has anyone else experienced this? Does anyone know why?Thanks.
8
0
2.5k
Feb ’17
How to use double/triple columns navigation style in SwiftUI document-based app?
How to use double/triple columns navigation style in SwiftUI document-based app? The problem is that the DocumentGroup() itself, seems already a NavigationView. In a non-document-based app, we can simply achieve this using three views within a navigation view. However, this is not the case for DocumentGroup. The views will be VStack-ed. I've also tried setting the navigation view style as double column, which also failed. Any workaround? @main struct SomeApp: App { var body: some Scene { WindowGroup { ContentView() } } } struct ContentView: View { var body: some View { NavigationView { LeftPanelView() MidPanelView() RightPanelView() } } }
3
0
1.9k
Aug ’20
Is there a way to apply for formatting option to a Dataframe column outside of the explicit description(options:) method?
I'm building up a data frame for the sole purpose of using that lovely textual grid output. I'm getting output without any issue, but I'm trying to sort out how I might apply a formatter to a specific column so that print(dataframeInstance) just works nicely. In my use case, I'm running a function, collecting its output - appending that into a frame, and then using TabularData to get a nice output in a unit test, so I can see the patterns within the output. I found https://developer.apple.com/documentation/tabulardata/column/description(options:), but wasn't able to find any way to pre-bind that to a dataframe Column when I was creating it. (I have some double values that get a bit excessive in length due to the joys of floating point rounding) Is there a way of setting a formatter on a column at creation time, or after (using a property) that could basically use the same pattern as that description method above?
1
0
1k
Nov ’23
How to update row heights of NSTableView with usesAutomaticRowHeights = true after column resize?
Since macOS 10.13 we can use NSTableView with automatic row heights, thanks to the new property usesAutomaticRowHeights and of course auto layout. This works quite nicely.But when the user resizes a column, the calculated heights are no longer correct, and gaps appear in the tableview cells.Is there a proven way to update the row heights after column resize in this scenario?I already tried methods like updateConstraintsForSubtreeIfNeeded(), updateConstraints(), setNeedsDisplay(), reloadData() and so on, but nothing works.
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
1.3k
Oct ’17
Reply to Declaring swift Type
I tried what you suggested but it still has the same problem. Although the line let custlist = try Customers.fetchAll(db) sets custlist to an array the type swift uses is type 'Customers' Below is the section of code for Customers if that helps any? Do you see how to fix it now? Thanks import Foundation import GRDB struct Customers { var id: Int64? var CustNumber: String? var CustName: String? var CustAddr: String? var CustCity: String? var CustState: String? var CustZip: String? var CustMobile: String? var CustEmail: String? var CustNotes: String? var CustAdded: Date? } extension Customers: Codable, FetchableRecord, MutablePersistableRecord { mutating func didInsert(with rowID: Int64, for column: String?) { id = rowID } } extension Customers { private enum Columns { static let id = Column(CodingKeys.id) static let CustName = Column(CodingKeys.CustName) static let CustAddr = Column(CodingKeys.CustAddr) static let CustCity = Column(CodingKeys.CustCity) stat
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’20
NavigationStack path is being reset in NavigationSplitView details columns
I'm building a SwiftUI app for iPad using a NavigationSplitView as the navigation root. Below is a simplified version of the app's navigation. There are a Home Page and a Settings Page, each with its own NavigationStack. The page that appears in the detail column depends on the sidebar's selection value. The issue I'm facing is that when I navigate deeply into the Home Page's NavigationStack (e.g., to a Home Page Child view), switch to the Settings Page, and then switch back to the Home Page, the Home Page's navigation path has been reset to [] and the previous state is lost. The same issue occurs if I navigate deeply into the Settings Page (e.g., to a Settings Page Child view), switch to the Home Page, and then return to the Settings Page: the navigation state for the Settings Page is lost, and it reverts to the root of the NavigationStack. Why is this happening and how can I fix it so that switching pages in the sidebar doesn't reset the NavigationStack of each individual page in the detail column
0
0
280
Aug ’25
Reply to "viewForTableColumn" vs "objectValueForTableColumn"
You can't do that. A table view is completely view-based or completely NSCell-based, and cannot be a mixture of the two. If you implement the tableView:viewForTableColumn:row: delegate method, the table view is view-based.>> If I create all columns (6) in IB, it works very well but I do not know the number of columns which I shall need.Create a table with 6 columns, then programmatically remove the columns you don't need. This is much easier than creating a table with 2 columns and adding more.
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’18
Reply to coloumn
In Interface Builder (in your storyboard or XIB), select the table and look at its Attributes inspector. You will see that there are controls for resizing behavior. If you want the first or last column to grow, just choose the appropriate option.If you want just the middle column to resize, it takes a trick. In the table view, set it to resize all columns. Then, select the columns individually, displaying the Size inspector. For columns that you don't want to resize, uncheck the 2 checkboxed that allow column resizing. For the column you want to resize, leave the boxes checked.Incidentally, it's not a 4th column you're seeing. It's just a view background showing through between the right edge of the table view, and the right edge of its parent scroll view.
May ’17
CollectionViewCell switch back to single column once UImage is assigned
Hi I am building a simple multi column CollectionView here and trying to add 3 cell in a row. Well, in short the column and rows looks all fine if I comment the below code. which is no image and text assigned to cells. let framework = list[indexPath.item] cell.configure(framework) However, once uncommented, only a single cell is displayed per row and the image doesn't seem to be resizing automatically. Can you please advise. Below is the ViewController. import UIKit class FrameworkListViewController: UIViewController { @IBOutlet weak var collectionView: UICollectionView! let list: [AppleFramework] = AppleFramework.list override func viewDidLoad() { super.viewDidLoad() collectionView.dataSource = self collectionView.delegate = self } } extension FrameworkListViewController: UICollectionViewDataSource { func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return list.count } func collectionView(_ collectionView: UICollectionView, cellForItemA
Topic: UI Frameworks SubTopic: UIKit
1
0
52
May ’25
Swiftui Table statement conditional table columns
Is it possible to have conditional table columns for a swifui Table statement? Like for this code TableColumn(Image) { artPiece in if let imageData = artPiece.artImage.first, let image = UIImage(data: imageData!) { Image(uiImage: image) .resizable() .frame(width: 50, height: 50) } else { Image(systemName: photo) .resizable() .frame(width: 50, height: 50) } } .customizationID(Image) TableColumn(Name, value: .artName) .customizationID(Name) TableColumn (Art ID, value: .artPieceID) { artPiece in Text(String(artPiece.artPieceID)) } .customizationID(Art ID) have a conditional TableColumn for this part of my SWIFTDATA model var artDefinedFields: [ArtDefinedFields] = [] or if I change the variable string array to this var artDefinedFields: [ArtDefinedFields] = Array(repeating: ArtDefinedFields(), count: 10), initialize the array with None and only create a TableColumn when there is aArtDeginedFields value other than None
3
0
654
Aug ’24
Two column SplitViewController side-by-side in regular size class
Hello, I configured a SplitViewController in Storyboard. Master and detail controller are each connected to a separate NavigationController that each has a separate TableViewController as root view controller. The master view controller is connected to the detail view controller to show detail in the segue. In code i set preferredDisplayMode = .allVisible to always show master and detail view controller side-by-side in regular size class. That worked well in iOS 13. Now, using latest iOS 14 beta the initial view shows the detail view controller instead of master even in regular size class only one view controller is shown at the same time. In Storyboard Two Columns is selected and i set One Column Beside as Display Mode and Tile as Behavior. Unfortunately that didn't help to restore the behavior as in iOS 13.
1
0
792
Aug ’20