Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to Using a .plist to populate a tableView
In a database, which is what you are talking about, at least conceptually, rows are all identical. What you are talking about is adding a new column. Each column is unique.A table view just displays a grid (organized in rows and colums) from an array. Where you get the array data from or what you do with the array data is a separate issue. You can definitely use a plist to start with.In a table view, you normally don't do that kind of specific row checking for data. You just dump the data in an array and the table displays it all.
Feb ’19
Reply to App Store doesn't display English among available languages for my new app
Localizable.xcstrings is a string catalog, and so you are good. Do you localize the English column for your string catalog then? If not, Xcode will not generate the en.jproj for you. You can check with the following steps: Select Localizable.xcstrings in Xcode Project Navigator to show string catalog view. Select English to show the English localization. There, if the rows in the English(en) column are all grayed, Xcode won't generate the localization folder for you. So make sure you have at least one key localized. Best, —— Ziqiao Chen  Worldwide Developer Relations.
1w
Reply to UISwitch in tvOS
I wish I could post screenshots. Basically I have a Settings dialog in my app that uses a bunch of yes/no switches. I put all the options in a column from top to bottom: MUSIC: ON/OFF, REDUCE MOTION: ON/OFF, etc. All of the ON/OFF switches are done as UISegmentedControllers, but the catch is that you can't move focus horizontally with those, or it changes the switch's on/off value. But, you can move up and down, so I simply put all those settings in a column so the user only has to move up/down to select the setting that they want to change.-Brian
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’15
Reply to How to remove all columns from NSOutlineView?
Hmm, interesting.In the scenario you describe, I think I'd be inclined to try replacing the entire sub-hierarchy from the scroll view. Specifically, I'd put a starter outline view (along with its scroll view) in a nib, and load the nib each time I wanted a fresh start on the outline view.(I'm not a big fan of creating UI elements programmatically, but you could create this sub-hierachy in code, too.)The other choice would be to never remove the outline column, but just reconfigure it for your new column layout.
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’18
Reply to Apple News landscape mode gone in iOS 12?
I'm a lefty and have this nifty workaround. After opening News in landscape, slide up the Dock and drag a second app to the right third of the screen. This will switch to Split View with News using the left two-thirds of the screen, showing only news items (no channel list). The result is you can scroll the news with your left thumb.As a bonus, I put the App Store on the right side, so it appears as a single-column list (which I like much better than the messy two-column scheme).
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’18
Reply to Xcode Build Failure
The error: The compiler is unable to type-check the expression in real-time generally means you're trying to do too many things in one place, and you should break it down a little. Firstly, to make it more readable, I'd put brackets around each ternary expression, for example: (row %2 == 0 ? Color.blue : Color.orange) so you can see which bits are enclosed. Then I'd split it out like this, creating a let for the various bits so they're individually evaluated prior to the larger expression. Also, I'd indent the code so it's more readable, putting the positive on the first line, and the negative on the next line, indented: let borderColor1 = (row %2 == 0 ? Color.blue : Color.orange) let borderColor2 = (shelterViewModel.getShelter(row: row, column: column).productId = ViewConstants.LAYOUT_DUMMY_ID ? Color.yellow : Color.green) .border( (shelterViewModel.getShelter0perationFormat() ? borderColor1 : (locationViewModel.getLocation(row: row, column: column) ? Color.red : borderCol
Apr ’25
Reply to NSTableView: dynamic columns
So, back to what I said before. When you have a cell in a XIB file, you must register the name of the XIB using NSTableView's register(_:forIdentifier:) method before is populated with data. This is typically done in some viewDidLoad method.In your particular scenario, the difficulty comes from managing the cell identifier property, which controls the reuse of existing cells. In your tableView(_:viewFor:row:) method, it doesn't actually matter what your table column identifier is, so long as you use it to choose a cell with a suitable cell identifier. The default is to have them match, because it's easier to keep track of them that way, but it doesn't have to be so.However, in that delegate method, when you invoke makeView(withIdentifier:owner:) specifying a cell identifier that has your XIB file registered against it, the actual cell must have that same identifier. (Otherwise, the documentation says, makeView(withIdentifier:owner:) will return nil.) In case you're keeping track, we're now up to 3 fl
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’17
Reply to macOS SwiftUI Table with contextMenu
Did you try to use GeometryReader ? GeometryReader { geometry in NavigationView { Table(items, selection: $selection, sortOrder: $items.sortDescriptors) { TableColumn(Column 1) { Text(Item at ($0.name!)) .contextMenu { Button(action: {}) { Text(Action 1) } Divider() Button(action: {}) { Text(Action 2) } Button(action: {}) { Text(Action 3) } } } TableColumn(Column 2) { Text($0.id.debugDescription) } } .frame(width: geometry.size.width, height: geometry.size.height) // Need to adapt the correct frame to the width of column1
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Instruments: what is static AppName.$main() [inlined]
I submitted FB12211784 the end of May. It contains a do-nothing-much app that creates a two column table of 10K entries. Selecting an item in the table causes the color of the text in the first column to change. On my 2019 intel iMac there is about a 140 msec delay between selection and the color change. That is noticeable. I just re-ran the code using a brand new Mac Studio with M2 Max. It still takes over 100 msec. Still noticeable.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’23