diff --git a/AMSlideOut/AMSlideOutGlobals.h b/AMSlideOut/AMSlideOutGlobals.h index 266c602..58c58f1 100755 --- a/AMSlideOut/AMSlideOutGlobals.h +++ b/AMSlideOut/AMSlideOutGlobals.h @@ -24,20 +24,21 @@ // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#define kSOViewTitle @"title" -#define kSOController @"controller" -#define kSOViewIcon @"icon" -#define kSOViewTag @"tag" -#define kSOViewBadge @"badge" -#define kSOSection @"section" -#define kSOBeforeBlock @"before" -#define kSOAfterBlock @"after" -#define kSOSectionTitle @"title" -#define kSOSectionClass @"headerClass" -#define kSOSectionHeight @"headerHeight" -#define kSOItemIsAction @"isAction" -#define kSOItemClass @"itemClass" -#define kSOItemNibName @"itemNibName" +#define kSOViewTitle @"title" +#define kSOController @"controller" +#define kSOViewIcon @"icon" +#define kSOViewSelectionIcon @"selectionIcon" +#define kSOViewTag @"tag" +#define kSOViewBadge @"badge" +#define kSOSection @"section" +#define kSOBeforeBlock @"before" +#define kSOAfterBlock @"after" +#define kSOSectionTitle @"title" +#define kSOSectionClass @"headerClass" +#define kSOSectionHeight @"headerHeight" +#define kSOItemIsAction @"isAction" +#define kSOItemClass @"itemClass" +#define kSOItemNibName @"itemNibName" // This is to support prior versions where there was a typo in this option definition: #define AMOptionsTableOffestY AMOptionsTableOffsetY @@ -75,6 +76,7 @@ FOUNDATION_EXPORT NSString *const AMOptionsHeaderSeparatorLower; FOUNDATION_EXPORT NSString *const AMOptionsCellFont; FOUNDATION_EXPORT NSString *const AMOptionsCellFontColor; +FOUNDATION_EXPORT NSString *const AMOptionsCellSelectionFontColor; FOUNDATION_EXPORT NSString *const AMOptionsCellBadgeFont; FOUNDATION_EXPORT NSString *const AMOptionsCellBackground; FOUNDATION_EXPORT NSString *const AMOptionsCellSeparatorUpper; diff --git a/AMSlideOut/AMSlideOutGlobals.m b/AMSlideOut/AMSlideOutGlobals.m index 5618ef3..e889705 100755 --- a/AMSlideOut/AMSlideOutGlobals.m +++ b/AMSlideOut/AMSlideOutGlobals.m @@ -31,6 +31,7 @@ NSString *const AMOptionsHeaderSeparatorLower = @"AMOptionsHeaderSeparatorLower"; NSString *const AMOptionsCellFont = @"AMOptionsCellFont"; NSString *const AMOptionsCellFontColor = @"AMOptionsCellFontColor"; +NSString *const AMOptionsCellSelectionFontColor = @"AMOptionsCellSelectionFontColor"; NSString *const AMOptionsCellBadgeFont = @"AMOptionsCellBadgeFont"; NSString *const AMOptionsCellBackground = @"AMOptionsCellBackground"; NSString *const AMOptionsCellSeparatorUpper = @"AMOptionsCellSeparatorUpper"; @@ -109,6 +110,7 @@ + (NSDictionary*)defaultOptions AMOptionsCellFont : [UIFont fontWithName:@"Helvetica" size:14], AMOptionsCellBadgeFont : [UIFont fontWithName:@"Helvetica" size:12], AMOptionsCellFontColor : [UIColor colorWithRed:0.77 green:0.8 blue:0.85 alpha:1.0], + AMOptionsCellSelectionFontColor : [UIColor colorWithRed:0.77 green:0.8 blue:0.85 alpha:1.0], AMOptionsCellBackground : [UIColor colorWithRed:0.19 green:0.22 blue:0.29 alpha:1.0], AMOptionsCellSeparatorUpper : [UIColor colorWithRed:0.24 green:0.27 blue:0.33 alpha:1.0], AMOptionsCellSeparatorLower : [UIColor colorWithRed:0.14 green:0.16 blue:0.21 alpha:1.0], @@ -182,6 +184,7 @@ + (NSDictionary*)defaultFlatOptions AMOptionsCellBadgeFontColor : [UIColor whiteColor], AMOptionsCellBadgeBackColor : [UIColor blackColor], AMOptionsCellFontColor : [UIColor blackColor], + AMOptionsCellSelectionFontColor : [UIColor blackColor], AMOptionsCellBackground : [UIColor colorWithRed:0.8 green:0.8 blue:0.8 alpha:1.0], AMOptionsCellSeparatorUpper : [UIColor clearColor], AMOptionsCellSeparatorLower : [UIColor colorWithRed:0.7 green:0.7 blue:0.7 alpha:1.0], diff --git a/AMSlideOut/AMSlideOutNavigationController.h b/AMSlideOut/AMSlideOutNavigationController.h index 960c140..a74a7a1 100755 --- a/AMSlideOut/AMSlideOutNavigationController.h +++ b/AMSlideOut/AMSlideOutNavigationController.h @@ -77,17 +77,26 @@ typedef void (^AMSlideOutCompletionHandler)(void); - (void)setContentViewController:(UIViewController *)controller; - (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon; +- (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon; - (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon beforeChange:(void(^)())before onCompletition:(void(^)())after; +- (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon beforeChange:(void(^)())before onCompletition:(void(^)())after; - (void)addActionToLastSection:(void(^)())action tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon; - (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon; +- (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon; - (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon beforeChange:(void(^)())before onCompletition:(void(^)())after; +- (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon beforeChange:(void(^)())before onCompletition:(void(^)())after; - (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section; +- (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon toSection:(NSInteger)section; - (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after; +- (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after; - (void)addAction:(void(^)())action tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section; +- (void)addAction:(void(^)())action tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon toSection:(NSInteger)section; // Controller will created only when it will picked from menu, and destroyed when user pick another controller - (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section; +- (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon toSection:(NSInteger)section; - (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after; +- (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon andSelectionIcon:(id)selectionIcon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after; - (void)switchToControllerTagged:(int)tag andPerformSelector:(SEL)selector withObject:(id)obj; - (void)switchToControllerTagged:(int)tag andPerformSelector:(SEL)selector withObject:(id)obj afterDelay:(NSTimeInterval)delay; diff --git a/AMSlideOut/AMSlideOutNavigationController.m b/AMSlideOut/AMSlideOutNavigationController.m index 6798b7d..d8ceeb5 100755 --- a/AMSlideOut/AMSlideOutNavigationController.m +++ b/AMSlideOut/AMSlideOutNavigationController.m @@ -113,18 +113,65 @@ - (void)addSectionWithTitle:(NSString*)title andHeaderClassName:(NSString*)klass [self.menuItems addObject:section]; } -- (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section +- (void)addViewController:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + toSection:(NSInteger)section { [self addViewController:controller tagged:tag withTitle:title andIcon:icon + andSelectionIcon:nil toSection:section beforeChange:nil onCompletition:nil]; } -- (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after +- (void)addViewController:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon + toSection:(NSInteger)section +{ + [self addViewController:controller + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:selectionIcon + toSection:section + beforeChange:nil + onCompletition:nil]; +} + +- (void)addViewController:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + toSection:(NSInteger)section + beforeChange:(void(^)())before + onCompletition:(void(^)())after +{ + [self addViewController:controller + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:nil + toSection:section + beforeChange:before + onCompletition:after]; +} + +- (void)addViewController:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon + toSection:(NSInteger)section + beforeChange:(void(^)())before + onCompletition:(void(^)())after { if (section < [self.menuItems count]) { NSMutableDictionary* item = [[NSMutableDictionary alloc] init]; @@ -132,6 +179,9 @@ - (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitl item[kSOViewTitle] = title; if (icon) { item[kSOViewIcon] = icon; + } + if (selectionIcon) { + item[kSOViewSelectionIcon] = selectionIcon; } if (before) { item[kSOBeforeBlock] = [before copy]; @@ -146,12 +196,34 @@ - (void)addViewController:(UIViewController*)controller tagged:(int)tag withTitl } } -- (void)addAction:(void(^)())action tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section +- (void)addAction:(void(^)())action + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + toSection:(NSInteger)section +{ + [self addAction:action + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:nil + toSection:section]; +} + +- (void)addAction:(void(^)())action + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon + toSection:(NSInteger)section { if (section < [self.menuItems count]) { NSMutableDictionary* item = [[NSMutableDictionary alloc] init]; item[kSOViewTitle] = title; item[kSOViewIcon] = icon; + if (selectionIcon) { + item[kSOViewSelectionIcon] = selectionIcon; + } // Note: The action is stored in the before block item[kSOBeforeBlock] = [action copy]; item[kSOViewTag] = @(tag); @@ -162,19 +234,72 @@ - (void)addAction:(void(^)())action tagged:(int)tag withTitle:(NSString*)title a } } -- (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section +- (void)addViewControllerClass:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + toSection:(NSInteger)section { [self addViewControllerClass:cls withNibName:nibName tagged:tag withTitle:title andIcon:icon + andSelectionIcon:nil + toSection:section + beforeChange:nil + onCompletition:nil]; +} + +- (void)addViewControllerClass:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon + toSection:(NSInteger)section +{ + [self addViewControllerClass:cls + withNibName:nibName + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:selectionIcon toSection:section beforeChange:nil onCompletition:nil]; } -- (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon toSection:(NSInteger)section beforeChange:(void(^)())before onCompletition:(void(^)())after +- (void)addViewControllerClass:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + toSection:(NSInteger)section + beforeChange:(void(^)())before + onCompletition:(void(^)())after +{ + [self addViewControllerClass:cls + withNibName:nibName + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:nil + toSection:section + beforeChange:before + onCompletition:after]; +} + +- (void)addViewControllerClass:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon + toSection:(NSInteger)section + beforeChange:(void(^)())before + onCompletition:(void(^)())after { if([cls isSubclassOfClass:[UIViewController class]]) { if (section < [self.menuItems count]) { @@ -187,6 +312,9 @@ - (void)addViewControllerClass:(Class)cls withNibName:(NSString*)nibName tagged: if (icon) { item[kSOViewIcon] = icon; } + if (selectionIcon) { + item[kSOViewSelectionIcon] = selectionIcon; + } if (before) { item[kSOBeforeBlock] = [before copy]; } @@ -240,19 +368,90 @@ - (void)setBadgeTotalValue:(NSString*)value } } -- (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon +- (void)addViewControllerToLastSection:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon { - [self addViewController:controller tagged:tag withTitle:title andIcon:icon toSection:([self.menuItems count]-1)]; + [self addViewController:controller + tagged:tag + withTitle:title + andIcon:icon + toSection:([self.menuItems count]-1)]; } -- (void)addViewControllerToLastSection:(UIViewController*)controller tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon beforeChange:(void(^)())before onCompletition:(void(^)())after +- (void)addViewControllerToLastSection:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon { - [self addViewController:controller tagged:tag withTitle:title andIcon:icon toSection:([self.menuItems count]-1) beforeChange:before onCompletition:after]; + [self addViewController:controller + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:selectionIcon + toSection:([self.menuItems count]-1)]; } -- (void)addActionToLastSection:(void(^)())action tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon +- (void)addViewControllerToLastSection:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + beforeChange:(void(^)())before + onCompletition:(void(^)())after { - [self addAction:action tagged:tag withTitle:title andIcon:icon toSection:([self.menuItems count]-1)]; + [self addViewController:controller + tagged:tag + withTitle:title + andIcon:icon + toSection:([self.menuItems count]-1) + beforeChange:before + onCompletition:after]; +} + +- (void)addViewControllerToLastSection:(UIViewController*)controller + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon + beforeChange:(void(^)())before + onCompletition:(void(^)())after +{ + [self addViewController:controller + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:selectionIcon + toSection:([self.menuItems count]-1) + beforeChange:before + onCompletition:after]; +} + +- (void)addActionToLastSection:(void(^)())action + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon +{ + [self addAction:action + tagged:tag + withTitle:title + andIcon:icon + toSection:([self.menuItems count]-1)]; +} + +- (void)addActionToLastSection:(void(^)())action + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon +{ + [self addAction:action + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:selectionIcon + toSection:([self.menuItems count]-1)]; } - (void)setContentViewController:(UIViewController *)controller @@ -268,14 +467,72 @@ - (void)setContentViewController:(UIViewController *)controller } -- (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon +- (void)addViewControllerClassToLastSection:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon { - [self addViewControllerClass:cls withNibName:nibName tagged:tag withTitle:title andIcon:icon toSection:([self.menuItems count]-1)]; + [self addViewControllerClass:cls + withNibName:nibName + tagged:tag + withTitle:title + andIcon:icon + toSection:([self.menuItems count]-1)]; } -- (void)addViewControllerClassToLastSection:(Class)cls withNibName:(NSString*)nibName tagged:(int)tag withTitle:(NSString*)title andIcon:(id)icon beforeChange:(void(^)())before onCompletition:(void(^)())after +- (void)addViewControllerClassToLastSection:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon { - [self addViewControllerClass:cls withNibName:nibName tagged:tag withTitle:title andIcon:icon toSection:([self.menuItems count]-1) beforeChange:before onCompletition:after]; + [self addViewControllerClass:cls + withNibName:nibName + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:selectionIcon + toSection:([self.menuItems count]-1)]; +} + +- (void)addViewControllerClassToLastSection:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + beforeChange:(void(^)())before + onCompletition:(void(^)())after +{ + [self addViewControllerClass:cls + withNibName:nibName + tagged:tag + withTitle:title + andIcon:icon + toSection:([self.menuItems count]-1) + beforeChange:before + onCompletition:after]; +} + +- (void)addViewControllerClassToLastSection:(Class)cls + withNibName:(NSString*)nibName + tagged:(int)tag + withTitle:(NSString*)title + andIcon:(id)icon + andSelectionIcon:(id)selectionIcon + beforeChange:(void(^)())before + onCompletition:(void(^)())after +{ + [self addViewControllerClass:cls + withNibName:nibName + tagged:tag + withTitle:title + andIcon:icon + andSelectionIcon:selectionIcon + toSection:([self.menuItems count]-1) + beforeChange:before + onCompletition:after]; } - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration @@ -487,6 +744,7 @@ - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS selection.frame = selFrame; [selection setBackgroundColor:self.options[AMOptionsSelectionBackground]]; cell.selectedBackgroundView = selection; + [cell.textLabel setHighlightedTextColor:self.options[AMOptionsCellSelectionFontColor]]; } if([indexPath row] >= [(self.menuItems)[[indexPath section]][kSOSection] count] - 1 && @@ -514,6 +772,20 @@ - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NS cell.imageView.image = nil; } + id selectionImageData = dict[kSOViewSelectionIcon]; + + if (selectionImageData != nil) { + if ([selectionImageData isKindOfClass:[NSString class]] && ![selectionImageData isEqualToString:@""]) { + cell.imageView.highlightedImage = [UIImage imageNamed:selectionImageData]; + } else if ([selectionImageData isKindOfClass:[UIImage class]]) { + cell.imageView.highlightedImage = selectionImageData; + } else { + cell.imageView.highlightedImage = nil; + } + } else { + cell.imageView.highlightedImage = nil; + } + if (self.accessibilityDelegate) { if ([self.accessibilityDelegate respondsToSelector: @selector(applyAccessibilityPropertiesToSlideOutCell:withTag:fromSection:)]) { [self.accessibilityDelegate applyAccessibilityPropertiesToSlideOutCell: cell withTag: [dict[kSOViewTag] intValue] fromSection: indexPath.section]; diff --git a/AMSlideOut/AMSlideTableCell.m b/AMSlideOut/AMSlideTableCell.m index 1779fd2..a6fecbe 100644 --- a/AMSlideOut/AMSlideTableCell.m +++ b/AMSlideOut/AMSlideTableCell.m @@ -49,6 +49,7 @@ - (void)layoutSubviews self.textLabel.backgroundColor = [UIColor clearColor]; self.textLabel.textColor = self.options[AMOptionsCellFontColor]; + self.textLabel.highlightedTextColor = self.options[AMOptionsCellSelectionFontColor]; self.textLabel.shadowOffset = CGSizeMake(0, 1); self.textLabel.shadowColor = self.options[AMOptionsCellShadowColor]; self.textLabel.font = self.options[AMOptionsCellFont]; diff --git a/SlideoutStoryboardSample/SlideoutStoryboardSample/AMAppDelegate.m b/SlideoutStoryboardSample/SlideoutStoryboardSample/AMAppDelegate.m index 727f4db..56b6f9c 100644 --- a/SlideoutStoryboardSample/SlideoutStoryboardSample/AMAppDelegate.m +++ b/SlideoutStoryboardSample/SlideoutStoryboardSample/AMAppDelegate.m @@ -35,7 +35,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( } controller = [storyboard instantiateViewControllerWithIdentifier:@"FirstController"]; - [self.slideoutController addViewControllerToLastSection:controller tagged:1 withTitle:@"First View" andIcon:icon1]; + [self.slideoutController addViewControllerToLastSection:controller tagged:1 withTitle:@"First View" andIcon:icon1 andSelectionIcon:icon2]; [self.slideoutController setBadgeValue:@"Hello" forTag:1]; controller = [storyboard instantiateViewControllerWithIdentifier:@"SecondController"]; [self.slideoutController addViewControllerToLastSection:controller tagged:2 withTitle:@"Second View" andIcon:@""];