If I do view.layer.shadowOffset = CGSize(width: -1, height: 1) what exactly does the numbers -1 for width, and 1 for height mean? How is the shadow determined from the CGSize passed? I found the documentation, but it's not very useful
Consider width and height as x and y. And you should be aware in iOS coordinates start from top left.
CGSize(width: -1, height: 1) means that the shadow will move 1 point to the left on x-axis and 1 point up on y-axis.
Consider
width
andheight
asx
andy
. And you should be aware in iOS coordinates start from top left.CGSize(width: -1, height: 1)
means that the shadow will move 1 point to the left on x-axis and 1 point up on y-axis.