Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to Football League calendar display view
Dear @darkpaw, I've done exactly what you suggested and got pretty good results from a data retrieval point of view (I'm displaying correctly the four football league days with the proper teams and results). Here below the code modification I've done: import SwiftUI struct CalendarioView: View { @State var Calendario: [CalendarioPartite] = CalendarioPartite.testCalendario() @State var stagione: String = 2023/2024 @State var totalePartite: Int = 4 private var giornate = Array(1...4) private let adaptiveColumn = [GridItem(.adaptive(minimum: 1500))] var partiteCampionato: [CalendarioPartite] { CalendarioPartite.testCalendario().filter{ $0.stagione == stagione } } var body: some View { ScrollView(.vertical) { LazyVGrid(columns: adaptiveColumn, spacing: 20) { ForEach(giornate, id:.self) { giornata in // Inizio schermata Giornata VStack { var partiteGiornata: [CalendarioPartite] { partiteCampionato.filter { $0.giornata == giornata } } Text(Giornata (giornata)) .fontWeight(/*@START_MENU_TOKEN@*/.bold/*@END_
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to Failed to product diagnostic error
I think the main error comes from a missing NavigationStack in RosaView. And you should have rosa In addition, I had to test on an iPad in order for Table to show columns names and all columns (see here: https://stackoverflow.com/questions/75277014/swift-table-only-show-1-column) Finally, I made a few changes before it works ok. Please test and tell if that works for you, otherwise, explain what is failing. struct Rosa: Identifiable, Codable, Hashable, Equatable { var id = UUID() let stagione: String let nomeGiocatore: String let cognomeGiocatore: String let nascitaGiocatore: String let etàGiocatore: Int let ruoloGiocatore: String init(stagione: String, nomeGiocatore: String, cognomeGiocatore: String, nascitaGiocatore: String, etàGiocatore: Int, ruoloGiocatore: String) { self.stagione = stagione self.nomeGiocatore = nomeGiocatore self.cognomeGiocatore = cognomeGiocatore self.nascitaGiocatore = nascitaGiocatore self.etàGiocatore = etàGiocatore self.ruoloGiocatore = ruoloGiocatore let
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to Compatibility Inquiry: 8BitDo Ultimate 2.4G Wireless Controller on macOS
I do not believe Firefox, Google Chrome, or other Chromium-based browsers use the native macOS Game Controller framework. As such these browsers must add support for gamepads individually, and Nintendo controllers are popular enough that they get supported by all. If you are running macOS Sonoma, you can try turning on the 'Increase controller compatibility' option for your 8BitDo Ultimate 2.4G Wireless Controller. Open the system Settings app, navigate to the Game Controller settings, click on your 8BitDo Ultimate 2.4G Wireless Controller in the list, use the (+) button at the bottom of the left column to add app-specific customizations for Firefox/Chrome, and toggle ON the 'Increase controller compatibility' switch. This will result in the 8BitDo Ultimate 2.4G Wireless Controller appearing as an Xbox controller to Firefox/Chrome, if Firefox/Chrome support Xbox controllers.
Topic: Graphics & Games SubTopic: GameKit Tags:
Mar ’24
DataFrame's Column doesn't support array of dictionary
I'm following Apple WWDC video (https://developer.apple.com/videos/play/wwdc2021/10037/) about how to create a recommendation model. But I'm getting this error when I run the project on that like of code from their tutorial. Column keywords has element of unsupported type Dictionary. Here is the block of code took from the transcript of WWDC video that cause me issue: func featuresFromMealAndKeywords(meal: String, keywords: [String]) -> [String: Double] { // Capture interactions between content (the dish keywords) and context (meal) by // adding a copy of each keyword modified to include the meal. let featureNames = keywords + keywords.map { meal + : + $0 } // For each keyword, create an entry in a dictionary of features with a value of 1.0. return featureNames.reduce(into: [:]) { features, name in features[name] = 1.0 } } var trainingKeywords: [[String: Double]] = [] var trainingTargets: [Double] = [] for item in userPurchasedItems { // Add in the positive example. trainingKeywords.append( featur
4
0
1.1k
Jan ’24
How let scroll event 'sink' to parent view?
I have an uncommon scenario here. outer tableview +--------------------------+ | column 1| inner tableview| +--------------------------+ Now most often the out tableview has many rows and vertical scrollbar visible. When user try to scroll vertically in the inner tableview but it has no vertical scrollbar (because it has only a few items), I want the scroll event sink into its parent view or better outer tableview, so that user does not have to move cursor to first column in outer tableview and scrolls. Is this possible?
1
0
846
Mar ’24
Very old CoreWLAN bug?
With the deprecation of the airport binary in macOS 14.4 I am re-writing my own network tool to directly use CoreWLAN. In doing this and testing and comparing to previous results from the Apple airport binary under various versions of macOS I believe CoreWLAN has a 'bug' which as a result was exhibited in the Apple airport binary and equally my own code. As detailed below. This applies to the release version of macOS 14.4 (23E214) macOS Sonoma 14.3.1 and previous versions of macOS going back many, many years have included an official Apple binary at the following location. /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport Whilst this is now officially deprecated in macOS 14.4 it is obvious that this tool will have itself been utilising the official Apple framework CoreWLAN. As part of the process of re-writing my own tool which formerly used the above Apple binary, I have re-written my tool to directly utilise CoreWLAN myself via the Objc interface. In doing this I have been
3
0
1.2k
Mar ’24
iOS 16.1 Crashes when scroll (LazyVStack and LazyVGrid)
Code to reproduce: struct CrashView: View { var body: some View { ScrollView { LazyVStack { ForEach(0...100, id: .self) { i in LazyVGrid(columns: Array(repeating: .init(.fixed(100)), count: 3), content: { ForEach(0...20, id: .self) { i in Color.red.opacity(Double(i + 1) / 20).frame(height: 300) } }) } } } } } Important: it crashes on iOS 16.1 !!! We have 21 grid item (3 item and 7 full lines) for every LazyVStack item. Scroll it until 5 LazyVStack item. Start scrolling to top. It blinks and show incorrect count: you see that it shows 1 item in line, but it is impossible. If you continue scrolling app crashes.
23
0
6.2k
Nov ’23
Help with a script to automate data entry
I am trying to write a script that will perform an operation in Numbers document TEST on sheet GAMES (it’s a bunch of random number generations for a game show simulator) look at the output in cell B66 of that sheet, output it in cell B3 on another sheet called TRIALS2 then perform the operation again and output the new result on sheet TRIALS2 in cell B4 and so on for 2000 repeats. Here’s the script I have but I get an error message. The document is open and I have confirmed all the document and sheet names are correct. There is definitely something in cell B66 of Sheet GAMES in document TEST. What am I missing? tell application Numbers activate tell document TEST repeat 2000 times tell sheet GAMES set inputValue to value of cell B66 end tell tell sheet TRIALS2 set table1 to table 1 set outputColumn to column B set nextRow to (get cell (3 + (count of rows of table1)) of outputColumn) set value of nextRow to inputValue end tell end repeat end tell end tell Here is the error message: error Numbers got
2
0
871
Mar ’24
Reply to Help with a script to automate data entry
It would be much easier to debug if you provided your document, your explanation of what you are trying to achieve is not super clear to me. I assume you start with no data in sheet 2 and you don't care that I'm overwriting data in sheet 2 - is this true? Anyway, please go through this code and read the comments. It takes maybe 2-3 minutes on my computer to finish the script. tell application Numbers activate -- the following code is just to show you how do I think your document looks like make new document tell front document -- there should already be one sheet, let's rename it to GAMES set name of active sheet to GAMES -- create sheet TRIALS2 -- this should also create table 1 make new sheet set name of active sheet to TRIALS2 -- making sure table 1 has at least 67 rows, otherwise we cannot access row 67 if (row count of table 1 of sheet GAMES < 67) then set row count of table 1 of sheet GAMES to 67 end if -- making sure table 1 has at least 2 columns, otherwise we cannot access column
Mar ’24
Context Menu Destructive Actions, SwiftUI
I'm trying to add a delete action in a context menu, however it just gets displayed as the default black color. The Photos app uses a red color for its delete action as well. I've seen in some spaces online that this is not a functionality currently provided of contextMenu, however I have also seen it used in third party apps in the wild from developers such as Steve Troughton-Smith in his Broadcast app (It's not letting me link to his tweet, however he has a video showing a red item in a context menu). Does anyone know how to accomplish this? Also, looking on Apple's documentation - https://developer.apple.com/documentation/swiftui/contextmenu for contextMenu it says that they have been deprecated for everything except for macOS. I find it strange that they deprecated it just one year after introducing it. Was this replaced by another component that I should be using? var body: some View { ttttScrollView { ttttttLazyVGrid(columns: columns, spacing: 20) { ttttttttForEach(photos) { photo in t
7
0
4.4k
May ’22
Reply to What's the unit in NSView coordinate system
Maybe my question is too general. I have a need to calculate all width of an NSTableView. However, I found that total width of all columns is far less than NSTableView.bound.width: let width = tableView.tableColumns.reduce(0) { ac, col in ac + col.width } print(width, tableView.bounds.width) This is true even I manually adjust last column so that it fills the gap between the column and tableview right border. -----------| <- table right border last column| -----------| So I assume NSTableColumn.width and NSView.bounds.width are using different units.
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’24
Sorting of isometric SKTileMapNode incorrect?
Im programmatically using SKTileMapNode. The code is C# (Xamarin.iOS) but should be readable by every Swift/ObjC developer.The problem is that the sorting of tiles in isometric projection seems to be incorrect and I cannot see why. To test, the map has 1 row and 5 columns. See the screenshot:https://dl.dropboxusercontent.com/u/111612273/SVhjD.pngThe tiles at 0|0 and 2|0 are in front of the others. The pyramid styled tile at 4|0 however, is drawn correctly in front of the one at 3|0.I'm using two simple tiles: The first one has a resolution of 133x83px and the second one is 132x131px:https://dl.dropboxusercontent.com/u/111612273/bcIvP.pngandhttps://dl.dropboxusercontent.com/u/111612273/wzCZV.pngThis is what it looks like in Tiled and what I am trying to reproduce: https://dl.dropboxusercontent.com/u/111612273/66G6p.pngThe tile map is setup and added to the scene using the following code:var tileDef1 = new SKTileDefinition (SKTexture.FromImageNamed (landscapeTiles_014)); var tileDef2 = new SKTileDefini
7
0
2.1k
Jul ’23
Reply to CFBundleShortVersionString of an app extension must match that of its containing parent app
Xcode 15 does not show Version and Build settings for app extensions in Project > Targets > target > General any more. In Xcode 14 I have been manually changing those versions to keep them in sync (and avoid warnings or errors). Moving the setting from target level to project level as suggested by Eskimo from Apple fixed the problem (and simplifies the workflow so that I do not need to manually keep the versions in sync). How to move the settings? Go to Project > main target > Build Settings. Enable Levels. Enter CURRENT_PROJECT_VERSION into Filter. Edit the value for the project level (double click on the empty value in the project column). Remove the value for the main target level (single click the value in the target column, press Delete key on keyboard). Similarly for the MARKETING_VERSION. Enter it into Filter, enter the value for the project level, remove it from target level. Then, for each app extension target (Project > an app extension target > Build Settings)
Topic: App & System Services SubTopic: General Tags:
Mar ’24