Giter Site home page Giter Site logo

ppth0608 / bpstatusbaralert Goto Github PK

View Code? Open in Web Editor NEW
129.0 7.0 13.0 48 KB

BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

License: MIT License

Ruby 8.88% Swift 91.12%
ios ios-ui statusbar alertview notifications

bpstatusbaralert's Introduction

BPStatusBarAlert

Version License Platform

BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

Demo

StatusBar Position

NavigationBar Position

Requirements

  • Deployment Target - iOS 8.3
  • Swift Version - Swift 3

Installation

CocoaPods

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

pod "BPStatusBarAlert"

Manual

Copy the folder BPStatusBarAlert to your project

Usage

First, you need the following import BPStatusBarAlert

import BPStatusBarAlert

Now, you can uses BPStatusBarAlert simply like this

@IBAction func buttonTapped(_ sender: Any) {
    BPStatusBarAlert()
        .message(message: "Complete Sharing This Contents")
        .show()
}

Initialize BPStatusBarAlert with no parameters, it will set up default value for property Default setting

  • Animation Duration : 0.3
  • Animation Delay : 2.0
  • Postion : .statusBar
  • Background Color : UIColor(red: 77/255, green: 188/255, blue: 201/255, alpha: 1)
  • Message Text : ""
  • Message Text Color : .white
  • Completion : nil

So, If you want customize property, just call init method with parameters and chaning function

  • init (customize Duration, Delay and Postion) BPStatusBarAlert class init method is composed below code
public init(duration: TimeInterval = 0.3, delay: TimeInterval = 2, position: AlertPosition = .statusBar)

So, if you change time interval in animations and position of BPStatusBarAlert, using defaults paramaters

  • chaning function (customize Background Color, Message Text, Message Text Color, Completion)
BPStatusBarAlert(duration: 0.3, delay: 2, position: .statusBar) // customize duration, delay and position
    .message(message: "Complete Sharing This Contents")         // customize message
    .messageColor(color: .white)                                // customize message color
    .bgColor(color: .blue)                                      // customize view's background color
    .completion { print("completion closure will called") }     // customize completion(Did hide alert view)
    .show()                                                     // Animation start

TODO

  • Change window level on NavigationBar position
  • Support landscape Mode
  • Custom Show and Hide (like facebook)
  • Support Custom Navigation Bar

Author

Ben.Park, [email protected]

Contribute

always welcome :) Only pull request.

License

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

bpstatusbaralert's People

Contributors

bachonk avatar logansease avatar ppth0608 avatar samehsalama avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bpstatusbaralert's Issues

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.