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

Overview

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.

You might also like...
PMAlertController is a great and customizable alert that can substitute UIAlertController
PMAlertController is a great and customizable alert that can substitute UIAlertController

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable

Customizable simple Alert and simple ActionSheet for Swift
Customizable simple Alert and simple ActionSheet for Swift

SimpleAlert It is simple and easily customizable alert. Can be used as UIAlertController. Appetize's Demo Requirements Swift 5.0 iOS 9.0 or later How

A simple alert with logo image and color.
A simple alert with logo image and color.

YMLogoAlert About YMLogoAlert A simple custom alert. YMLogoAlert lets you pop up a simple alert with a natural animation, your app's own color, font a

Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets. Support SwiftUI.
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets. Support SwiftUI.

SPAlert Popup from Apple Music & Feedback in AppStore. Contains Done, Heart, Error and other presets. Supports Dark Mode. I tried to recreate Apple's

An easier constructor for UIAlertController. Present an alert from anywhere.
An easier constructor for UIAlertController. Present an alert from anywhere.

ALRT An easier constructor for UIAlertController. Present an alert from anywhere like this. ALRT.create(.alert, title: "Alert?").addOK().addCancel().s

A colored alert view for your iOS.
A colored alert view for your iOS.

日本語 KRAlertController KRAlertController is a beautiful and easy-to-use alert controller for your iOS written by Swift. Requirements iOS 10.0+ Xcode 10

A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style.
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style.

Introduction Popup Dialog is a simple, customizable popup dialog written in Swift. Features Easy to use API with hardly any boilerplate code Convenien

Beautiful animated Alert View. Written in Swift
Beautiful animated Alert View. Written in Swift

SCLAlertView Animated Alert View written in Swift, which can be used as a UIAlertView or UIAlertController replacement. Since UIAlertView is deprecate

Live animated Alert View for iOS written in Swift
Live animated Alert View for iOS written in Swift

Sweet Alert iOS Beautiful Animated custom Alert View inspired from javascript library SweetAlert. Written in Swift this SweetAlertView can be used in

Comments
  • iphone x max and XR support

    iphone x max and XR support

    this PR addresses several issues for iphone max and xr

    • adds new screen sizes to the notch check
    • uses a check to look at the safe area inset size to determine notch existence
    • explicitly position message at bottom of the status bar

    Also

    • fixes the nav bar message to handle a tab bar controller in the root
    • increases font weight to medium for better visibility
    opened by logansease 1
  • Unable to find a specification for `BPStatusBarAlert`

    Unable to find a specification for `BPStatusBarAlert`

    Trying to install with cocoapods (pod 'BPStatusBarAlert') but get error message: "[!] Unable to find a specification for BPStatusBarAlert"

    Any idea what is wrong?

    opened by feltreich 1
Releases(0.1.6)
Owner
Ben.Park
iOS Developer
Ben.Park
JAlert - This is "Alert View" project for UIKit + SwiftUI. you can use easily

JAlert Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation JAlert is a

Jackson 3 Feb 22, 2022
It is a highly configurable iOS library which allows easy styling with built in styles as well as extra header and footer views so that you can make extremely unique alerts and action sheets.

 CFAlertViewController CFAlertViewController is a library that helps you display and customise Alerts, Action Sheets, and Notifications on iPad and i

Crowdfire Inc. 1.1k Dec 18, 2022
TextFieldAlert - A SwiftUI alert with text field(s) for iOS 13 and greater.

TextFieldAlert A SwiftUI alert with text field(s) for iOS 13 and greater. As Apple is going to introduce text field(s) as an alert actions in iOS 16,

Piotr Sochalewski 13 Dec 5, 2022
Animated alert library like Swarm app.

TKSwarmAlert Animation Tool for Alert like Swarm app. ScreenShot Installation CocoaPods You can use CocoaPods to install TKSwarmAlert by adding it to

Takuya Okamoto 581 Dec 2, 2022
AlertTransition is a extensible library for making view controller transitions, especially for alert transitions.

AlertTransition AlertTransition is a extensible library for making view controller transitions, especially for alert transitions. Overview AlertTransi

Loopeer 570 Nov 29, 2022
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.

StatusAlert is being sponsored by the following tool; please help to support us by takin a look and signing up to a free trial. Dependency managers Fe

Yehor Miroshnychenko 841 Dec 6, 2022
(Experimental libraries) Controls interrupt handling, such as alert views, and is compatible with UIKit and Swift UI.

UIPresentCoordinator Controls interrupt handling, such as alert views, and is compatible with UIKit and Swift UI. This library manages items that are

Yuki Tamazawa 1 Jan 22, 2022
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift

CDAlertView is highly customizable alert popup written in Swift. Usage is similar to UIAlertController. Screenshots Animations Usage Basic usage witho

Candost Dagdeviren 1.1k Dec 30, 2022
PMAlertController is a great and customizable alert that can substitute UIAlertController

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable

Paolo Musolino 2.5k Jan 3, 2023
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.

SPAlert Popup from Apple Music & Feedback in AppStore. Contains Done, Heart, Error and other presets. Supports Dark Mode. I tried to recreate Apple's

Ivan Vorobei 1.8k Jan 7, 2023