Xcode iOS Programming with Swift Tutorial - Adding Shadows to Views

Published: 27 May 2017
on channel: Programming and Development Channel
5,874
73

Shadows are a very great addition to good design, and it is good to know how to create them.

Here is the code for adding a custom shadow to a UIView-
// Styles
shadowView.layer.cornerRadius = 3
shadowView.layer.shadowColor = UIColor(red:0/255.0, green:0/255.0, blue:0/255.0, alpha: 1.0).cgColor
shadowView.layer.shadowOffset = CGSize(width: 0, height: 1.75)
shadowView.layer.shadowRadius = 1.7
shadowView.layer.shadowOpacity = 0.45

Check out some of our other easy 5-minute programming tutorials!

MUSIC-
On My Way Kevin MacLeod (incompetech.com)
Licensed under Creative Commons: By Attribution 3.0 License
https://creativecommons.org/licenses/


On this page of the site you can watch the video online Xcode iOS Programming with Swift Tutorial - Adding Shadows to Views with a duration of hours minute second in good quality, which was uploaded by the user Programming and Development Channel 27 May 2017, share the link with friends and acquaintances, this video has already been watched 5,874 times on youtube and it was liked by 73 viewers. Enjoy your viewing!