Sunday, April 12, 2015

Content

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
func viewDidLoad() {
    super.viewDidLoad()

    // make the shadow
    myButton.layer.shadowOffset = CGSizeMake(5, 5)

    // set the radius
    myButton.layer.shadowRadius = 5

    // change the color of the shadow (has to be CGColor)
    myButton.layer.shadowColor = UIColor.blueColor().CGColor
    
    // display the shadow
    myButton.layer.shadowOpacity = 1.0
}

Random Posts