Giter VIP home page Giter VIP logo

alertview's Introduction

AlertView

Platform Language

Requirements

  • Swift 5.1
  • Xcode 10.1 or greater
  • iOS 11 or greater

Author

Douglas Nunes, [email protected]

Usage

let config = AlertViewBuilder()

Supported Attributes AlertViewBuilder

Description Default value
icon(_ image: UIImage?) not value Default
title(_ title: String?) not value Default
message(_ message: String?) not value Default
styledMessage(_ message: NSAttributedString?) not value Default
textAlign(_ alignment: NSTextAlignment) .center
tapDismiss(_ tap: Bool) true
enableVibrate(_ enable: Bool) true
cancelButtonTitle(_ title: String?) not value Default
doneButtonTitle(_ title: String?) not value Default
titleColorButtonDone(_ color: UIColor) .white
backgroundColorButtonDone(_ color: UIColor) UIColor(red: 0.03, green: 0.31, blue: 0.62, alpha: 1)
titleColorButtonCancel(_ color: UIColor) .white
backgroundColorButtonCancel(_ color: UIColor) .red

###Configuration file declaration

let config = AlertViewBuilder()
            .title("Parceiro Ambev alerta!")
            .textAlign(.center)
            .tapDismiss(true)
            .cancelButtonTitle("Cancel")
            .doneButtonTitle("Confirm")
            .build()
 let alert = CustomAlertView()

AlertView component declaration with Button Cancel and Done.

alert.show(config: config,
                   doneAction: {
                    print("Click in Confirm")
        }, cancelAction: {
            print("Click in Cancel")
        })

AlertView component declaration with Button Done.

alert.show(config: config,
                   doneAction: {
                    print("Click in Confirmar")
        })

alertview's People

Contributors

dougbhdev avatar maclacerda avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.