Skip to content

Commit c14f416

Browse files
refactor: add dark theme support for demo app
1 parent 2c24f6b commit c14f416

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

Example App/EmojiPicker.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Begin PBXFileReference section */
1818
028AB9FF7F7146CA02C6047E /* Pods-EmojiPicker_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EmojiPicker_Example.debug.xcconfig"; path = "Target Support Files/Pods-EmojiPicker_Example/Pods-EmojiPicker_Example.debug.xcconfig"; sourceTree = "<group>"; };
19-
39C5556144E64B4781AC3E2C /* EmojiPicker.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = EmojiPicker.podspec; path = ../EmojiPicker.podspec; sourceTree = "<group>"; };
19+
39C5556144E64B4781AC3E2C /* EmojiPicker.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = EmojiPicker.podspec; path = ../EmojiPicker.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
2020
4E7BA306C8344910609AD79B /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
2121
52C75966261C87A105AE3101 /* Pods_EmojiPicker_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_EmojiPicker_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
2222
607FACD01AFB9204008FA782 /* EmojiPicker_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = EmojiPicker_Example.app; sourceTree = BUILT_PRODUCTS_DIR; };
Binary file not shown.

Example App/EmojiPicker/AppDelegate.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1616
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
1717

1818
let window = UIWindow(frame: UIScreen.main.bounds)
19-
20-
if #available(iOS 13.0, *) {
21-
window.overrideUserInterfaceStyle = .light
22-
}
2319
window.rootViewController = ViewController()
2420
window.makeKeyAndVisible()
2521
self.window = window

Example App/EmojiPicker/ViewController.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,12 @@ class ViewController: UIViewController {
3434
}
3535

3636
private func setupView() {
37-
view.backgroundColor = .white
37+
if #available(iOS 13.0, *) {
38+
view.backgroundColor = .systemBackground
39+
} else {
40+
view.backgroundColor = .white
41+
}
42+
3843
view.addSubview(emojiButton)
3944

4045
NSLayoutConstraint.activate([

0 commit comments

Comments
 (0)