Skip to content

Commit 338003e

Browse files
committed
header fix
1 parent 111ef9b commit 338003e

File tree

5 files changed

+60
-16
lines changed

5 files changed

+60
-16
lines changed

TappxUIKitObjCExample.xcodeproj/project.pbxproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,10 @@
162162
inputFileListPaths = (
163163
"${PODS_ROOT}/Target Support Files/Pods-TappxUIKitObjCExample/Pods-TappxUIKitObjCExample-frameworks-${CONFIGURATION}-input-files.xcfilelist",
164164
);
165-
inputPaths = (
166-
);
167165
name = "[CP] Embed Pods Frameworks";
168166
outputFileListPaths = (
169167
"${PODS_ROOT}/Target Support Files/Pods-TappxUIKitObjCExample/Pods-TappxUIKitObjCExample-frameworks-${CONFIGURATION}-output-files.xcfilelist",
170168
);
171-
outputPaths = (
172-
);
173169
runOnlyForDeploymentPostprocessing = 0;
174170
shellPath = /bin/sh;
175171
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-TappxUIKitObjCExample/Pods-TappxUIKitObjCExample-frameworks.sh\"\n";

TappxUIKitObjCExample/SceneDelegate.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ - (void)setupNavigationBarAppearance {
6262

6363
appearance.backgroundColor = ColorTheme.primary;
6464
appearance.backgroundEffect = nil;
65+
appearance.shadowColor = [UIColor clearColor];
66+
appearance.shadowImage = [UIImage new];
6567

6668
NSDictionary *titleAttributes = @{
6769
NSForegroundColorAttributeName: ColorTheme.secondaryVariant ?: UIColor.whiteColor,

TappxUIKitObjCExample/Views/BannerView.m

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,32 @@ - (void)cleanupAds {
122122
}
123123

124124
- (void)setupBackButton {
125+
[self setupNavigationBarHeight];
125126
self.navigationItem.leftBarButtonItem = nil;
126127
self.navigationItem.hidesBackButton = YES;
127128

128129
UIImageSymbolConfiguration *config = [UIImageSymbolConfiguration configurationWithPointSize:20 weight:UIImageSymbolWeightBold];
129-
UIImage *backImage = [[UIImage systemImageNamed:@"chevron.backward" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
130+
UIImage *backImage = [[UIImage systemImageNamed:@"chevron.backward" withConfiguration:config] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
130131

131132
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithImage:backImage style:UIBarButtonItemStylePlain target:self action:@selector(backButtonTapped)];
132133
backButton.tintColor = UIColor.whiteColor;
133134
self.navigationItem.rightBarButtonItem = backButton;
134135
}
135136

137+
- (void)setupNavigationBarHeight {
138+
UIView *rectangleView = [[UIView alloc] init];
139+
rectangleView.backgroundColor = [ColorTheme primary];
140+
rectangleView.translatesAutoresizingMaskIntoConstraints = NO;
141+
[self.view addSubview:rectangleView];
142+
143+
[NSLayoutConstraint activateConstraints:@[
144+
[rectangleView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor],
145+
[rectangleView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
146+
[rectangleView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
147+
[rectangleView.heightAnchor constraintEqualToConstant:10.0]
148+
]];
149+
}
150+
136151
- (void)backButtonTapped {
137152
[self.navigationController popViewControllerAnimated:YES];
138153
}

TappxUIKitObjCExample/Views/FullScreenView.m

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

TappxUIKitObjCExample/Views/MainView.m

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,31 @@ - (void)configNavigationBar {
6868
[titleView addSubview:stackView];
6969

7070
[NSLayoutConstraint activateConstraints:@[
71-
[imageView.widthAnchor constraintEqualToConstant:36],
72-
[imageView.heightAnchor constraintEqualToConstant:36],
71+
[imageView.widthAnchor constraintEqualToConstant:45],
72+
[imageView.heightAnchor constraintEqualToConstant:45],
7373
[stackView.centerXAnchor constraintEqualToAnchor:titleView.centerXAnchor],
7474
[stackView.centerYAnchor constraintEqualToAnchor:titleView.centerYAnchor],
7575
[stackView.leadingAnchor constraintGreaterThanOrEqualToAnchor:titleView.leadingAnchor],
7676
[stackView.trailingAnchor constraintLessThanOrEqualToAnchor:titleView.trailingAnchor]
7777
]];
7878

7979
self.navigationItem.titleView = titleView;
80+
[self setupNavigationBarHeight];
81+
82+
}
83+
84+
- (void)setupNavigationBarHeight {
85+
UIView *rectangleView = [[UIView alloc] init];
86+
rectangleView.backgroundColor = [ColorTheme primary];
87+
rectangleView.translatesAutoresizingMaskIntoConstraints = NO;
88+
[self.view addSubview:rectangleView];
89+
90+
[NSLayoutConstraint activateConstraints:@[
91+
[rectangleView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor],
92+
[rectangleView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
93+
[rectangleView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor],
94+
[rectangleView.heightAnchor constraintEqualToConstant:10.0]
95+
]];
8096
}
8197

8298
- (void)setupView {

0 commit comments

Comments
 (0)