Thursday, January 11, 2024
HomeiOS Developmentios - How one can entry the second and third factor in...

ios – How one can entry the second and third factor in Swift


Hi I want to show the highest three participant’s rating however the next codes doesn’t work despite the fact that the primary factor will be accessed. That will be nice if you happen to may assist. Thanks.

struct ContentView: View {
    
    @Question(kind: PlayerItem.playerScore, order: .reverse) var playerItems: [PlayerItem]
    }
var physique: some View {

// this works 
Textual content("Your greatest rating : (playerItems.first?.playerScore ?? 0)")

// this doesn't works 
Textual content("Your second greatest rating: (playerItems.second?.playerScore ?? 0)")

// this additionally doesn't works 
Textual content("Your second greatest rating: (playerItems.second?.playerScore )")

// this additionally doesn't works
Textual content("Your second greatest rating: (playerItems[1].playerScore )")



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments