Files
SwiftUI/Examples/Jike/SwiftUI_Jike/Cell/CircleImage.swift
Ivan Vorobei 27a7f9fae6 Add Jike
2019-06-06 22:36:07 +03:00

28 lines
578 B
Swift
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
See LICENSE folder for this samples licensing information.
Abstract:
A view that clips an image to a circle and adds a stroke and shadow.
*/
import SwiftUI
struct CircleImage: View {
var imgName:String
var body: some View {
Image(imgName)
.clipShape(Circle())
.overlay(
Circle().stroke(Color.white, lineWidth: 1))
.shadow(radius: 3)
}
}
struct CircleImage_Preview: PreviewProvider {
static var previews: some View {
CircleImage(imgName:"meIcon")
}
}