Skip to content

Instantly share code, notes, and snippets.

@apatronl
Last active July 12, 2020 15:08
Show Gist options
  • Save apatronl/23aa157ef602647961d1977c347eac93 to your computer and use it in GitHub Desktop.
Save apatronl/23aa157ef602647961d1977c347eac93 to your computer and use it in GitHub Desktop.
struct EmojibookListView: View {
// ...
}
struct EmojiItemView: View {
// ...
}
struct EmojiDetailsView: View {
var emojiDetails: EmojiDetails
var body: some View {
ZStack {
// Background color
Color(UIColor.systemIndigo).edgesIgnoringSafeArea(.all)
// Emoji data
VStack {
VStack(alignment: .leading) {
HStack {
Text("\(emojiDetails.emoji) \(emojiDetails.name)")
.font(.largeTitle)
.bold()
}
.padding()
Text(emojiDetails.description)
.padding([.leading, .trailing, .bottom])
.font(.title)
}
}
.foregroundColor(.white)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment