Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

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
Reply to [NSSavePanel savePanel] crashes with NSInternalInconsistencyException
>> [NSSavePanel(FileBrowserViewFileBrowserView) _makeFileBrowserView]Historically, NSavePanel has had trouble with its column view, trying to display a file preview in the last pane, and your crash appears to be happening during the setup of this preview.Does the problem go away completely if you switch to list or icon view? Does the problem tend to occur with a particular file, or particular kind of file, selected in column view? If so, this preview issue may be the cause, and it may be outside your control.
Topic: UI Frameworks SubTopic: AppKit Tags:
Aug ’17
The playground project for the Swift tour no longer displays the output in their right column. This was working prior to upgrading to the lasted Xcode version...
Prior to updating to the latest Xcode version, I was able to use the Swift Tour playground project, which included showing output an variable values in the far right column. Now with Swift 2, this information no longer is displayed. Is there a setting or flag that needs attention?Thanks...
1
0
702
Jan ’16
Reply to Tokenupdate
Hi,if you're storing the tokens in a database (e.g. MySQL) you can set the SQL UNIQUE constraint for the column containing the tokens; this prevents a token from being stored twice. The UNIQUE constraint exists in MySQL, SQL Server, Oracle and MS Access databases. The following SQL statement creates a UNIQUE constraint on the 'Token' column when the DeviceInformation table already exists:ALTER TABLE DeviceInformation ADD UNIQUE (Token)All the best,Alex
Jun ’15
Reply to NSTableView: dynamic columns
I think its OK noew, but it was a big amount of workFirst I convert to Swift4, and it was not a peace of cake.Then, lucky me, I don't know the number of columns of my NSTableView, but tthey are all of the same type.So I put a prototype of this NSTextfielCell in the window's XIB, and subclass the makeView method to call the extra columns cells with the proper cell identifier written in the XIBMy brain brain hasn't shut down, but it was closeThank's
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’17
Reply to Illegal NSTableViewDataSource
Do you create the tableView in IB ?If so, look at hierarchy of objects in IB for the viewController.Should haveView ScrollView ClipView TableView Column1 => That's the identifier you use TableCellView => That's the identifier you have to use TableViewCell Column2Do you get this ?Then set the identifier for the tableViewCell (if you have multiple columns, if they use the same cell prototype, just need to define once.Note: you could also give the same identifier for each column and its tableCellView (not the TableViewCell !) and keep using your code.To check the problem is caused by the identifier, add a print:extension RegistrationReportsViewController: NSTableViewDelegate { func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if tableColumn == nil { return nil } // Extra safety if let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView { let column = tableView.tableColumns.firs
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’20
Reply to Xcode Build Failure
@darkpaw: I have included snippet of my code below as reference. The 'width' parameter can be changed later ... However, same error would still show up: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions ... struct ViewShelter: View { // TH: helps safely update UI. @State private var rowEven: Bool = true @State private var pathBlocked: Bool = true @State private var borderColorBackEnd: Color = Color.black @State private var borderColorBackEndOperation: Color = Color.black var body: some View { VStack (alignment: .leading){ ForEach(0...(ViewConstants.TARGET_STRING_BACK_0_DIMENSION-1), id:.self) { row in if let row_x = shelterViewModel.getShelter(row: row) as [RecommendationEntity]? { if let row_x_count = row_x.count as Int? { if row_x_count > 0 { let row_x_columns = Array(0...row_x_count-1) GeometryReader { geometry in HStack(alignment: .center) { ForEach(row_x_columns, id:.self){ column in self.rowEven = (row%2==0)
Apr ’25
Reply to Question About Swift
So you're making the columns wider as necessary? That's a bit of work, as you've seen, to compute the widths. What happens if a name has a million characters? So, there is more to think about here.A simpler approach is to keep the column widths, but then you can't show all the data. So, what can you show instead? You can solve the crashing problem by only showing as much data as fits, but that's going to be misleading to anyone using the table.Either way, solving the problem takes a bit of analysis and planning.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’18