Latest 0.1.3
Homepage https://github.com/makomori/Tamamushi
License MIT
Platforms ios 8.0, requires ARC
Authors

Header of Tamamushi

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.

Requirements

  • Swift 3
  • Xcode 8

Installation

Cocoapods

pod 'Tamamushi'

Carthage

Will be available soon.

Usage

import Tamamushi in the class you set gradient UINavigationBar

In AppDelegate

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
    TMGradientNavigationBar().setInitialBarGradientColor(direction: .vertical, typeName: "SoundCloud")
    return true
}

In UIViewController(with NavigationBar)

override func viewDidLoad() {
    super.viewDidLoad()  
    TMGradientNavigationBar().setGradientColorOnNavigationBar(bar: (self.navigationController?.navigationBar)!, direction: .vertical, typeName: "Facebook Messenger")
}

Customization

Using defined colors

You can use gradient color
defined in gradients.json.

TMGradientNavigationBar().setInitialBarGradientColor(direction: .vertical, typeName: "SoundCloud")

Please look at the ist of gradient colors available.

Using original colors

Of course you can use original gradient colors.

TMGradientNavigationBar().setInitialBarGradientColor(direction: .horizontal, startColor: .red, endColor: .blue)

Direction

you can choose the direction of gradation. (Default is vertical)

.horizontal, or .vertical

License

This library is released with MIT license. And as a source of colors, JSON file from uiGradients by ghosh is used.

Latest podspec

{
    "name": "Tamamushi",
    "version": "0.1.3",
    "summary": "Easy to use gradient UINavigationBar library written in Swift",
    "homepage": "https://github.com/makomori/Tamamushi",
    "license": "MIT",
    "authors": {
        "makomori": "[email protected]"
    },
    "source": {
        "git": "https://github.com/makomori/Tamamushi.git",
        "tag": "0.1.3"
    },
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Tamamushi/*.swift",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This