I found that the difference in the Simulator View vs Preview is different in the recreated App also. I am using a Color Extension which may be reason. I will have to look at that also.
Rebooting my Mac got rid of the ghost Error Message. I am assuming that it is some kind of cache issue. Restarting XCode did not resolve, so maybe the mac was caching the file
Still have the issue with the Preview IPad NavigationSplitView having different colors than in my Preview Window.
Here is the Code Segement
var body: some View {
NavigationSplitView(columnVisibility: .constant(.doubleColumn)) {
VStack {
Form {
Section(header: Text("Admin Matainence").foregroundStyle(Color.theme.red).font(.subheadline)){
List {
NavigationLink("Leagues", destination: SchemaDetail(schemaName: LeagueCategory.leagues, displayCategory: DisplayCategory.full))
NavigationLink("Sessions", destination: SchemaDetail(schemaName: LeagueCategory.sessions, displayCategory: DisplayCategory.full))
NavigationLink("Format", destination: SchemaDetail(schemaName: LeagueCategory.formats, displayCategory: DisplayCategory.full))
NavigationLink("Divisions", destination: SchemaDetail(schemaName: LeagueCategory.divisions, displayCategory: DisplayCategory.full))
NavigationLink("Teams", destination: SchemaDetail(schemaName: LeagueCategory.teams, displayCategory: DisplayCategory.full))
NavigationLink("Players", destination: SchemaDetail(schemaName: LeagueCategory.players, displayCategory: DisplayCategory.full))
NavigationLink("Match", destination: SchemaDetail(schemaName: LeagueCategory.matches, displayCategory: DisplayCategory.full))
NavigationLink("Game", destination: SchemaDetail(schemaName: LeagueCategory.games, displayCategory: DisplayCategory.full))
NavigationLink("Score Sheet", destination: SchemaDetail(schemaName: LeagueCategory.scoreSheets, displayCategory: DisplayCategory.full))
NavigationLink("Test Data", destination: DivisionSessionTeamsTournamentsView())
}
}
//.backgroundColor(.gray)
}
//.foregroundColor(.theme.accent)
}
.navigationTitle("Wildcards Admin")
.padding()
//.background(Color.theme.background)
} detail: {
}
// Balanced Style keep sidebar open
.navigationSplitViewStyle(.balanced)
}
}
#Preview {
ContentView()
.environment(ApplicationData())
}
so on the simulator the List Row Background is red
on the preview it is a gray color.
The Toolbar in both the simulator and preview have the red color on the toolbar icons.
If I do not get a response by Friday, I will have to just live with it.
I am closing this issue, as I am new to working with the NavigationSplitView on the Mac.
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: