microsoft / FluentDarkModeKit

A library for backporting Dark Mode in iOS
MIT License
1.63k stars 125 forks source link

Add theme change handler #89

Closed levinli303 closed 4 years ago

levinli303 commented 4 years ago

When theme changes, invoke the block in configuration

Adding this so we don't have to swizzle UIScreen's traitCollectionDidChange or subclass UIWindow to observe change, needed in our project.

Breaking down the original register to setup (can only be called once) & register

levinli303 commented 4 years ago

@zhuorantan @li-bei can you take a look?