0

I want to use a 1x1 px stretchable image on tabbar selected tab.I am using this code.

UIImage *selectedBgImage = [UIImage imageNamed:@"active-overlay.png"];
[[UITabBar appearance]setSelectionIndicatorImage:[selectedBgImage resizableImageWithCapInsets:UIEdgeInsetsMake(0,0, 10, 10) resizingMode:UIImageResizingModeStretch]];

problem is this does not cover the selected tab completely. always leave some space like 2-3 px from top.this looks like this

can anyone please help me in solving this problem.

dstudeba
  • 8,878
  • 3
  • 32
  • 41
Ruchi
  • 1
  • 4
  • Thanks @dstudeba i am new to stakOverflow so not much familiar with all editing and all... – Ruchi Oct 26 '15 at 18:22
  • No Problem, it would also help if you explained a little more what you wanted your tab bar to actually look like. I take it the light blue box on the selected tab you want to go all the way to the top and bottom? – dstudeba Oct 26 '15 at 18:25
  • i want to cover this white overlay completely from top and bottom on selected Tab. – Ruchi Oct 26 '15 at 19:37
  • Check out these links they should help: http://stackoverflow.com/questions/10035302/uitabbar-selectionindicatorimage-padding http://stackoverflow.com/questions/23952693/wrong-size-setselectionindicatorimage – dstudeba Oct 26 '15 at 20:06
  • This link explaining very similar issue solution. but here i am not able to understand what size and color i should give and where i should call this class function. can you please explain me this in steps . a big thanks to u – Ruchi Oct 26 '15 at 21:01
  • I tried to solve this using this link after creating a category of UITabbar and adding that function http://stackoverflow.com/questions/10035302/uitabbar-selectionindicatorimage-padding but no success yet.... can anyone help me in solving this issue... – Ruchi Nov 01 '15 at 07:38

0 Answers0