Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // UIView+Round.swift
- //
- // Created by Dan Merfeld on 5/14/16.
- // Copyright © 2016 Dan Merfeld. All rights reserved.
- //
- import UIKit
- extension UIView {
- func round(_ radius:CGFloat) {
- self.layer.masksToBounds = true
- self.layer.cornerRadius = radius
- }
- func round(_ radius:CGFloat, with boarderWidth:CGFloat, and color:CGColor) {
- self.layer.masksToBounds = true
- self.layer.cornerRadius = radius
- self.layer.borderWidth = boarderWidth
- self.layer.borderColor = color
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement