ios iphone uitabbar uitabbarcontroller

iOS UITabBar : Remove top shadow gradient line

I implemented a custom UITabBar and I still have this gradient/shadow on top of it.
I added

[self.tabBar setBackgroundImage:[UIImage imageNamed:@"navBarBottom.png"]];

which is just changing the background but keeping the shadow gradient.

What am I doing wrong ? Is there anything to specify to get rid of it ?

What I have :

top shadow

What I want :

without shadow

Thank you.

Try setting a 1×1 pixel transparent shadow image for the UITabBar:

[[UITabBar appearance] setShadowImage:[UIImage imageNamed:@"transparentShadow.png"]];