Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. //
  2. // UIView+Round.swift
  3. //
  4. // Created by Dan Merfeld on 5/14/16.
  5. // Copyright © 2016 Dan Merfeld. All rights reserved.
  6. //
  7.  
  8. import UIKit
  9.  
  10. extension UIView {
  11.  
  12. func round(_ radius:CGFloat) {
  13. self.layer.masksToBounds = true
  14. self.layer.cornerRadius = radius
  15. }
  16.  
  17. func round(_ radius:CGFloat, with boarderWidth:CGFloat, and color:CGColor) {
  18. self.layer.masksToBounds = true
  19. self.layer.cornerRadius = radius
  20. self.layer.borderWidth = boarderWidth
  21. self.layer.borderColor = color
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement