Skip to content

Instantly share code, notes, and snippets.

@MadeBugs
Last active November 22, 2019 07:13
Show Gist options
  • Save MadeBugs/6a90e64c4c4d8a649ac712e6a84ff438 to your computer and use it in GitHub Desktop.
Save MadeBugs/6a90e64c4c4d8a649ac712e6a84ff438 to your computer and use it in GitHub Desktop.
设置阴影,与圆角并存的那种
let shadowPath = UIBezierPath.init(rect: regiseButton.bounds)
regiseButton.layer.masksToBounds = false;
regiseButton.layer.shadowColor = UIColor.black.cgColor
regiseButton.layer.shadowOffset = CGSize(width: 0, height: 0)
regiseButton.layer.shadowOpacity = 1;
regiseButton.layer.shadowRadius = 25
regiseButton.layer.shadowPath = shadowPath.cgPath;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment