Skip to content

Instantly share code, notes, and snippets.

@jeffery812
Created June 25, 2021 15:55
Show Gist options
  • Save jeffery812/b89596fe21a0d9c98b16969ba9d80d99 to your computer and use it in GitHub Desktop.
Save jeffery812/b89596fe21a0d9c98b16969ba9d80d99 to your computer and use it in GitHub Desktop.
struct AvatarView: View {
/// image
let image: String
/// size
let size: CGFloat
/// body
var body: some View {
Image(image)
.resizable()
.frame(width: size, height: size)
.clipShape(Circle())
.overlay(Circle().stroke(Color.white.opacity(0.5), lineWidth: 5))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment