Latest 0.1.7
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit

😍A simple NoticeBar written by Swift 3, similar with QQ notice view.😀
Build Status

pod version
Carthage compatible

GitHub license


Remember: If you want the status bar style change, you must set the View controller-based status bar appearance to NO in the info.plist.


Swift 3.0 & iOS 8+



  1. add pod 'NoticeBar' to your Podfile.
  2. Run pod install OR pod update.
  3. import Noticebar


  1. Add Noticebar to your Cartfile. e.g., github "qiuncheng/Noticebar" ~> 0.1.5
  2. Run carthage update
  3. Follow the rest of the standard Carthage installation instructions to add Noticebar to your project.
  4. import NoticeBar


  1. Download the full file.
  2. Drag the NoticeBar folder to your project.


Four Default Types:

  • NoticeBarAnimationType.attention
  • NoticeBarAnimationType.success
  • NoticeBarAnimationType.error

How to use? For example: ->

/// title : The message you want to show
/// defaultType : Above four types with different style above.
let noticeBar = NoticeBar(title: "#message",
/// duration : How long the noticeBar will stay. And it will dismiss automatically. 
/// completed :optional. When the noticeBar dismissed, what you want to do, nothing type nil. #TimeInterval, completed: { (#Bool) in

Custom NoticeBarConfig

The NoticeBarConfig will manage the NoticeBar’s title default is nil, image if needed, textColor default is, backgroundColor default is UIColor.white, animationType default is from, barStyle default is NoticeBarStyle.onNavigationBar, margin default is 10.0 which will determine the space between image and title, the space between NoticeBar left and image.
How to use? For example:

/// NoticeBarConfig : There are some other NoticeBarConfig init, it's up to you which to use.
let config = NoticeBarConfig(title: "#message you want to show.", image: #image, textColor: UIColor.white, backgroundColor:, barStyle: NoticeBarStyle.onNavigationBar, animationType: )
let noticeBar = NoticeBar(config: config)
/// do something before noticeBar show.      
/// such as : UIApplication.shared.statusBarStyle = .lightContent 2.0, completed: {
    (finished) in
    if finished {
        /// do something here.
        /// such as : UIApplication.shared.statusBarStyle = .default


  • [ ] Add background image
  • [ ] Add custom view
  • [x] Add custom super view, now is keyWindows.
  • [ ] Add dismiss action manually, now dimiss is automatically.


  1. QQ’s Notice View which the idea come from.

  2. Pin’s Notice View which I take example by.


Under MIT License

Copyright (c) 2016 QiunCheng. All rights reserved.

About me

A student in Xidian University. MY RESUME.
If you have a new idea about this project, Please let me know. OR pull request.

Latest podspec

    "name": "NoticeBar",
    "version": "0.1.7",
    "summary": "ud83dude0dA simple NoticeBar with QQ notice view style.ud83dude00",
    "description": "ud83dude0dA simple NoticeBar with QQ notice view style.ud83dude00 You can use the default style or custom style.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Qiuncheng": "[email protected]"
    "platforms": {
        "ios": "8.0"
    "source": {
        "git": "",
        "tag": "0.1.7"
    "source_files": "NoticeBar/*.{swift,h}",
    "resource_bundles": {
        "NoticeBar": [
    "frameworks": "UIKit",
    "requires_arc": true,
    "pushed_with_swift_version": "3.0"

Pin It on Pinterest

Share This