[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.



Show messages on top of the status bar. Customizable colors, font and animation. Supports progress display and can show an activity indicator. iOS 6+ support, iPhone X support. Please open a Github issue, if you think anything is missing or wrong.






pod 'JDStatusBarNotification'

(For infos on cocoapods, have a look at the cocoapods website)


  1. Drag the JDStatusBarNotification/JDStatusBarNotification folder into your project.
  2. Add #include "JDStatusBarNotification.h", where you want to use it


github "calimarkus/JDStatusBarNotification"

(more infos on Carthage here)

Beware: App Rejections

Some people informed me, that their apps got rejected for using status bar overlays (for violating 10.1/10.3). All cases I'm aware of are listed here:


JDStatusBarNotification is a singleton. You don't need to initialize it anywhere. Just use the following class methods:

Showing a notification

+ (JDStatusBarView*)showWithStatus:(NSString *)status;
+ (JDStatusBarView*)showWithStatus:(NSString *)status

The return value will be the notification view. You can just ignore it, but if you need further customization, this is where you can access the view.

Dismissing a notification

+ (void)dismiss;
+ (void)dismissAfter:(NSTimeInterval)delay;

Showing progress

Progress animation

+ (void)showProgress:(CGFloat)progress;  // Range: 0.0 - 1.0

Showing activity

Activity screenshot

+ (void)showActivityIndicator:(BOOL)show

Showing a notification with alternative styles

Included styles:

Use them with the following methods:

+ (JDStatusBarView*)showWithStatus:(NSString *)status

+ (JDStatusBarView*)showWithStatus:(NSString *)status

To present a notification using a custom style, use the identifier you specified in addStyleNamed:prepare:. See Customization below.


+ (void)setDefaultStyle:(JDPrepareStyleBlock)prepareBlock;

+ (NSString*)addStyleNamed:(NSString*)identifier

The prepareBlock gives you a copy of the default style, which can be modified as you like:

[JDStatusBarNotification addStyleNamed:<#identifier#>
                               prepare:^JDStatusBarStyle*(JDStatusBarStyle *style) {
                                   // main properties
                                   style.barColor = <#color#>;
                                   style.textColor = <#color#>;
                                   style.font = <#font#>;
                                   // advanced properties
                                   style.animationType = <#type#>;
                                   style.textShadow = <#shadow#>;
                                   style.textVerticalPositionAdjustment = <#adjustment#>;

                                   // progress bar
                                   style.progressBarColor = <#color#>;
                                   style.progressBarHeight = <#height#>;
                                   style.progressBarPosition = <#position#>;

                                   return style;

Animation Types

  • JDStatusBarAnimationTypeNone
  • JDStatusBarAnimationTypeMove
  • JDStatusBarAnimationTypeBounce
  • JDStatusBarAnimationTypeFade

Progress Bar Positions

  • JDStatusBarProgressBarPositionBottom
  • JDStatusBarProgressBarPositionCenter
  • JDStatusBarProgressBarPositionTop
  • JDStatusBarProgressBarPositionBelow
  • JDStatusBarProgressBarPositionNavBar

iPhone X behavior

  • JDStatusBarHeightForIPhoneXHalf
  • JDStatusBarHeightForIPhoneXFullNavBar


I'm @calimarkus on Twitter. Feel free to post a tweet, if you like JDStatusBarNotification.


  • Manual Suppression of rotation

    Manual Suppression of rotation

    There may be instances where you want to manually restrict rotation for the notification view. I've added class level method to set rotation behavior manually. Default assumes the notification will autorotate.

    opened by billburgess 13
  • When view controller first loads, the status bar notification is not visible

    When view controller first loads, the status bar notification is not visible


    As soon as my application loads, I need to go fetch data. At this point, I want to show the JDStatusBarNotification to indicate to the user that something is loading. However, the first time the application loads, the status bar notification isn't loading. every other time after that it works fine!


    opened by goelv 11
  • iOS 8.3 Crash in supportedInterfaceOrientations

    iOS 8.3 Crash in supportedInterfaceOrientations

    screen shot 2015-04-20 at 6 46 04 pm

    I am using iOS SDK 8.3 and running on devices with iOS 8.3 and it keep crashing whenever i want to dismiss a modal view when JDStatusBar is shown. Seems like Apple has changed the


    implementation. Is there any work around i can solve this exception?


    opened by kokhong20 9
  • Recursive crash

    Recursive crash

    It appears there is a scenario where infinite recursion can occur when the underlying view controller is JDStatusBarNotificationViewController:


    - (BOOL)shouldAutorotate {
        return [[self keyWindowRootViewController] shouldAutorotate];

    Full crash log for you: https://gist.github.com/iwasrobbed/9d1cf7ddc96413023d7c

    opened by iwasrobbed 9
  • iOS 9 warning

    iOS 9 warning

    iOS 9 needs:

        - (NSUInteger)supportedInterfaceOrientations {
        - (UIInterfaceOrientationMask)supportedInterfaceOrientations {

    instead of

     - (NSUInteger)supportedInterfaceOrientations {

    please correct this warning, thanks!

    opened by Kaspik 7
  • Locking device with notification visible causes overlap upon unlock

    Locking device with notification visible causes overlap upon unlock

    Tried dismissing the notification before the app resigns active and re-showing when app becomes active... Behavior is a clear status bar message the covers the visible status bar momentarily, then replaces with a solid white notification that hides the status bar.

    Just updated to version 1.5.1

    opened by dhalman 7
  • Adjust the StatusBarNotification size for IphoneX

    Adjust the StatusBarNotification size for IphoneX


    I fork your project and and i modify the size of the status bar notification for iPhone.

    I add a variable (iphoneXSize the name can be modified) in JDStatusBarStyle. This variable helps to define the size of the status bar notification.

    If the variable iphoneXSize is Mini (JDStatusBarIphoneXSizeMini) the status bar notification will pop on the status bar with a extra space to keep the title of the navigation bar visible and the back button visible to.


    By default, the variable iphoneXSize is Big (JDStatusBarIphoneXSizeBig), the status bar notification will pop above the navigation bar. It's the same behavior of the current version of the lib.


    opened by jndefosse 6
  • Status bar style not updated if VC requests it during notification

    Status bar style not updated if VC requests it during notification

    1. Show notification
    2. Navigate to a VC with a different preferredStatusBarStyle than the current VC
    3. Status bar doesn't change :(
    4. Dismiss notification

    I see you hacked around it by making a JDStatusBarNotificationViewController that returns the sharedApplication's statusBarStyle, which only works for the current VC. I hacked around it by returning the keyWindow's rootViewController from my custom overlay window's rootViewController accessor. Both solutions are hackish and prone to bad side effects. If I come up with a better solution, I'll post it here...

    opened by nevyn 6
  • Fatal Exception: UIApplicationInvalidInterfaceOrientation (iPad)

    Fatal Exception: UIApplicationInvalidInterfaceOrientation (iPad)

    Fatal Exception: UIApplicationInvalidInterfaceOrientation: "Supported orientations has no common orientation with the application, and [JDStatusBarNotificationViewController shouldAutorotate] is returning YES"

    Crashed multiple times in an iPad using iOS 11.

    Stack trace:

    # OS Version: 11.4.1 (15G77)
    # Device: iPad Pro (12.9 inch, 2nd Gen)
    # RAM Free: 5.1%
    # Disk Free: 92.9%
    Fatal Exception: UIApplicationInvalidInterfaceOrientation
    0  CoreFoundation                 0x184412d8c __exceptionPreprocess
    1  libobjc.A.dylib                0x1835cc5ec objc_exception_throw
    2  CoreFoundation                 0x184412c6c -[NSException initWithCoder:]
    3  UIKit                          0x18e0a5e48 -[UIViewController __supportedInterfaceOrientations]
    4  UIKit                          0x18e0a57cc -[UIViewController _preferredInterfaceOrientationGivenStatusBarAndDeviceAndOrientation:]
    5  UIKit                          0x18e0a5468 -[UIWindow setRootViewController:]
    6  JDStatusBarNotification        0x103ddf2a0 -[JDStatusBarNotification overlayWindow] (JDStatusBarNotification.m:443)
    7  JDStatusBarNotification        0x103ddf650 -[JDStatusBarNotification updateWindowTransform] (JDStatusBarNotification.m:483)
    8  JDStatusBarNotification        0x103ddf9f4 __52-[JDStatusBarNotification willChangeStatusBarFrame:]_block_invoke (JDStatusBarNotification.m:516)
    9  UIKit                          0x18e01a358 +[UIView(UIViewAnimationWithBlocks) _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:]
    10 UIKit                          0x18e246a30 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:animations:completion:]
    11 JDStatusBarNotification        0x103ddf99c -[JDStatusBarNotification willChangeStatusBarFrame:] (JDStatusBarNotification.m:527)
    12 CoreFoundation                 0x1843a4c3c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__
    13 CoreFoundation                 0x1843a41b8 _CFXRegistrationPost
    14 CoreFoundation                 0x1843a3f14 ___CFXNotificationPost_block_invoke
    15 CoreFoundation                 0x18442184c -[_CFXNotificationRegistrar find:object:observer:enumerator:]
    16 CoreFoundation                 0x1842daf38 _CFXNotificationPost
    17 Foundation                     0x184d4bbbc -[NSNotificationCenter postNotificationName:object:userInfo:]
    18 UIKit                          0x18e00bda4 -[UIApplication _notifyWillChangeStatusBarFrame:]
    19 UIKit                          0x18e24f390 -[UIApplication setStatusBarOrientation:animationParameters:notifySpringBoardAndFence:updateBlock:]
    20 UIKit                          0x18e444c54 __78-[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:]_block_invoke.1163
    21 UIKit                          0x18e87a088 __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke_2
    22 UIKit                          0x18e0198cc +[UIView(Internal) _performBlockDelayingTriggeringResponderEvents:]
    23 UIKit                          0x18e879e9c __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke
    24 UIKit                          0x18e019670 -[_UIWindowRotationAnimationController animateTransition:]
    25 UIKit                          0x18e019144 -[UIWindow _rotateToBounds:withAnimator:transitionContext:]
    26 UIKit                          0x18e0186c4 -[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:]
    27 UIKit                          0x18e0a9068 -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:]
    28 UIKit                          0x18e0a8ddc -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:]
    29 UIKit                          0x18e2faf98 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke
    30 UIKit                          0x18e0a7fa4 -[UIWindow _updateToInterfaceOrientation:duration:force:]
    31 UIKit                          0x18e0a7200 -[UIWindow setAutorotates:forceUpdateInterfaceOrientation:]
    32 UIKit                          0x18e0a6d84 -[UIWindow setDelegate:]
    33 UIKit                          0x18e0a7a08 -[UIViewController _tryBecomeRootViewControllerInWindow:]
    34 UIKit                          0x18e0a55dc -[UIWindow setRootViewController:]
    35 Optimize                       0x102e3b9f8 specialized AppDelegate.application(UIApplication, didFinishLaunchingWithOptions : [UIApplicationLaunchOptionsKey : Any]?) -> Bool (AppDelegate.swift:52)
    36 Optimize                       0x102e388bc @objc AppDelegate.application(UIApplication, didFinishLaunchingWithOptions : [UIApplicationLaunchOptionsKey : Any]?) -> Bool (AppDelegate.swift)
    37 UIKit                          0x18e021dbc -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:]
    38 UIKit                          0x18e0211c4 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:]
    39 UIKit                          0x18dfee5e0 -[UIApplication _runWithMainScene:transitionContext:completion:]
    40 UIKit                          0x18e61eb1c __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke
    41 UIKit                          0x18dfeddd0 +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:]
    42 UIKit                          0x18dfedc6c -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]
    43 UIKit                          0x18dfecafc -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:]
    44 UIKit                          0x18ec8284c __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke
    45 UIKit                          0x18dfec1ec -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]
    46 UIKit                          0x18ea67ac8 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke
    47 UIKit                          0x18ebb5bf8 _performActionsWithDelayForTransitionContext
    48 UIKit                          0x18dfebc0c -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]
    49 UIKit                          0x18dfeb5a8 -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:]
    50 UIKit                          0x18dfe85e0 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:]
    51 UIKit                          0x18dfe8330 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:]
    52 FrontBoardServices             0x186c14470 -[FBSSceneImpl _didCreateWithTransitionContext:completion:]
    53 FrontBoardServices             0x186c1cd6c __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2
    54 libdispatch.dylib              0x183d04a60 _dispatch_client_callout
    55 libdispatch.dylib              0x183d0c170 _dispatch_block_invoke_direct$VARIANT$mp
    56 FrontBoardServices             0x186c48878 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__
    57 FrontBoardServices             0x186c4851c -[FBSSerialQueue _performNext]
    58 FrontBoardServices             0x186c48ab8 -[FBSSerialQueue _performNextFromRunLoopSource]
    59 CoreFoundation                 0x1843bb404 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
    60 CoreFoundation                 0x1843bac2c __CFRunLoopDoSources0
    61 CoreFoundation                 0x1843b879c __CFRunLoopRun
    62 CoreFoundation                 0x1842d8da8 CFRunLoopRunSpecific
    63 GraphicsServices               0x1862be020 GSEventRunModal
    64 UIKit                          0x18e2f8758 UIApplicationMain
    65 Optimize                       0x102bde1dc main (NetworkConnectionManager.swift:20)
    66 libdyld.dylib                  0x183d69fc0 start
    opened by ricardopereira 5
  • Notification on iPhone covers the entire NavBar

    Notification on iPhone covers the entire NavBar

    Using the Notification on iPhone X causes the entire NavBar to be covered. User can no longer see the Nav buttons or the Title.

    Is there a way to make the notification take up less of the NavBar height on iPhone X? So that it clears the 'notch' but does not cover the entire NavBar.

    opened by mattinasi 5
  • Carthage: build is failing with undefined _JDStatusBarRootVCLayoutMargin

    Carthage: build is failing with undefined _JDStatusBarRootVCLayoutMargin


    Undefined symbols for architecture x86_64:
      "_JDStatusBarRootVCLayoutMargin", referenced from:
          -[JDStatusBarView layoutSubviews] in JDStatusBarView.o
          -[JDStatusBarNotification updateTopBarFrameWithStatusBarFrame:] in JDStatusBarNotification.o
    ld: symbol(s) not found for architecture x86_64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    opened by ricardopereira 5
  • Fix pill position with flexible pill heights across devices

    Fix pill position with flexible pill heights across devices

    Using a non-standard pill height leads to a variable distance on different devices (e.g. dynamic island vs notch vs no-notch). Instead the library should support a constant distance to the closest edge, no matter the pill size. This is e.g. visible for the "small pill" style of the example project.

    opened by calimarkus 0
  • [Feature Request] Dynamic Island specific notification?

    [Feature Request] Dynamic Island specific notification?

    Maybe a notification type utilizing the island itself would be interesting. It would require a reasonable way to manage the "safe space" for its content.

    opened by calimarkus 0
  • [Feature Request] Status Queues

    [Feature Request] Status Queues

    It would be great to pass in a queue of statuses so that if a bunch of status updates are sent close to one another, you could prevent flashing of them on the status bar and have them programmatically cycled after a certain duration.

    MTStatusBarOverlay did this, but because that project has been abandoned, I think many migrators will find your repo and miss that feature as I have.

    Do you have any plans to add a feature like this, or to add features to JDStatusBarNotification at all going forward?

    opened by coneybeare 5
  • 2.0.6(Jun 29, 2022)

    This release note includes all changes from 2.0.0 to 2.0.6.

    2.0.6 - 2022-06-27


    • Subtitle support (customizable)
    • Generic left view support (think icons, profile pictures, etc.), customizable layout
    • Explicitly customizable ActivityIndicator color
    • Prevent dismissal during user interaction (hold or pan), configurable.
    • Ability to disable Tap-To-Hold behavior
    • Added rubber-banding effect when panning down on notification (.pill style only)
    • Use pill height as minimum pill width.
    • Overhauled all public API documentation & converted it to the docc syntax


    • Renamed: JDStatusBarStyle -> JDStatusBarNotificationStyle & sub-style classes. (Note: If you initalize styles in your codebase this is a breaking change. The current API design doesn't expect users to initialize styles, but it is possible to do so.)
    • Renamed private classes and enums and their swift naming for more consistency.
    • Remove .centerWithTextUnlessSubtitleExists, default to .centerWithText.
    • Changed Swift Package swift-tools-version to 5.3
    • Added .spi.yml for better Swift Package Index integration


    • WindowScene inferred automatically (no need to set it explicitly anymore)
    • Disable drag-to-dismiss during dismiss animation
    • Tweaked default style pill size & positioning
    • Don't clip text to bounds
    • Fix failing animation on presentation calls during ongoing presentation
    • Fix progress bar sometimes not showing up

    (Click the 2.0.6 version number for a full diff compared to the major release of 2.0.0.)

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Jun 29, 2022)

    2.0.0 - 2022-06-19

    Big release. Many bugfixes, expanded public API, new features. Modernized outdated codebase - more or less a full rewrite. This is a breaking API release. Existing code using previous versions of this library will require some adjustments. Those adjustments should be simple though - mostly new API naming.


    • A pill shaped layout (original layout available as "full-width" layout)
    • Drag-to-dismiss + general support for user interaction on the notification
    • Easy progress bar animation through public API
    • Custom view presentation
    • Presentation when no status bar is visible
    • More robust layouting of text & activity indicator
    • Support for apps that use window scenes
    • Explicit Swift naming for all public APIs + Swift example project
    • Full fledged style editor in example project + config export


    • Many bug fixes


    • Non-notch device layout matches notch device layout now
    • Included styles moved to explicit API, instead of styleName API
    • JDStatusBarView internals no longer exposed, custom view APIs added instead.

    (Click the 2.0.0 version number for a full diff compared to the previous version.)

    Source code(tar.gz)
    Source code(zip)
M Emrich
iOS Engineer (ex: IG/FB)
M Emrich
💌 Easy to use and customizable messages/notifications for iOS à la Tweetbot

Notice: TSMessages is no longer being maintained/updated. We recommend everyone migrate to RMessage. This repository will be kept as is for those who

Felix Krause 4.9k Dec 31, 2022
SwiftOverlays is a Swift GUI library for displaying various popups and notifications

SwiftOverlays is a Swift GUI library for displaying various popups and notifications. SwiftOverlays animated logo is kindly made by Crafted Pixels Fea

Peter Prokop 632 Dec 22, 2022
Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside

Description ?? Break the silence of your UI, whispering, shouting or whistling at it. Whisper is a component that will make the task of displaying mes

HyperRedink 3.7k Dec 25, 2022
A simple style messages/notifications, in Swift.

Demo Example To show notifications use the following code: self.showMessage("Something success", type: .success) To display a notice on a view: view.s

Gesen 704 Dec 17, 2022
A Swift extension that adds toast notifications to the UIView object class.

Toast-Swift Toast-Swift is a Swift extension that adds toast notifications to the UIView object class. It is intended to be simple, lightweight, and e

Charles Scalesse 3.3k Dec 22, 2022
Simple Swift in-app notifications

LNRSimpleNotifications TSMessages is an amazingly powerful in-app notifications library but requires a lot of setup. LNRSimpleNotifications is a simpl

LISNR 203 Nov 20, 2022
CoffeeToast - A swift package to easily add Toast notifications to your app

CoffeeToast A simple Swift package to add Toast Notifications to your app. Insta

Maegan Wilson 2 Feb 3, 2022
zekunyan 608 Dec 30, 2022
🚨Use the iPhone X Notch to display alerts. 🚨

NotchyAlert Prerequisites Xcode 9.x Swift 4.x iPhone X Simulator/Device Demo Installation Cocoapods To install NotchyAlert using Cocoapods, add the fo

Sofiane Beors 70 Nov 20, 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
Fully customizable and extensible action sheet controller written in Swift

XLActionController By XMARTLABS. XLActionController is an extensible library to quickly create any custom action sheet controller. Examples The action

xmartlabs 3.3k Dec 31, 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
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

Kyohei Ito 397 Dec 6, 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
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 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
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
FCAlertView is a Flat Customizable AlertView for iOS (Written in Objective C)

FCAlertView FCAlertView is a Flat Customizable AlertView, written in Objective C Quick Links 1. Swift 2. Installation 3. Example App 4. Adding FCAlert

Nima Tahami 794 Nov 29, 2022