Created
May 2, 2020 04:11
-
-
Save mukyasa/5251a50887e74168b7ab38262cca9445 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
protocol ThemeProtocol { | |
func addThemeChangeObserver() | |
func configureSubviewsColors() | |
} | |
extension ThemeProtocol { | |
func addThemeChangeObserver() { | |
if #available(iOS 13, *) { | |
} else { | |
NotificationCenter.default.addObserver(forName: NSNotification.Name(rawValue: "themeChange"), | |
object: nil, | |
queue: OperationQueue.main) { _ in | |
self.configureSubviewsColors() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment