@@ -44,7 +44,7 @@ @implementation FullScreenView
4444
4545- (void )viewDidLoad {
4646 [super viewDidLoad ];
47-
47+
4848 self.navigationItem .titleView = ((UIViewController *)self.navigationController .viewControllers .firstObject ).navigationItem .titleView ;
4949 [self configureView ];
5050 [self setupBackButton ];
@@ -56,38 +56,53 @@ - (void)configureView {
5656 } else if (self.viewType == AdTypeRewarded) {
5757 [self setRewardedView ];
5858 }
59-
59+
6060 self.autoShowSwitch .on = NO ;
61-
61+
6262 self.backgroundView .backgroundColor = ColorTheme.secondary ;
6363 self.titleLabel .textColor = ColorTheme.primary ;
6464 self.titleLabel .font = [UIFont titleFont ];
6565 self.switchLabel .font = [UIFont bodyFont ];
6666 self.autoShowSwitch .onTintColor = ColorTheme.switchOn ;
67-
67+
6868 self.loadLabel .text = [@" button.load" localized ];
6969 self.loadLabel .font = [UIFont bodyFont ];
7070 self.readyLabel .text = [@" button.ready" localized ];
7171 self.readyLabel .font = [UIFont bodyFont ];
7272 self.showLabel .text = [@" button.show" localized ];
7373 self.showLabel .font = [UIFont bodyFont ];
74-
74+
7575 [self configureStatus ];
7676}
7777
7878- (void )setupBackButton {
79+ [self setupNavigationBarHeight ];
7980 self.navigationItem .leftBarButtonItem = nil ;
8081 self.navigationItem .hidesBackButton = YES ;
81-
82+
8283 UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize: 20 weight: UIImageSymbolWeightBold];
83- UIImage *backImage = [[UIImage systemImageNamed: @" chevron.backward" withConfiguration: config] imageWithRenderingMode: UIImageRenderingModeAlwaysOriginal ];
84-
84+ UIImage *backImage = [[UIImage systemImageNamed: @" chevron.backward" withConfiguration: config] imageWithRenderingMode: UIImageRenderingModeAlwaysTemplate ];
85+
8586 UIBarButtonItem *backButton = [[UIBarButtonItem alloc ] initWithImage: backImage style: UIBarButtonItemStylePlain target: self action: @selector (backButtonTapped )];
8687 backButton.tintColor = UIColor.whiteColor ;
87-
88+
8889 self.navigationItem .rightBarButtonItem = backButton;
8990}
9091
92+ - (void )setupNavigationBarHeight {
93+ UIView *rectangleView = [[UIView alloc ] init ];
94+ rectangleView.backgroundColor = [ColorTheme primary ];
95+ rectangleView.translatesAutoresizingMaskIntoConstraints = NO ;
96+ [self .view addSubview: rectangleView];
97+
98+ [NSLayoutConstraint activateConstraints: @[
99+ [rectangleView.topAnchor constraintEqualToAnchor: self .view.safeAreaLayoutGuide.topAnchor],
100+ [rectangleView.leadingAnchor constraintEqualToAnchor: self .view.leadingAnchor],
101+ [rectangleView.trailingAnchor constraintEqualToAnchor: self .view.trailingAnchor],
102+ [rectangleView.heightAnchor constraintEqualToConstant: 10.0 ]
103+ ]];
104+ }
105+
91106- (void )backButtonTapped {
92107 [self .navigationController popViewControllerAnimated: YES ];
93108}
0 commit comments