Skip to content

Instantly share code, notes, and snippets.

@sukidhar
Created August 15, 2020 15:09
Show Gist options
  • Save sukidhar/07e5c3f2759ae38705d98ec09e37b1ee to your computer and use it in GitHub Desktop.
Save sukidhar/07e5c3f2759ae38705d98ec09e37b1ee to your computer and use it in GitHub Desktop.
struct RaadialButton : View {
let function : ()->Void
var body: some View{
Button(action: function, label: {
Image(systemName: "plus").resizable().frame(width: 25, height: 25, alignment: .center).foregroundColor(.white)
}).frame(width: 90, height: 90, alignment: .center)
.background(
ZStack{
Color.white.frame(width: 90, height: 90, alignment: .center)
Color(#colorLiteral(red: 0.262745098, green: 0.3921568627, blue: 0.968627451, alpha: 0.3204319234)).frame(width: 77, height: 77, alignment: .center).clipShape(Circle())
LinearGradient(gradient: Gradient(colors: [Color(#colorLiteral(red: 0.4117647059, green: 0.5176470588, blue: 1, alpha: 1)),Color(#colorLiteral(red: 0.1333333333, green: 0.2901960784, blue: 1, alpha: 1))]), startPoint: .top, endPoint: .bottom).frame(width: 65, height: 65, alignment: .center).clipShape(Circle())
}
)
.clipShape(Circle())
.position(x: UIScreen.main.bounds.width/2, y : 45)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment