Answers for "how to apply shadow to a group of elements in swiftui"

1

add shadow to UIButton swift

globeButton.setImage(UIImage(named: "Globe"), forState: .Normal)
globeButton.backgroundColor = UIColor(red: 171/255, green: 178/255, blue: 186/255, alpha: 1.0)
// Shadow and Radius
globeButton.layer.shadowColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.25).CGColor
globeButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
globeButton.layer.shadowOpacity = 1.0
globeButton.layer.shadowRadius = 0.0
globeButton.layer.masksToBounds = false
globeButton.layer.cornerRadius = 4.0
Posted by: Guest on May-29-2020
1

shadow color swiftui

Text("Hacking with Swift")
    .padding()
    .shadow(color: .red, radius: 5)
    .border(Color.red, width: 4)
Posted by: Guest on January-20-2021

Code answers related to "how to apply shadow to a group of elements in swiftui"

Code answers related to "Swift"

Browse Popular Code Answers by Language