CocoaPods trunk is moving to be read-only. Read more on the blog, there are 11 months to go.

QXMessageView 0.0.6

QXMessageView 0.0.6

Maintained by labi3285.



  • By
  • labi3285

QXMessageView

A easy customize tip shower in swift.

install

pod search QXMessageView

simple use

extension UIViewController {
    func showLoading(msg: String?) {
        _ = QXMessageView.demoLoading(msg: msg, superview: view)
    }
    func hideLoading() {
        for view in view.subviews {
            if let view = view as? QXMessageView {
                view.remove()
            }
        }
    }
    func showSuccess(msg: String, complete: (() -> ())? = nil) {
        QXMessageView.demoSuccess(msg: msg, superview: view, complete: complete)
    }
    func showFailure(msg: String, complete: (() -> ())? = nil) {
        QXMessageView.demoFailure(msg: msg, superview: view, complete: complete)
    }
    func showWarning(msg: String, complete: (() -> ())? = nil) {
        QXMessageView.demoWarning(msg: msg, superview: view, complete: complete)
    }
}

customize

For customize showers, Just like how demo implemented.

class DemoView: QXMessageViewContentViewProtocol {
    // Customize view follow QXMessageViewContentViewProtocol
}
let demoView = DemoView()
let messageView = QXMessageView.messageView(contentView: demoView, superview: self, duration: 1, complete: {
    // todo
})

Have fun!