Allow to specify tab button image.

This commit is contained in:
Sergey Demchenko 2015-08-08 13:36:10 -07:00
parent c81ef13705
commit ad4b564756
2 changed files with 10 additions and 0 deletions

View File

@ -207,6 +207,15 @@
[buttonBarCell.label setText:[childController titleForPagerTabStripViewController:self]];
if ([childController respondsToSelector:@selector(imageForPagerTabStripViewController:)]) {
UIImage *image = [childController imageForPagerTabStripViewController:self];
buttonBarCell.imageView.image = image;
}
if ([childController respondsToSelector:@selector(highlightedImageForPagerTabStripViewController:)]) {
UIImage *image = [childController highlightedImageForPagerTabStripViewController:self];
buttonBarCell.imageView.highlightedImage = image;
}
if (self.isProgressiveIndicator) {
if (self.changeCurrentIndexProgressiveBlock) {

View File

@ -40,6 +40,7 @@
@optional
- (UIImage *)imageForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController;
- (UIImage *)highlightedImageForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController;
- (UIColor *)colorForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController;
@end