tombenner / nui

Style iOS apps with a stylesheet, similar to CSS
MIT License
3.76k stars 461 forks source link

Allow to set SelectionIndicatorImage for TabBar #29

Closed butaji closed 11 years ago

butaji commented 11 years ago

I'm not sure for naming and other details, but just adding code like that will add this option:

if ([NUISettings hasProperty:@"selection-indicator-image" withClass:class_name])
{
    [bar setSelectionIndicatorImage:[NUISettings getImage:@"selection-indicator-image" withClass:class_name]];
}
tombenner commented 11 years ago

Thanks for requesting this; it's now available using:

TabBarItem {
    background-image-selected: MyImage.png;
}

This property seemed more appropriate for TabBarItem, as the image is the background image for the item, and not for the bar.

Please note that TabBarItem is a new style class, and TabBar's font-* and text-* properties have been moved to it, so if you're using any of those, you'll want to move them from TabBar to TabBarItem. (See the README for details.)