Add customisation of the navigation buttons for iOS

This commit is contained in:
Bentley O'Kane-Chase
2018-03-21 21:50:25 +10:00
parent a3fca87ee5
commit 65a825a193
3 changed files with 8 additions and 0 deletions
+6
View File
@@ -642,11 +642,17 @@
self.forwardButton = [[UIBarButtonItem alloc] initWithTitle:frontArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goForward:)];
self.forwardButton.enabled = YES;
self.forwardButton.imageInsets = UIEdgeInsetsZero;
if (_browserOptions.navigationbuttoncolor != nil) { // Set button color if user sets it in options
self.forwardButton.tintColor = [self colorFromHexString:_browserOptions.navigationbuttoncolor];
}
NSString* backArrowString = NSLocalizedString(@"", nil); // create arrow from Unicode char
self.backButton = [[UIBarButtonItem alloc] initWithTitle:backArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goBack:)];
self.backButton.enabled = YES;
self.backButton.imageInsets = UIEdgeInsetsZero;
if (_browserOptions.navigationbuttoncolor != nil) { // Set button color if user sets it in options
self.backButton.tintColor = [self colorFromHexString:_browserOptions.navigationbuttoncolor];
}
// Filter out Navigation Buttons if user requests so
if (_browserOptions.hidenavigationbuttons) {