@@ -132,6 +132,7 @@ @interface TOWebViewController () <UIActionSheetDelegate,
132
132
@property (nonatomic ,strong ) UIButton *forwardButton; /* Moves the web view one page forward */
133
133
@property (nonatomic ,strong ) UIButton *reloadStopButton; /* Reload / Stop buttons */
134
134
@property (nonatomic ,strong ) UIButton *actionButton; /* Shows the UIActivityViewController */
135
+ @property (nonatomic ,strong ) UIView *buttonsContainerView; /* The container view that holds all of the navigation buttons. */
135
136
136
137
/* Button placement metrics */
137
138
@property (nonatomic ,assign ) CGFloat buttonWidth; /* The size of each button */
@@ -433,15 +434,19 @@ - (void)viewDidLoad
433
434
self.gradientLayer .hidden = YES ;
434
435
435
436
// create the buttons view and add them to either the navigation bar or toolbar
436
- UIView *iconsContainerView = [self containerViewWithNavigationButtons ];
437
+ self. buttonsContainerView = [self containerViewWithNavigationButtons ];
437
438
if (IPAD) {
438
- self.navigationItem .rightBarButtonItem = [[UIBarButtonItem alloc ] initWithCustomView: iconsContainerView ];
439
+ self.navigationItem .rightBarButtonItem = [[UIBarButtonItem alloc ] initWithCustomView: self .buttonsContainerView ];
439
440
}
440
441
else {
441
- NSArray *items = @[BLANK_BARBUTTONITEM, [[UIBarButtonItem alloc ] initWithCustomView: iconsContainerView ], BLANK_BARBUTTONITEM];
442
+ NSArray *items = @[BLANK_BARBUTTONITEM, [[UIBarButtonItem alloc ] initWithCustomView: self .buttonsContainerView ], BLANK_BARBUTTONITEM];
442
443
self.toolbarItems = items;
443
444
}
444
445
446
+ // override the tint color of the buttons, if desired.
447
+ if (MINIMAL_UI)
448
+ self.buttonsContainerView .tintColor = self.buttonTintColor ;
449
+
445
450
// Create the Done button
446
451
if (self.beingPresentedModally && !self.onTopOfNavigationControllerStack ) {
447
452
NSString *title = NSLocalizedStringFromTable(@" Done" , @" TOWebViewControllerLocalizable" , @" Modal Web View Controller Close" );
@@ -665,11 +670,16 @@ - (void)setButtonTintColor:(UIColor *)buttonTintColor
665
670
666
671
_buttonTintColor = buttonTintColor;
667
672
668
- if (self.buttonThemeAttributes == nil )
669
- self.buttonThemeAttributes = [NSMutableDictionary dictionary ];
670
-
671
- self.buttonThemeAttributes [TOWebViewControllerButtonTintColor] = _buttonTintColor;
672
- [self setUpNavigationButtons ];
673
+ if (MINIMAL_UI) {
674
+ self.buttonsContainerView .tintColor = _buttonTintColor;
675
+ }
676
+ else {
677
+ if (self.buttonThemeAttributes == nil )
678
+ self.buttonThemeAttributes = [NSMutableDictionary dictionary ];
679
+
680
+ self.buttonThemeAttributes [TOWebViewControllerButtonTintColor] = _buttonTintColor;
681
+ [self setUpNavigationButtons ];
682
+ }
673
683
}
674
684
675
685
- (void )setButtonBevelOpacity : (CGFloat)buttonBevelOpacity
0 commit comments