Skip to content

FreekSanders/UIBarButtonItem-Subtitle

Repository files navigation

UIBarButtonItem-Subtitle

[![CI Status](http://img.shields.io/travis/Freek Sanders/UIBarButtonItem-Subtitle.svg?style=flat)](https://travis-ci.org/Freek Sanders/UIBarButtonItem-Subtitle) Version License Platform

UIBarButtonItem+Subtitle

This is categorization of the UIBarButtonItem. It adds a function to enable subtitles underneath UIBarButtonItem images.

Usage

To create a new UIBarButtonItem, use the following function:

- (UIBarButtonItem *)initWithImage:(UIImage *)image subtitle:(NSString *)subtitle textColor:(UIColor *)textColor target:(id)target action:(SEL)action;

For example:

self.libraryBarButton = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"UIButtonBarOrganize"] subtitle:NSLocalizedString(@"Library", nil) textColor:[UIColor orangeColor] target:self action:@selector(libraryBarButtonPressed:)];

The result is a UIBarButtonItem with the image named "UIButtonBarOrganize" and below it a text with the string "Library" in the color orange.

My image

Requirements

Installation

UIBarButtonItem-Subtitle is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "UIBarButtonItem-Subtitle"

Author

Freek Sanders, [email protected]

License

UIBarButtonItem-Subtitle is available under the MIT license. See the LICENSE file for more info.