|  | @@ -3,6 +3,7 @@
 | 
	
		
			
			| 3 | 3 |  #import "UIImage+tint.h"
 | 
	
		
			
			| 4 | 4 |  #import "RNNBottomTabOptions.h"
 | 
	
		
			
			| 5 | 5 |  #import "RNNNavigationOptions.h"
 | 
	
		
			
			|  | 6 | +#import "RNNBackButtonOptions.h"
 | 
	
		
			
			| 6 | 7 |  
 | 
	
		
			
			| 7 | 8 |  #define kStatusBarAnimationDuration 0.35
 | 
	
		
			
			| 8 | 9 |  const NSInteger BLUR_STATUS_TAG = 78264801;
 | 
	
	
		
			
			|  | @@ -177,12 +178,12 @@ const NSInteger BLUR_STATUS_TAG = 78264801;
 | 
	
		
			
			| 177 | 178 |  		backItem.image = color
 | 
	
		
			
			| 178 | 179 |  		? [[icon withTintColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]
 | 
	
		
			
			| 179 | 180 |  		: icon;
 | 
	
		
			
			| 180 |  | -		
 | 
	
		
			
			|  | 181 | +
 | 
	
		
			
			| 181 | 182 |  		[self.navigationController.navigationBar setBackIndicatorImage:[UIImage new]];
 | 
	
		
			
			| 182 | 183 |  		[self.navigationController.navigationBar setBackIndicatorTransitionMaskImage:[UIImage new]];
 | 
	
		
			
			| 183 | 184 |  	}
 | 
	
		
			
			| 184 | 185 |  	
 | 
	
		
			
			| 185 |  | -	UIViewController *lastViewControllerInStack = self.navigationController.viewControllers.count > 1 ? [self.navigationController.viewControllers objectAtIndex:self.navigationController.viewControllers.count-2] : self.navigationController.topViewController;
 | 
	
		
			
			|  | 186 | +	UIViewController *lastViewControllerInStack = self.navigationController.viewControllers.count > 1 ? self.navigationController.viewControllers[self.navigationController.viewControllers.count - 2] : self.navigationController.topViewController;
 | 
	
		
			
			| 186 | 187 |  	
 | 
	
		
			
			| 187 | 188 |  	backItem.title = title ? title : lastViewControllerInStack.navigationItem.title;
 | 
	
		
			
			| 188 | 189 |  	backItem.tintColor = color;
 | 
	
	
		
			
			|  | @@ -190,4 +191,21 @@ const NSInteger BLUR_STATUS_TAG = 78264801;
 | 
	
		
			
			| 190 | 191 |  	lastViewControllerInStack.navigationItem.backBarButtonItem = backItem;
 | 
	
		
			
			| 191 | 192 |  }
 | 
	
		
			
			| 192 | 193 |  
 | 
	
		
			
			|  | 194 | +- (void)applyBackButton:(RNNBackButtonOptions *)backButton {
 | 
	
		
			
			|  | 195 | +	UIBarButtonItem *backItem = [UIBarButtonItem new];
 | 
	
		
			
			|  | 196 | +	if (backButton.icon.hasValue) {
 | 
	
		
			
			|  | 197 | +		UIColor *color = [backButton.color getWithDefaultValue:nil];
 | 
	
		
			
			|  | 198 | +		backItem.image = color ?
 | 
	
		
			
			|  | 199 | +				[[backButton.icon.get withTintColor:color] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] :
 | 
	
		
			
			|  | 200 | +				backButton.icon.get;
 | 
	
		
			
			|  | 201 | +
 | 
	
		
			
			|  | 202 | +		[self.navigationController.navigationBar setBackIndicatorImage:[UIImage new]];
 | 
	
		
			
			|  | 203 | +        [self.navigationController.navigationBar setBackIndicatorTransitionMaskImage:[UIImage new]];
 | 
	
		
			
			|  | 204 | +	}
 | 
	
		
			
			|  | 205 | +
 | 
	
		
			
			|  | 206 | +	if ([backButton.showTitle getWithDefaultValue:YES]) backItem.title = [backButton.title getWithDefaultValue:nil];
 | 
	
		
			
			|  | 207 | +	if (backButton.color.hasValue) backItem.tintColor = [backButton.color get];
 | 
	
		
			
			|  | 208 | +	self.navigationItem.backBarButtonItem = backItem;
 | 
	
		
			
			|  | 209 | +}
 | 
	
		
			
			|  | 210 | +
 | 
	
		
			
			| 193 | 211 |  @end
 |