Multi-colored Shadow Swift

Thanks to @Josh Homann for pointing me in the right direction, but the answer was actually much more complex.

  1. The first (bottom) UIView in the hierarchy should have a plain white background and be pinned to the edges of the screen.

  2. The next view should be a UIImageView with an alpha of 0.75.

  3. Then you should add a UIVisualEffectView with the same dimensions as the first view.

  4. Finally, add another UIImageView that is the same size as the first UIImageView.

Your IB hierarchy should look similar to this:

IB Hierarchy

The final result is this:

Final Result

Tags:

Ios

Swift