GyozaKit 1.1.0

GyozaKit 1.1.0

Maintained by John Crossley.




GyozaKit 1.1.0

Version License Platform

GyozaKit 🥟

Requirements

iOS 11.0+ Xcode 10.0+ Swift 5.0+

GyozaKit Demo

Installation

GyozaKit is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'GyozaKit'

and run

pod install

Usage

When building a Gyoza the most basic example is the one shown below. The only property you need to set on the builder is a message.

Basic Example

import GyozaKit

let gyoza = Gyoza { builder in
    builder.message = "Don't forget to wash the dishes!"
}

gyoza.show(on: self.view)

Once we're happy with our Gyoza we can call show(on: self.view) which will then present the message onto the current view.

Custom Example

import GyozaKit

let gyoza = Gyoza { builder in
    builder.message = "Jaded zombies acted quaintly but kept driving their oxen forward."
    builder.messageColor = .white
    builder.backgroundColor = UIColor(red: 0.20, green: 0.20, blue: 0.20, alpha: 1.00)

    builder.actionLabelColor = UIColor(red: 0.16, green: 0.90, blue: 0.40, alpha: 1.00)
    builder.action = Gyoza.Action(title: "ACTION", handler: {
        # ...
    })
}

gyoza.show(on: self.view)

Pin a Gyoza to the Top or Bottom of the screen

You can now specify where to pin a Gyoza on screen using the following example.

import GyozaKit

let gyoza = Gyoza { builder in
    builder.message = "Welcome back, John! 😍"
    builder.pinTo = .top // this defaults to bottom if not specified
}

gyoza.show(on: self.view)

Author

License

GyozaKit is available under the MIT license. See the LICENSE file for more info.