Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // UIView+Shadow.swift
- //
- // Created by Dan Merfeld on 1/14/17.
- // Copyright © 2017 TheoryThree. All rights reserved.
- //
- import UIKit
- extension UIView {
- func shadow(opacity:Float, radius:CGFloat) {
- self.layer.masksToBounds = false
- self.layer.shadowColor = UIColor.black.cgColor
- self.layer.shadowOpacity = opacity
- self.layer.shadowOffset = CGSize.zero
- self.layer.shadowRadius = radius
- self.layer.shadowPath = UIBezierPath(rect: self.bounds).cgPath
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement