Customise UITabBar in RubyMotion

231 Views Asked by At

Using Rubymotion, how can I remove glossy effect on my tabbar item ?

I found this ObjC solution :

[yourTabbar setSelectionIndicatorImage:[[UIImage alloc] init]];

But the glossy effect is still there when I translate it in Ruby this way (in app_delegate.rb) :

@tab_controller.tabBar.setSelectionIndicatorImage UIImage.alloc.init

What's wrong with this ruby translation ?

I'm also using Pixate, so maybe there is an other way with simple css...

1

There are 1 best solutions below

0
On

Using Pixate and CSS, you could do something like this to hide the selected state, or perhaps place an alternate image in there:

tab-bar tab-bar-item:selected {
     background-color: linear-gradient(transparent, transparent);
     background-size: 1;
}