Skip to content

Instantly share code, notes, and snippets.

@iSapozhnik
Last active August 20, 2021 12:25
Show Gist options
  • Save iSapozhnik/6e920735fda27f2eabdb272d2a4b5348 to your computer and use it in GitHub Desktop.
Save iSapozhnik/6e920735fda27f2eabdb272d2a4b5348 to your computer and use it in GitHub Desktop.
Pixelated SwiftUI image
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
var emailIcon: some View {
Image("mail")
.resizable()
.frame(width: 24, height: 24)
.foregroundColor(emailHovered ? .primary : .secondary)
.onHover { isHovered in
self.emailHovered = isHovered
}
.onTapGesture {
openURL(URL(string: Constants.twitterURLString)!)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment