Allow to specify tab button image.
This commit is contained in:
parent
c81ef13705
commit
ad4b564756
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
@optional
|
||||
|
||||
- (UIImage *)imageForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController;
|
||||
- (UIImage *)highlightedImageForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController;
|
||||
- (UIColor *)colorForPagerTabStripViewController:(XLPagerTabStripViewController *)pagerTabStripViewController;
|
||||
|
||||
@end
|
||||
|
|
|
|||
Loading…
Reference in New Issue