Advertisement
iamalizade

Untitled

Aug 14th, 2015
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.59 KB | None | 0 0
  1. let rectShape = CAShapeLayer()
  2.         rectShape.bounds = self.name.frame
  3.         rectShape.position = self.name.center
  4.         rectShape.path = UIBezierPath(roundedRect: self.name.bounds, byRoundingCorners: .TopLeft | .TopRight, cornerRadii: CGSize(width: 20, height: 20)).CGPath
  5.         rectShape.backgroundColor = UIColor.blackColor().CGColor
  6.        
  7.         rectShape.fillColor = UIColor.blackColor().CGColor;
  8.         rectShape.strokeColor = UIColor.blackColor().CGColor;
  9.         rectShape.lineWidth = 1;
  10.         rectShape.opacity = 1;
  11.        
  12.         self.name.layer.mask = rectShape
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement