From da46cf2449b7c4a26b612da0721f45e66bdcea13 Mon Sep 17 00:00:00 2001 From: Fernando Martin Garcia Del Angel Date: Wed, 19 Feb 2020 17:43:25 -0600 Subject: [PATCH] Modified problematic views to conform to Dark Mode Dark Mode ready app --- FlinkChallenge/FlinkChallenge/Views/CardView.swift | 2 +- .../FlinkChallenge/Views/CharacterDetailView.swift | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/FlinkChallenge/FlinkChallenge/Views/CardView.swift b/FlinkChallenge/FlinkChallenge/Views/CardView.swift index 9bf47b2..7e16380 100644 --- a/FlinkChallenge/FlinkChallenge/Views/CardView.swift +++ b/FlinkChallenge/FlinkChallenge/Views/CardView.swift @@ -36,7 +36,7 @@ struct Card: View { }.padding(.horizontal) }.padding(.bottom) - .background() + .background(Color.systemGray6) .cornerRadius(10) .shadow(radius: 5) } diff --git a/FlinkChallenge/FlinkChallenge/Views/CharacterDetailView.swift b/FlinkChallenge/FlinkChallenge/Views/CharacterDetailView.swift index 97d484e..7b59f5d 100644 --- a/FlinkChallenge/FlinkChallenge/Views/CharacterDetailView.swift +++ b/FlinkChallenge/FlinkChallenge/Views/CharacterDetailView.swift @@ -91,7 +91,7 @@ struct DataCard : View { }.padding() }.padding().frame(width: 300, height: 500, alignment: .center) } - .background(Color.white) + .background(Color.systemGray6) .cornerRadius(10) .shadow(radius: 5) .padding(.bottom) @@ -106,7 +106,7 @@ struct EpisodeView : View { Text("(\(episode.episode!))").font(.caption) } .frame(width: 300, height: 100, alignment: .center) - .background(Color.white) + .background(Color.systemGray6) .cornerRadius(10) .shadow(radius: 5) .padding() @@ -139,7 +139,9 @@ struct CharacterDetail: View { MainCharacterAttributes(character: character) }.padding() DataCard(character: character) - Text("Episodes").font(.title).bold() + if episodes.count != 0 { + Text("Episodes").font(.title).bold() + } ScrollView { VStack { ForEach (episodes ,id: \.id) { episode in