Search results for

column

2,052 results found

Post

Replies

Boosts

Views

Activity

Reply to UITabBarController as secondary controller in UISplitViewController is producing 2 navigation bars in compact view
When using the column based split view controller, it presumes that clients want a navigation controller in each of its non-compact columns and will wrap a view controller in one of not provided. This is primarily so that collapsing (when it moves from multiple to single column) behaves deterministically and automatically. So what is happening is you're getting a tab bar controller wrapped in a navigation controller with additional navigation controllers inside – and thus double navigation bars. Realistically this may be a case where you want to create your own custom view controller container instead of using UISplitViewController, as I'm not sure how many of the edge cases you would hit might be resolved.
Topic: UI Frameworks SubTopic: UIKit Tags:
Oct ’23
Reply to UITabBarController is unsupported as viewController
I just ran into this too. The way I was able to get around it was to edit the SplitViewController in the storyboard and set the Style to 'Unspecified'. I think this is the 'classic' mode for SplitViewControllers, as opposed to the 2-column vs 3-column styles that Apple is now encouraging. I think maybe the Build For iPad WWDC video explains the roadmap for where SplitViewControllers are going. We will all eventually have to rethink how our UI's work.
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’20
Reply to How to remove all columns from NSOutlineView?
I don't understand the question. Under what circumstances would it be useful to get rid of all columns?>> in case the NSOutlineView has an outline table columnThis is not a case in any reasonable sense. The defining feature of an outline view is that is has an outline column.What's the exact error message you got from trying to use removeTableColumn: on the outline column? I wouldn't be surprised (as an unrelated issue) if the error message is incorrect for historical reasons.
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’18
Reply to More info on restore state between split and tab hierarchies needed please
For the UISVC behavior: Use the delegate methods, -splitViewController:topColumnForCollapsingToProposedTopColumn: and splitViewController:displayModeForExpandingToProposedDisplayMode: to set up which vc's are displaying the data. Just return the value that's proposed (presuming that's what you want—if you have set a vc for the compact column, the compact column will be proposed for the collapse). If you want to reparent view controllers at that time, be careful. In the long run, it's probably easier to have separate vc instances.
Topic: UI Frameworks SubTopic: General Tags:
Jun ’20
Reply to DATA
You can export a CSV file and have something sort of like this. While that’ll work, if you’re doing anything serious with CSV files I strongly recommend that you check out the TabularData framework. See the code snippet below. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com import Foundation import TabularData let csv = Aloe Vera, skin healer, Cut from middle, once every three days, cut the leave and use the gel inside for your rash Almond, skin healer, cut the young leaves, daily, soak in water overnight rinse and blend func main() throws { var options = CSVReadingOptions() options.hasHeaderRow = false let frame = try DataFrame.init(csvData: Data(csv.utf8), options: options) print(frame) // ┏━━━┳━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳… // ┃ ┃ Column 0 ┃ Column 1 ┃ Column 2 ┃… // ┃ ┃ ┃ ┃ ┃… // ┡━━━╇━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇… // │ 0 │ Aloe Vera │ skin
Aug ’22
Reply to How do I create a tableview with a variable number of columns where the extra columns have checkboxes in them?
Your reply was quite helpful and I quit trying to figure how to get bindings working with this. Too much behind the scenes magic wasting my time.Once I knew I was looking for a solution avoiding bindings, I found a couple gems in the TableViewPlayground sample code that I am pretty sure are not explicitly mentioned in the documentation. Below are details of what I had to do to get a tableView operating without bindings, which IMO, is far easier than bindings once you are aware of the process.VERY IMPORTANT KEYS to building View based DATASOURCE TableViews1. USE BASIC UI items (NSButton), NOT NSTableCellView2. Contrary to #1, you can use NSTableCellView for TextFields, imageViews IF... see below.3. Add your basic UI Items directly to the NSTableColumn, delete provided the NSTableCellView.4. Carefully implement tableView:inTableView viewForTableColumn:inTableColumn row:inRow.Maybe (probably) I am blind, but I trusted the default mechanisms in Interface Builder regardingbuilding tables. Well, they are probably a
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’17
Reply to Illegal NSTableViewDataSource
You use it here : if let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView {if I have different cell prototypes for each colum, then I create an identifier for each.extension RegistrationReportsViewController: NSTableViewDelegate { func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if tableColumn == nil { return nil } // Extra safety var cellIdentifier = var cellContent = let registration = fetchedResultsController.fetchedObjects! [row] let column = tableView.tableColumns.firstIndex(of: tableColumn!)! switch column { case 0: cellContent = registration.lastName ?? cellIdentifier = CellIdLastName // The one you give in IB of course case 1: cellContent = registration.firstName ?? cellIdentifier = CellIdFirstName // Take care of uppercases case 2: cellContent = registration.middleName ?? cellIdentifier = CellIdMiddleName default: break } if let cell = tableView.makeView(withIdentifier: N
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’20
Reply to How to use combo box cell in a tableView
I get an error when I added the following statement NSComboBoxCell.delegate = self The error was no delegate member for NSComboBoxCell.. So, I created a new test project which had a single view and a tableView that I added a comboBox to one of the columns without trying to use a datasource, I expected to see Item 1, Item 2 .. etc. in the column, but again nothing. Also, the comboBox is editable. There must be something basic I am missing. Still looking for an example..
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’21
Reply to UILabels of three UIPickerViews revert to previous value (sometimes) and change without selection.
I downloaded the file and the pickers show on a iPhone 7 + device, a simulator iPhone Xr, and every other simulator tested in xcode 10.3. iPad Air is the best to show the below situation. The values in the pickers are value 1 or value 2, and can be changed with three fingers in the simulator.| Value 1 | nothing | Value 1 | Value 1 |-- -- -- -- -- -- --- -- -- -- -- --- -- - -- --- - - -- -| Initial text 1 | nothing | Initial text 3 | Initial text 4 |I also see the contraint errors, but there is nothing fatal or overriding the collection view size for item method (pickers are shown - maybe it is not clear that they are pickers because the text is similar to the other labels.As above, if I use the picker in the first column to select value 2, the data in that column updates, but the picker itself reverts to its former value - Value 1 - and the picker in the third column changes its display to Value 2 (no change to the data in that column).| Value 1 | nothing | Value 2 | Value
Topic: Programming Languages SubTopic: Swift Tags:
Aug ’19
Reply to ScrollView and prefersDefaultFocus currently incompatible?
And here is the working solution for tvOS 15: struct ContentView: View { @FocusState var focusedItem: String? @State var items = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] let columns: [GridItem] = Array(repeating: .init(.flexible()), count: 4) var body: some View { ScrollView() { LazyVGrid(columns: columns) { ForEach(items, id: .self) { item in Button { } label: { ItemView(title: item) } .focused($focusedItem, equals: item) .onMoveCommand { moveCommandDirection in guard let index = items.firstIndex(where: {$0 == item}) else { return } if moveCommandDirection == .down, index >= items.count - columns.count { focusedItem = items.last } } .padding(.bottom, 8) } } } } } If you have any workaround for tvOS 14 I'll be appreciated it.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’22