NightNight
Elegant way to integrate night mode to swift projects.
NightNight makes it easy to integrate night mode. It provides multiple APIs which all contain keyword mixed.
If you want to implement night mode in Objective-C project without import swift code. This is the Objective-C version DKNightVersion.
Features • Usage • Customize • Demo • Installation • License
Features
- [x] Integrate night mode easily
- [x] UIColor and UIImage support
- [x] Support NSAttributedString
- [x] Better autocompletion
- [x] Customize with notification
Usage
-
Use
MixedColor
instead ofUIColor
-
Use
MixedImage
instead ofUIImage
-
Support
NSAttributedString
-
NavigationBar
barStyle -
Change current theme to
.NORMAL
or.NIGHT
Customize
NightNight will send NightNightThemeChangeNotification
. if you wanna some customize features, you can observe it and change what you want in corresponding selector.
Demo
Installation
Carthage
Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.
You can install Carthage with Homebrew using the following command:
To integrate NightNight into your Xcode project using Carthage, specify it in your Cartfile
:
Cocoapods
CocoaPods is a dependency manager for Cocoa projects.
You can install it with the following command:
To integrate NightNight into your Xcode project using CocoaPods, specify it in your Podfile
:
Manually
- Download and drop
NightNight/Classes
folder in your project. - Congratulations!