Search results for

column

2,047 results found

Post

Replies

Boosts

Views

Activity

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
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
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
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
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.2k
Oct ’17
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
250
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
NSTableView binding, column Header Title is readonly, workaround or alternative?
I am currently working on a MacOS project (Swift 4, Xcode 9) to shows different sets of data in one NSTableView, users can add, delete, and move around their created data sets, and everything is bound to core data through two array controllers via the NSTableView's bindings inspector sections (one to many between the column data entity and title/presets entity)Unfortunately, the Header Title binding seems to be in the Column -> Binding inspector -> Parameter section, and is read only (based on Apple documentation).https://developer.apple.com/library/content/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSTableColumn.html#//apple_ref/doc/uid/NSTableColumn-SW48As I've also implemented a custom TableHeaderCell class that allows the editing of the column's Header titles (field editor call in the NSTableView double click method), even if the cell is updated via the custom class, the header title binding will not update the array controller or core data.Custom NSTableH
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
1.1k
Oct ’17
Reply to How to frozen a few columns for NSTableView
In the Width inspector (Command-Option-5), set the column's width, minimum and maximum all to the same value.Then, in the Attributes inspector for the table, make sure the Column Sizing menu is set to something other than First Column Only, depending how you want the rest of the columns to resize.
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’16
Apple News Format 2 column container with different widths
https://developer.apple.com/documentation/apple_news/collection_display#see-alsoHi, I have a container using the following with a nested image and text component that both take 50% of the width of the container which is great for mobile, but for tablet, I'd like to be able to specify the maxwidth of only the image so that it takes 30% or a column span of 3 for larger displays. Does anyone know how to achieve that type of layout?contentDisplay: { type: collection, gutter: 15, rowSpacing: 30, distribution: wide, variableSizing: true }thanks!
0
0
612
Oct ’18
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
623
Aug ’24
Reply to Hide/Show tableview columns?
Did you already succeed to hide only the current column ? You should use func tableView(NSTableView, mouseDownInHeaderOf: NSTableColumn) Which tells the delegate that the mouse button was clicked in the specified table column’s header. Note: do you intend to do multiple selection in the popup ? May be not the best UI option. Why not a popover where to select the columns ? In this func, you can test for right click before calling popup. To change width of a column: let zeroWidth = 0.0 self.tableView.tableColumns[column].width = zeroWidth
Aug ’20
Reply to Safari does better than Firefox, but better isn’t good.
Another issue: If --count is set to 1 as result of round: --count: calc(round(down, calc(sqrt(var(--images))), 1) + 1); grid-template-columns: repeat(var(--count), 1fr); grid-template-columns: 1fr; isn’t the same (in Safari)! The first line results in 2 columns, not in one! Looks like the same reason. Because grid-template-columns: repeat(calc(var(--count) -0.01), 1fr); gives one column.
Topic: Safari & Web SubTopic: General Tags:
May ’23