-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUM-4151 [SR] Support background color for Tab Bars #1890
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
dda8c0f
[SR] Add background color support for TabBar
mariedm 24d1845
Merge branch 'develop' of https://github.com/DataDog/dd-sdk-ios into …
mariedm 26e3152
Add snapshot tests
mariedm d434f5f
Merge branch 'develop' of https://github.com/DataDog/dd-sdk-ios into …
mariedm 690aaa6
Add new snapshots for Tab Bars
mariedm 5778c80
RUM-4151 Address nit
mariedm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
334 changes: 334 additions & 0 deletions
334
...ay/SRSnapshotTests/SRFixtures/Sources/SRFixtures/Resources/Storyboards/Tabbars.storyboard
Large diffs are not rendered by default.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...lay/SRSnapshotTests/SRFixtures/Sources/SRFixtures/ViewControllers/TabbarControllers.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | ||
* This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
* Copyright 2019-Present Datadog, Inc. | ||
*/ | ||
|
||
import UIKit | ||
|
||
public class TabbarViewControllers: UIViewController { | ||
|
||
@IBOutlet var tabbars: [UITabBar]! | ||
|
||
public override func viewDidLoad() { | ||
for tabbar in tabbars { | ||
// Select the first tabbar's item | ||
// so we can see both a selected and unselected item | ||
tabbar.selectedItem = tabbar.items?.first | ||
} | ||
} | ||
} | ||
|
||
public class EmbeddedTabbarController: UITabBarController { | ||
public override func viewDidLoad() { | ||
tabBar.unselectedItemTintColor = nil | ||
} | ||
} | ||
|
||
public class EmbeddedTabbarUnselectedTintColorController: UITabBarController { | ||
public override func viewDidLoad() { | ||
tabBar.unselectedItemTintColor = UIColor.green | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...SRSnapshotTests/SRSnapshotTests/_snapshots_/pointers/testTabBars()-allow-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"c8db9a89ac040c3733ec239bf92a2bfd6253dee4"} |
1 change: 1 addition & 0 deletions
1
.../SRSnapshotTests/_snapshots_/pointers/testTabBars()-embeddedtabbar-allow-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"72d50780fb4df2e058dad0e8953e439097fd3eaa"} |
1 change: 1 addition & 0 deletions
1
...s/SRSnapshotTests/_snapshots_/pointers/testTabBars()-embeddedtabbar-mask-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"a15b968196c3fd0a268bd3e82a37fef10b31009f"} |
1 change: 1 addition & 0 deletions
1
...napshots_/pointers/testTabBars()-embeddedtabbarunselectedtintcolor-allow-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"a0cf5709cf5cb508728fd1d2ad74f6afd2153a27"} |
1 change: 1 addition & 0 deletions
1
...snapshots_/pointers/testTabBars()-embeddedtabbarunselectedtintcolor-mask-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"dccf7efc3a8379f8cf0d1ee4d63e00a30206bc04"} |
1 change: 1 addition & 0 deletions
1
.../SRSnapshotTests/SRSnapshotTests/_snapshots_/pointers/testTabBars()-mask-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"ace6b7b1f9db81e24d7d19d3fa3652e7b6f290dc"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯👌