Search code examples
swiftios8uikitios9uitabbar

Add shadow to a UITabbar in iOS8


I wanna add a simple shadow to my UITabbar. I added a shadow image (a 10x1 gradient) to my project / related storyboard property.

The image should be repeated by itself, shouldn't it?

Nevertheless, there is no shadow in the design mode as well no shadow if I launch the application.

Would could be wrong?


Solution

  • keep in mind:

    1. read
    2. understand

    To use an image shadow you have to set a background image.

    I used a simple transparent / bg-colored 16x16 image.

    After that, the the shadow appeared.