A light weight framework adding night version to your iOS app.
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like DKNightVersion in your projects. See the Get Started section for more details.
pod "DKNightVersion", "~> 0.4.3"
#import "DKNightVersion.h"
API documentation is not available now.
This framework is based on a property nightColor
, such as nightBackgroundColor
nightTextColor
...
Assign the night version color you want to the UIKit
component:
self.view.nightBackgroundColor = [UIColor blackColor];
self.label.nightTextColor = [UIColor whiteColor];
Use DKNightVersionManager
sets the theme.
[DKNightVersionManager nightFalling];
If you'd like to switch back to normal theme version:
[DKNightVersionManager dawnComing];
property_table.yaml
is a file which saves the night color you need, if the exising colors is not enough for you, add the class
and property
in it.
UIView:
properies:
- backgroundColor
UILabel:
superclass: UIView
properies:
- textColor
Notice the superclass property is needed if it has a superclass.
ruby objc_generator.rb
Run this command in Classes/Generator
folder, this will dynamically generate Objective-C code in Classes/UIKit/Auto
folder.
Drag them in your workspace. And then everything works fine.
DKNightVersion is available under the MIT license. See the LICENSE file for more info.
Add UIButton support