Skip to content

Commit

Permalink
added circular radius to the circleIconView layer after the circleIco…
Browse files Browse the repository at this point in the history
…nView frame is set so that custom icons will be masked accordingly to its circular container view
  • Loading branch information
sagendaz committed Jul 28, 2016
1 parent a1c1683 commit f0e9dee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SCLAlertView/SCLAlertView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ public class SCLAlertView: UIViewController {
circleView.addSubview(circleIconView!)
let x = (appearance.kCircleHeight - appearance.kCircleIconHeight) / 2
circleIconView!.frame = CGRectMake( x, x, appearance.kCircleIconHeight, appearance.kCircleIconHeight)
circleIconView?.layer.cornerRadius = circleIconView!.bounds.height / 2
circleIconView?.layer.masksToBounds = true

for txt in inputs {
txt.layer.borderColor = viewColor.CGColor
Expand Down

0 comments on commit f0e9dee

Please sign in to comment.