In a List where I have a ForEach works fine for iOS 14 real device and in the simulator when I tap a row that shows detail but not with my iPhone X with iOS 15. Other iPhone X with iOS 14 is showing the right detail from the selection.
macOS Big Sur
Xcode 12.5.1
Here is the code:
@ObservedObject var teamStore = TeamStore()
@State private var showDetail = false
@State private var viewState = CGSize.zero
NavigationView {
List {
ForEach(teamStore.teams, id: .id) { team in
Section(header: Text(getLocalizedTeam(team))) {
ForEach(team.ringer) { wrestler in
Button(action: {
showDetail.toggle()
}, label: {
WrestlerRow(wrestler: wrestler)
})
.sheet(isPresented: $showDetail, content: {
WrestlerDetailView(wrestler: wrestler)
})
} //: FOREACH
} //: SECTION
} //: FOREACH
} //: LIST
...
When I build and run on my iPhone X with Xcode Version 13.0 beta 5 (13A5212g) the same issue and the text foreground color is in blue.
Thanks for suggestions
Regards Berkant
Post
Replies
Boosts
Views
Activity
How can I change an iOS app which is written in Swift 5 in UIKit and is already in App Store, to SwiftUI?
Thanks for your answer.
Best regards,
Berkant