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
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="128px" id="Layer_1" style="enable-background:new 0 0 128 128;" version="1.1" viewBox="0 0 128 128" width="128px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M86.785,109.878 c-8.188,4.317-16.533,5.962-26.515,5.962c-24.428,0-45.133-17.879-45.133-46.479c0-30.687,21.299-57.201,54.376-57.201 c25.918,0,43.348,18.175,43.348,43.052c0,22.342-12.517,35.448-26.514,35.448c-5.968,0-11.475-4.021-11.025-13.105h-0.594 C69.514,86.342,62.66,90.66,53.721,90.66c-8.636,0-16.083-7-16.083-18.764c0-18.473,14.591-35.309,35.296-35.309 c6.403,0,12.067,1.34,15.937,3.13L83.813,66.68c-2.232,11.323-0.45,16.532,4.463,16.685c7.604,0.146,16.095-9.982,16.095-27.261 c0-21.602-12.964-37.09-36.06-37.09c-24.27,0-44.684,19.212-44.684,49.456c0,24.877,16.241,40.215,38.28,40.215 c8.491,0,16.387-1.783,22.499-5.21L86.785,109.878z M78.598,45.527c-1.493-0.449-4.027-1.043-7.446-1.043 c-13.112,0-23.689,12.366-23.689,26.812c0,6.556,3.275,11.322,9.836,11.322c8.637,0,16.532-11.025,18.169-20.256L78.598,45.527z" style="fill:#2F3435;stroke:#2F3435;stroke-width:3;stroke-miterlimit:10;"/></g></svg>
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