A lightweight dropdown notification for iOS 7+, in Swift.

Overview

BRYXBanner

Version Carthage compatible License Platform

A lightweight dropdown banner for iOS 7+.

Example

Usage

Import BRYXBanner

import BRYXBanner

Create a banner using the designated initializer.

let banner = Banner(title: "Image Notification", subtitle: "Here's a great image notification.", image: UIImage(named: "Icon"), backgroundColor: UIColor(red:48.00/255.0, green:174.0/255.0, blue:51.5/255.0, alpha:1.000))
banner.dismissesOnTap = true
banner.show(duration: 3.0)

If you want the banner to persist until you call .dismiss(), leave the argument out of the call to .show()

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Demo project requires iOS 8, though BRYXBanner works on iOS 7+.

Installation

BRYXBanner is available through CocoaPods and Carthage.

Using CocoaPods

To install it, simply add the following line to your Podfile:

pod 'BRYXBanner'

If you need to support iOS 7, just copy Banner.swift into your Xcode project.

Using Carthage

Create a Cartfile in your project directory and add the following line.

github "bryx-inc/BRYXBanner"

Run carthage update from the command line. This will build the framework. The framework will be within Carthage/build/BRYXBanner.framework.

Add the framework to your project by going to your app's targets and selecting the General tab. Drag the built framework onto Linked Frameworks and Libraries

Go to the Build Phases tab, click the + sign and add a new run script phase. Then add the following:

/usr/local/bin/carthage copy-frameworks

to the box under Shell. Finally click + to add a new input file. Replace the default with:

$(SRCROOT)/Carthage/Build/iOS/BRYXBanner.framework

Now build and run. You're all set! More information on Carthage is available here.

Documentation

Docs are automatically generated and available right here.

Authors

Harlan Haskins (@harlanhaskins) Adam Binsz (@adambinsz)

License

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

Comments
  • Carthage install, received warning

    Carthage install, received warning

    After doing a Carthage install, I received this warning: warning: use of string literal for Objective-C selectors is deprecated; use '#selector' instead

    Would you be able to update for this?

    opened by daver234 9
  • Using the same banner will cause an incorrect width

    Using the same banner will cause an incorrect width

    When using the same banner more than once, the width of the banner will shrink to the hug the text content. This is likely an issue of not resting the layout of the view. An example is below. bug png

    opened by mosabelagha 8
  • Carthage Framework not Built

    Carthage Framework not Built

    Hi,

    When I add BRYXBAnner to my cart file github "bryx-inc/BRYXBanner"it gets checked out but a framework isn't built, my guess is that the Scheme for the Framework isn't shared as I can't see it in the version that is checked out by Carthage?

    opened by ObjColumnist 8
  • Fixed Height Calculations

    Fixed Height Calculations

    Fixed layout issues where height was not being calculated properly wh…en showing banner based on if it was being show in a view or the window and the appearance of the status bar.

    • When shown in a view other than the topWindow, the banner's minimum height is 0, so that the banner sizes to it's content.
    • When show in a view other than the topWindow, the height offset for the status bar no longer applies.
    • When shown in the topWindow while the status bar is not shown (such as when in landscape orientation), the height offset for the status bar no longer applies.
    • When shown in the topWindow while the status bar is not shown (such as when in landscape orientation), the minimum height for the status bar is set to a more appropriate height of 40.
    • All of the above changes update automatically upon orientation change.
    opened by AnthonyMDev 7
  • Wrong width

    Wrong width

    Hi guys, when I show the banner on a tableView it appears smaller than the tableView. In the image the tableView is the yellow one and the banner obviously is the red one. simulator screen shot 26 set 2015 16 29 12

    bug help wanted 
    opened by MaxFrax 7
  • MinimumHeight not work on with Bottom appear

    MinimumHeight not work on with Bottom appear

    Hi,

    I have a issue with minimumHeight property. If you show banner from bottom, this property not work (with Xcode inspector I see auto layout issue)

    If shown from top, minimumHeight works ONLY IF show is used without view (passing nil)

    Thank you

    opened by m3rLin0WoRK 6
  • Updated Swift Syntax to Xcode Beta 6 and Fixed Banner Animations on iOS 10

    Updated Swift Syntax to Xcode Beta 6 and Fixed Banner Animations on iOS 10

    Hi guys, the title says it all.

    I've described the animation problem in https://github.com/bryx-inc/BRYXBanner/issues/51 , today I've found a bit of time and fixed it.

    The problem originates from a -layoutIfNeeded incorrect behaviour on iOS 9.

    I've found out about this by reading the Release Notes of iOS 10 Beta 6.

    For your convenience, here's the interesting part (Under UIKit Notes and Known Issues):


    Sending -layoutIfNeeded to a view is not expected to move the view, but in earlier releases, if the view had translatesAutoresizingMaskIntoConstraints == false, and if it was being positioned by constraints, -layoutIfNeeded would move the view to match the layout engine before sending layout to the subtree.

    These changes correct this behavior, and the receiver’s position and usually its size won’t be affected by -layoutIfNeeded.

    Some existing code may be relying on this incorrect behavior that is now corrected. There is no behavior change for binaries linked before iOS 10, but when building on iOS 10 you may need to correct some situations by sending -layoutIfNeeded to a superview of the translatesAutoresizingMaskIntoConstraints == false view that was the previous receiver, or else positioning and sizing it before (or after, depending on your desired behavior) -layoutIfNeeded.


    Cheers!

    opened by zntfdr 6
  • Swift 2.3 release

    Swift 2.3 release

    I see there's no working Swift 2.3 release as the iOS 10 animation fixes were bundled with the Swift 3 syntax changes. Is there any chance of doing a release for those of us who are sticking to Swift 2.3 for the time being?

    opened by jannemecek 5
  • Feature Proposal - Banner Templates

    Feature Proposal - Banner Templates

    It would be nice to have some pre-made template banners that have a preset color and image for some common uses.

    For example:

    • Error - red with an error icon
    • Warning - yellow with an error icon
    • Success - green with a checkmark icon

    I'd like to create a BannerTemplateType protocol and add a convenience initializer that takes a BannerTemplateType as a parameter.

    Then, I would create a few structs that conform to BannerTemplateType for the pre-made templates. This allows users to easily create their own banner templates, or even make their custom error types conform to BannerTemplateType to be easily displayed.

    @harlanhaskins I'd be willing to make a PR for this if you are interested. I wanted to get your thoughts on this before I started implementation.

    opened by AnthonyMDev 5
  • Allow customization of position (top or bottom)

    Allow customization of position (top or bottom)

    Allow the option of positioning the banner to the top or bottom of the view. I've done this myself in a hacky way, but can make an actual solution whenever I have time

    opened by mosabelagha 5
  • cannot pod install

    cannot pod install

    Resolving dependencies of Podfile [!] Unable to satisfy the following requirements:

    • BRYXBanner required by Podfile

    /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:388:in handle_resolver_error' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:69:inrescue in resolve' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/resolver.rb:56:in resolve' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:535:inblock in resolve_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/user_interface.rb:59:in section' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:533:inresolve_dependencies' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer/analyzer.rb:70:in analyze' /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.38.2/lib/cocoapods/installer.rb:210:inanalyze'

    opened by longxianlin 5
  • BRYXBanner/BRYXBanner-Swift.h file not found

    BRYXBanner/BRYXBanner-Swift.h file not found

    I am using react-native-notification-banner, when I ran the pod install it install it installs RNNotificationBanner BRYXBanner but when i am running the project it fails with an error

    'BRYXBanner/BRYXBanner-Swift.h' file not found

    What I have to do for resolving this ??

    opened by diivyu 1
  • Is there any user data that is either being collected or Tracked by the BRYXBanner

    Is there any user data that is either being collected or Tracked by the BRYXBanner

    As part of the iOS 14 /AppTracking Transparency framework, would like to know if any kind of the user data is collected or Tracked by the BRYXBanner.

    As mentioned in the Apple (Ref: https://developer.apple.com/support/app-privacy-on-the-app-store/), below were some of the examples for Tracking:

    • Sharing device location data or email lists with a data broker.
    • Placing a third-party SDK in our app that combines user data from the app with user data from other developers’ apps to target advertising or measure advertising efficiency, even if we don’t use the SDK for these purposes. For example, using a login SDK that repurposes the data it collects from the app to enable targeted advertising in other developers’ apps.

    The following situations are not considered tracking:

    • When the data is linked solely on the end-user’s device and is not sent off the device in a way that can identify the end-user or device.
    • When the data broker uses the data shared with them solely for fraud detection or prevention or security purposes, and solely on our behalf.
    opened by ghost 0
  • Deployment Target is set to 8.0

    Deployment Target is set to 8.0

    Trying to update and recompile this. I get the following error.

    Build Failed Task failed with exit code 1: The log file shows the following warning in it.

    warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99. (in target 'BRYXBanner' from project 'Pods')

    Let me know if need any additional details.

    opened by rudenik 0
Releases(0.8.5)
Owner
Bryx, Inc
Bryx, Inc
Simple DropDown Alert View For Any iOS Projects.

⚠️ DEPRECATED, NO LONGER MAINTAINED JDropDownAlert JDropDownALert Simple DropDown Alert View For Any iOS Projects. Usage Top let alert = JDropDown

WonJo 71 Jul 17, 2022
Swift library to manage in app notification in swift language, like WhatsApp, Telegram, Frind, ecc.

InAppNotify - Manage in App notifications During develop of my app Frind, I needed to manage in app notifications like whatsapp or telegram, but i did

Luca Becchetti 438 Nov 20, 2022
The easiest way to display highly customizable in app notification banners in iOS

Written in Swift 5 NotificationBanner is an extremely customizable and lightweight library that makes the task of displaying in app notification banne

Dalton Hinterscher 4.5k Jan 9, 2023
A modern iOS toast view that can fit your notification needs

CRToast CRToast is a library that allows you to easily create notifications that appear on top of or by pushing out the status bar or navigation bar.

Collin Ruffenach 4.2k Dec 30, 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
A crisp in-app notification/message banner built in Swift.

RMessage Screenshots Intro Welcome to RMessage! RMessage is a simple notification library written in Swift to help you display notification on the scr

Adonis Peralta 407 Nov 29, 2022
In-app notification in Swift, with customizable buttons and input text field.

Notie Undistracted in-app notification in Swift, with added buttons and input box. Installation CocoaPods To integrate Notie into your Xcode project u

Thi Doãn 85 Aug 8, 2020
Emulates the native Remote Notification View.

Introduction HDNotificationView appears notification view like system. Requirement iOS 9.0+ Installation Carthage github "nhdang103/HDNotificationView

Nguyen Hai Dang 357 Nov 20, 2022
A simple and attractive AlertView to ask permission to your users for Push Notification.

A simple and attractive AlertView **to ask permission to your users for Push Notification.** PRESENTATION Ask permission to user for push notification

Boisney Philippe 37 Mar 23, 2022
OEANotification is a customizable notification view framework

OEANotification OEANotification is an iOS library which provides to create notifications and customize them easily. You can create notifications with

Ömer Aslan 19 Jan 30, 2021
A customizable, full-feature, lightweight iOS framework to be used instead of UIAlertController.

A customizable, full-feature, lightweight iOS framework to be used instead of UIAlertController.

Ali Samaiee 11 Jun 6, 2022
SplitSheet - A lightweight, fully interactive split-screen sheet.

SplitSheet A lightweight, fully interactive split-screen sheet. Powered by UIScrollView for super-smooth gestures. Show/hide either programmatically o

Andrew Zheng 154 Dec 15, 2022
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps.

SwiftEntryKit ?? Donations can be made here. Table of Contents Overview Features Example Project Example Project Installation Presets Playground Requi

Daniel Huri 6.1k Jan 4, 2023
An iOS library for SwiftUI to create draggable sheet experiences similar to iOS applications like Maps and Stocks.

An iOS library for SwiftUI to create draggable sheet experiences similar to iOS applications like Maps and Stocks.

Wouter 63 Jan 5, 2023
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

Orderella Ltd. 3.8k Dec 20, 2022
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

Sahil 2k Dec 22, 2022
A Swift Toast view - iOS 14 style and newer - built with UIKit. 🍞

Toast-Swift A Swift Toast view - iOS 14 style - built with UIKit. ?? Installation Swift Package Manager You can use The Swift Package Manager to insta

Bastiaan Jansen 216 Jan 4, 2023
A Swift package for iOS/tvOS for easy alert presentation

AlertPresenter Listed on the Swift Package Index and originally posted on my blog. It can be fiddly to handle the presentation of alerts on a specific

Chris Mash 14 Jul 1, 2022
Awesome iOS 11 appstore cards in swift 5.

Cards brings to Xcode the card views seen in the new iOS XI Appstore. Getting Started Storyboard Go to main.storyboard and add a blank UIView Open the

Paolo Cuscela 4.1k Dec 14, 2022