Skip to content

hirohisa/Floating

Repository files navigation

Floating

CocoaPods Carthage compatible license

Floating is a very flexible overlay library.

Requirements

  • iOS 10.0+
  • Xcode 9.2+, Swift 4.1

CocoaPods

pod 'Floating'

Carthage

github "hirohisa/Floating"

Usage

FloatingView<T: UIView>

present

func didTapButton(_ sender: UIButton) {
  let floatingView = FloatingView(textField)
  floatingView.present(from: sender.frame)
}

Handling with Life Cycle

// State

enum Floating.State {
    case willPresent
    case didPresent
    case willDismiss
    case didDismiss
}

floatingView.handler = { (state: State, object: T) in
    print(state)
    print(object)
}

License

Floating is available under the MIT license.

About

Floating is a very flexible overlay library.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published