Skip to content

Instantly share code, notes, and snippets.

@egcode
Last active March 5, 2019 04:12
Show Gist options
  • Save egcode/1e986ab09088b00f8e0c0f2ae7295a45 to your computer and use it in GitHub Desktop.
Save egcode/1e986ab09088b00f8e0c0f2ae7295a45 to your computer and use it in GitHub Desktop.
Material View
import UIKit
class MaterialView: UIView {
override func awakeFromNib() {
layer.cornerRadius = 2.0
layer.shadowColor = UIColor(red: 157.0 / 255.0, green: 157.0 / 255.0, blue: 157.0 / 255.0, alpha: 0.5).cgColor
layer.shadowOpacity = 0.8
layer.shadowRadius = 5.0
layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment