All Projects → ytakzk → Hokusai

ytakzk / Hokusai

Licence: mit
A Swift library to provide a bouncy action sheet

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Hokusai

Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (+87.7%)
Mutual labels:  cocoapods, carthage, uikit
Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (-2.32%)
Mutual labels:  cocoapods, carthage, uikit
Watchdoginspector
Shows your current framerate (fps) in the status bar of your iOS app
Stars: ✭ 497 (+15.31%)
Mutual labels:  cocoapods, carthage, uikit
Tkswitchercollection
An animation switch collection
Stars: ✭ 877 (+103.48%)
Mutual labels:  cocoapods, carthage, uikit
Swifterswift
A handy collection of more than 500 native Swift extensions to boost your productivity.
Stars: ✭ 10,706 (+2383.99%)
Mutual labels:  cocoapods, carthage, uikit
Ezswiftextensions
😏 How Swift standard types and classes were supposed to work.
Stars: ✭ 2,911 (+575.41%)
Mutual labels:  cocoapods, carthage, uikit
Bfkit
BFKit is a collection of useful classes and categories to develop Apps faster.
Stars: ✭ 811 (+88.17%)
Mutual labels:  cocoapods, carthage, uikit
Bfkit Swift
BFKit-Swift is a collection of useful classes, structs and extensions to develop Apps faster.
Stars: ✭ 963 (+123.43%)
Mutual labels:  cocoapods, carthage, uikit
Tkrubberindicator
A rubber animation pagecontrol
Stars: ✭ 1,337 (+210.21%)
Mutual labels:  cocoapods, carthage, uikit
Alertift
Swifty, modern UIAlertController wrapper.
Stars: ✭ 242 (-43.85%)
Mutual labels:  cocoapods, carthage, uikit
Stepslider
StepSlider its custom implementation of slider such as UISlider for preset integer values.
Stars: ✭ 391 (-9.28%)
Mutual labels:  cocoapods, carthage, uikit
Ssspinnerbutton
Forget about typical stereotypic loading, It's time to change. SSSpinnerButton is an elegant button with a diffrent spinner animations.
Stars: ✭ 357 (-17.17%)
Mutual labels:  cocoapods, carthage
Xcglogger
A debug log framework for use in Swift projects. Allows you to log details to the console (and optionally a file), just like you would have with NSLog() or print(), but with additional information, such as the date, function name, filename and line number.
Stars: ✭ 3,710 (+760.79%)
Mutual labels:  cocoapods, carthage
Swiftyxmlparser
Simple XML Parser implemented in Swift
Stars: ✭ 413 (-4.18%)
Mutual labels:  cocoapods, carthage
Foldingtabbar.ios
Folding Tab Bar and Tab Bar Controller
Stars: ✭ 3,677 (+753.13%)
Mutual labels:  cocoapods, carthage
Gzipswift
Swift framework that enables gzip/gunzip Data using zlib
Stars: ✭ 356 (-17.4%)
Mutual labels:  cocoapods, carthage
Circularprogress
Circular progress indicator for your macOS app
Stars: ✭ 366 (-15.08%)
Mutual labels:  cocoapods, carthage
Restofire
Restofire is a protocol oriented networking client for Alamofire
Stars: ✭ 377 (-12.53%)
Mutual labels:  cocoapods, carthage
Observable
The easiest way to observe values in Swift.
Stars: ✭ 346 (-19.72%)
Mutual labels:  cocoapods, carthage
Vgplayer
📺 A simple iOS video player by Vein.
Stars: ✭ 383 (-11.14%)
Mutual labels:  cocoapods, carthage

Main

Hokusai is a Swift library that provides a bouncy action sheet.
It will give the users a fancy experience without taking pains coding the cool animation.
Hokusai is compatible with Swift3.

Version Platform CI Status Carthage compatible

Installation

Drop in the Classes folder to your Xcode project.
You can also use cocoapods or Carthage.

Using cocoapods

Add pod 'Hokusai' to your Podfile and run pod install. Also add use_frameworks! to the Podfile.

use_frameworks!
pod 'Hokusai'

Using Carthage

Add github "ytakzk/Hokusai" to your Cartfile and run carthage update. If unfamiliar with Carthage then checkout their Getting Started section.

github "ytakzk/Hokusai"

Demo

Demo

Hokusai Usage

Import Hokusai import Hokusai then use the following codes in some function except for viewDidLoad.

let hokusai = Hokusai()

// Add a button with a closure
hokusai.addButton("Button 1") {
    println("Rikyu")
}

// Add a button with a selector
hokusai.addButton("Button 2", target: self, selector: Selector("button2Pressed"))

// Set a font name. AvenirNext-DemiBold is the default. (Optional)
hokusai.fontName = "Verdana-Bold"

// Select a color scheme. Just below you can see the dafault sets of schemes. (Optional)
hokusai.colorScheme = HOKColorScheme.Enshu

// Show Hokusai
hokusai.show()

// Selector for button 2
func button2Pressed() {
    println("Oribe")
}

// Change a title for cancel button. Default is Cancel. (Optional)
hokusai.cancelButtonTitle = "Done"

// Add a callback for cancel button (Optional)
hokusai.cancelButtonAction = {
    println("canceled")
}

Add a title and message

// Init with title
let hokusai = Hokusai(headline: "Information")

// Init with title and message
let hokusai = Hokusai(headline: "Information", message: "This can be a long multi-lined message.")

// ...or add title and message later, but before you call `show()`
hokusai.headline = "Infomration"
hokusai.message  = "This can be a long multi-lined message."

Add a button with a closure

hokusai.addButton("Button Title") {
    // Do anything you want
}

Add a button with a selector

hokusai.addButton("Button Title", target: self, selector: Selector("buttonPressed"))

func buttonPressed() {
    // Do anything you want
}

Color schemes

Demo

public enum HOKColorScheme {
    case  Hokusai,
          Asagi,
          Matcha,
          Tsubaki,
          Inari,
          Karasu,
          Enshu
}

Or you can use your favorite color combination.

hokusai.colors = HOKColors(
    backGroundColor: UIColor.blackColor(),
    buttonColor: UIColor.purpleColor(),
    cancelButtonColor: UIColor.grayColor(),
    fontColor: UIColor.whiteColor()
)

Author

ytakzk
https://ytakzk.me

Donation

Your support is welcome through Bitcoin 3Ps8tBgz4qn6zVUr5D1wcYrrzYjMgEugqv

License

Hokusai is released under the MIT license.
See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].