TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Dec 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Makoto Mori.
Tamamushi is an easy to use gradient UINavigationBar written in Swift 3. You can use already defined gradient color sets like Facebook Messenger, YouTube, SoundCloud or other cool gradient color sets.
And “Tamamushi” is the Japanese name of the insect which has beautiful gradient color wings.
import Tamamushi
in the class you set gradient UINavigationBar
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
TMGradientNavigationBar().setInitialBarGradientColor(direction: .vertical, typeName: "SoundCloud")
return true
}
override func viewDidLoad() {
super.viewDidLoad()
TMGradientNavigationBar().setGradientColorOnNavigationBar(bar: (self.navigationController?.navigationBar)!, direction: .vertical, typeName: "Facebook Messenger")
}
You can use gradient color sets defined in gradients.json.
TMGradientNavigationBar().setInitialBarGradientColor(direction: .vertical, typeName: "SoundCloud")
Please look at the ist of gradient colors available.
Of course you can use original gradient colors.
TMGradientNavigationBar().setInitialBarGradientColor(direction: .horizontal, startColor: .red, endColor: .blue)
you can choose the direction of gradation. (Default is vertical)
.horizontal
, or .vertical
This library is released with MIT license. And as a source of colors, JSON file from uiGradients by ghosh is used.