[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6852":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":16,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":10,"rankLanguage":10,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},6852,"NotificationBanner","Daltron\u002FNotificationBanner","Daltron","The easiest way to display highly customizable in app notification banners in iOS","",null,"Swift",4874,665,44,29,0,3,30.47,"MIT License",false,"master",true,[24,25,26,27,28],"ios","ios-animation","ios-swift","swift","swift3","2026-06-12 02:01:31","![Notification Banner](NotificationBanner\u002FAssets\u002Fheader.png)\n\n[![GitHub contributors](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fcontributors\u002Fdaltron\u002Fnotificationbanner.svg?style=flat)]() \n[![License](https:\u002F\u002Fimg.shields.io\u002Fcocoapods\u002Fl\u002FNotificationBannerSwift.svg?style=flat)](http:\u002F\u002Fcocoapods.org\u002Fpods\u002FNotificationBannerSwift)\n[![PayPal](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpaypal-donate-yellow.svg)](https:\u002F\u002Fwww.paypal.com\u002Fdonate\u002F?hosted_button_id=QEBVNMTVX6N88)  \n\n## Written in Swift 5\n\nNotificationBanner is an extremely customizable and lightweight library that makes the task of displaying in app notification banners and drop down alerts an absolute breeze in iOS.\n\n| Basic Banners | Banners with Side Views  | Status Bar Banners |\n| ------------- | ------------- | ------------- |\n| ![Basic Banners](NotificationBanner\u002FAssets\u002Fbasic.gif)  | ![Banners with Side Views](NotificationBanner\u002FAssets\u002Fside_views.gif)  | ![Status Bar Banners](NotificationBanner\u002FAssets\u002Fstatus_bar.gif) |\n\n| Growing Banners | Floating Banners  | Stacked Banners |\n| ------------- | ------------- | ------------- | \n| ![Growing Banners](NotificationBanner\u002FAssets\u002Fgrowing.gif)  | ![Floating Banners](NotificationBanner\u002FAssets\u002Ffloating.gif) | ![Floating Banners](NotificationBanner\u002FAssets\u002Fstacked.gif) |\n\n## Features\n- Highly customizable ✅\n- `NSAttributedString` support ✅\n- iPhone, iPhoneX, & iPad Support ✅\n- Orientation change support ✅\n- Custom `UIView` support ✅\n- Custom colors support ✅\n- Support for long titles\u002F subtitles ✅\n  - `NotificationBanner` uses horizontal scrolling labels\n  - `GrowingNotificationBanner` grows in height as needed\n- Presenting from top or bottom support ✅\n- Haptic feeback support ✅\n- Built in banner queue ✅\n- Allow to display several banners simultaneously, configurable in banners queue ✅\n- Accessibility support ✅\n- Dynamic Island Support ✅\n\n## Requirements\n\n - iOS 12.0+\n - Xcode 10.0+\n\n## Installation\n\n### Swift Package Manager\n\nThis is the preferred way. All other installation methods are officially deprecated and will no longer be supported in future versions.\n\n1. Go to File > Add Packages\n2. The Add Package dialog appears, by default with Apple packages. \n3. In the upper right hand corner, paste https:\u002F\u002Fgithub.com\u002FDaltron\u002FNotificationBanner into the search bar\n4. Hit Return to kick off the search\n5. Click Add Package. \n\n### CocoaPods\n\nNotificationBanner is available through [CocoaPods](http:\u002F\u002Fcocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n#### Swift 5 + Xcode 11 + iOS 13 Support\n\n```ruby\npod 'NotificationBannerSwift', '~> 3.0.0'\n```\n\n#### Swift 5 + Xcode 10.x\n\n```ruby\npod 'NotificationBannerSwift', '2.5.0'\n```\n\n#### Swift 4.2\n\n```ruby\npod 'NotificationBannerSwift', '2.0.1'\n```\n\n#### Swift 4.0\n\n```ruby\npod 'NotificationBannerSwift', '1.6.3'\npod 'MarqueeLabel\u002FSwift', '3.1.6'\n```\n\nThen add `import NotificationBannerSwift` at the top of each file you use NotificationBanner in your project.\n\n### Carthage\n\nTo use NotificationBanner via Carthage simply add this line to your `Cartfile`:\n\n#### Swift 5\n```swift\ngithub \"Daltron\u002FNotificationBanner\" \"master\"\n```\n\nThen add `NotificationBanner.framework` and the dependencies `SnapKit.framework` and `MarqueeLabel.framework` in your project.\n\n## Usage\n\nCreating drop down alerts with NotificationBanner is easy. To create a regular banner (with scrolling labels) and show it, simply:\n\n```swift\nlet banner = NotificationBanner(title: title, subtitle: subtitle, style: .success)\nbanner.show()\n```\n\nIf you want to create a banner which grows in height as needed and show it accordingly just use `GrowingNotificationBanner` instead of `NotificationBanner`:\n\n```swift\nlet banner = GrowingNotificationBanner(title: title, subtitle: subtitle, style: .success)\nbanner.show()\n```\n\nTo create a status bar alert, simply:\n\n```swift\nlet banner = StatusBarNotificationBanner(title: title, style: .success)\nbanner.show()\n```\n\nBy default, each banner will be displayed on the main application window. If you are wanting to show a banner below a navigation bar, simply show on the view controller that is within the navigation system:\n\n```swift\nbanner.show(on: viewController)\n```\n\nBy default, each banner will present from the top. If you are wanting to display from the bottom, simply:\n\n```swift\nbanner.show(bannerPosition: .bottom)\n```\n\nEach of the show properties defined above can be mixed and matched to work flawlessly with eachother.\n\nBy default, each banner will automatically dismiss after 5 seconds. To dismiss programatically, simply:\n\n```swift\nbanner.dismiss()\n```\n\nTo show a banner infinitely until it is manually dismissed, simply:\n\n```swift\nbanner.autoDismiss = false\n```\n\nNotificationBanner has five prebuilt styles that you can choose from:\n\n```swift\npublic enum BannerStyle {\n    case danger\n    case info\n    case customView\n    case success\n    case warning\n}\n```\n\nYou can override the predefined colors that NotificationBanner uses for any style by conforming to the `BannerColorsProtocol`:\n\n```swift\npublic protocol BannerColorsProtocol {\n    func color(for style: BannerStyle) -> UIColor\n}\n```\n\nIts as easy as creating a custom banner colors class:\n\n```swift\nclass CustomBannerColors: BannerColorsProtocol {\n\n    internal func color(for style: BannerStyle) -> UIColor {\n        switch style {\n            case .danger:\t\u002F\u002F Your custom .danger color\n            case .info:\t\t\u002F\u002F Your custom .info color\n            case .customView:\t\u002F\u002F Your custom .customView color\n            case .success:\t\u002F\u002F Your custom .success color\n            case .warning:\t\u002F\u002F Your custom .warning color\n        }\n    }\n\n}\n```\n\nAnd then passing in that class to any notification banner you create:\n\n```swift\nlet banner = NotificationBanner(title: title, style: .success, colors: CustomBannerColors())\nbanner.show()\n```\n\nBy default, the `.info` style will be applied to the banner if no style is provided in the init method. You can set the background color of a banner at any time by simply setting the `backgroundColor`.\n\n\n### Banners with Side Views\n\nA notification banner can have a left accessory view, a right accessory view, or both:\n\n```swift\n\u002F\u002F Success Style Notification with Left View\nlet leftView = UIImageView(image: #imageLiteral(resourceName: \"success\"))\nlet banner = NotificationBanner(title: title, subtitle: subtitle, leftView: leftView, style: .success)\nbanner.show()\n\n \u002F\u002F Danger Style Notification with Right View\nlet rightView = UIImageView(image: #imageLiteral(resourceName: \"danger\"))\nlet banner = NotificationBanner(title: title, subtitle: subtitle, rightView: rightView, style: .danger)\nbanner.show()    \n\n\u002F\u002F Info Style Notification with Left and Right Views\nlet leftView = UIImageView(image: #imageLiteral(resourceName: \"info\"))\nlet rightView = UIImageView(image: #imageLiteral(resourceName: \"right_chevron\"))\nlet banner = NotificationBanner(title: title, subtitle: subtitle, leftView: leftView, rightView: rightView, style: .info)\nbanner.show()\n```\n![Banners with Side Views](NotificationBanner\u002FAssets\u002Fside_views.gif)\n\nEach side view will be automically reisized to fit perfectly\n\n### Banners with a Custom View\n\nA notification banner can also be initalized with a custom view:\n\n```swift\nlet banner = NotificationBanner(customView: NorthCarolinaBannerView())\nbanner.show()\n```\n![Custom Banner](NotificationBanner\u002FAssets\u002Fcustom.gif)\n\n### Handling User Interaction\n\nBy default, when a banner is tapped or swiped up by a user, it will be dismissed. If you want to detect when the user taps or swipes up on a banner, simply:\n\n```swift\nbanner.onTap = {\n\t\u002F\u002F Do something regarding the banner\n}\n```\n\n```swift\nbanner.onSwipeUp = {\n\t\u002F\u002F Do something regarding the banner\n}\n```\n\n### Banner Events\n\nYou can choose to opt into a notification banner's events by registering as its delegate:\n\n```swift\nbanner.delegate = self\n```\nThen just make sure to implement the following methods:\n\n```swift\nfunc notificationBannerWillAppear(_ banner: BaseNotificationBanner)\nfunc notificationBannerDidAppear(_ banner: BaseNotificationBanner)\nfunc notificationBannerWillDisappear(_ banner: BaseNotificationBanner)\nfunc notificationBannerDidDisappear(_ banner: BaseNotificationBanner)\n```\n\n## Haptic Feedback Support\nBy default, when a banner is displayed, a haptic feedback will be generated on devices that support it. The types of haptic feedback are as follows:\n\n```swift\npublic enum BannerHaptic {\n\tcase light\n   \tcase medium\n\tcase heavy\n  \tcase none\n}\n```\n\nTo change the type of haptic feedback to generate when a banner is shown, simply:\n\n```swift\nbanner.haptic = .heavy\n```\n\n## Banner Queue\n\nBy default, each notification banner is placed onto a singleton of an auto-managed `NotificationBannerQueue`. This allows an infinite amount of banners to be displayed without one hiding the other. If you have multiple controllers within your navigation stack that need to be managed by a seperate queue (like a tab bar controller), simply create an instance of a `NotificationBannerQueue` and pass it in to the show function:\n\n```swift\nbanner.show(queue: customQueue)\n```\n\nBy default, each notification banner is placed on the back of the queue. If you would rather place the banner in the front and show it immediately no matter how many banners are in the queue, simply state it in the `show()` method:\n\n```swift\nbanner.show(queuePosition: .front)\n```\n\nAdding a banner to the front of the queue will temporarily suspend the currently displayed banner (if there is one) and will resume it after the banner in front of it dismisses.\n\nTo get the number of banners currently on the queue, simply:\n\n```swift\nlet numberOfBanners = NotificationBannerQueue.default.numberOfBanners\n```\n\n \u003Cb>This is all automatically managed!\u003C\u002Fb>\n\n## Banner Queue and display banners simultaneously (stacked)\n\nYou can also create the queue to display several banners at once with controlling of maximum number of banners to be displayed simultaneously. You can \"show\" more banners than allowed by queue settings - banners what exceed this value will be displayed some time later, after some banners already displayed on screen will be closed. In example below we create queue with maximum simultaneous banners allowed - 3:\n\n```swift\nlet bannerQueueToDisplaySeveralBanners = NotificationBannerQueue(maxBannersOnScreenSimultaneously: 3)\n```\n\nCreate five different banners:\n\n```swift\nlet banner1 = FloatingNotificationBanner(\n\ttitle: \"Success Notification - 1\",\n\tsubtitle: \"First Notification from 5 in current queue with 3 banners allowed simultaneously\",\n\tstyle: .success\n)\nbanner1.delegate = self\n\nlet banner2 = FloatingNotificationBanner(\n\ttitle: \"Danger Notification - 2\",\n\tsubtitle: \"Second Notification from 5 in current queue with 3 banners allowed simultaneously\",\n\tstyle: .danger\n)\nbanner2.delegate = self\n\nlet banner3 = FloatingNotificationBanner(\n\ttitle: \"Info Notification - 3\",\n\tsubtitle: \"Third Notification from 5 in current queue with 3 banners allowed simultaneously\",\n\tstyle: .info\n)\nbanner3.delegate = self\n\nlet banner4 = FloatingNotificationBanner(\n\ttitle: \"Success Notification - 4\",\n\tsubtitle: \"Fourth Notification from 5 in current queue with 3 banners allowed simultaneously\",\n\tstyle: .success\n)\nbanner4.delegate = self\n\nlet banner5 = FloatingNotificationBanner(\n\ttitle: \"Info Notification - 5\",\n\tsubtitle: \"Fifth Notification from 5 in current queue with 3 banners allowed simultaneously\",\n\tstyle: .info\n)\nbanner5.delegate = self\n```\n\nand show all five banners at once:\n```swift\nshowBanners(\n\t[banner1, banner2, banner3, banner4, banner5],\n\tin: bannerQueue5AllowedMixed\n)\n```\n\nusing this supporting method\n\n```swift\nfunc showBanners(\n\t_ banners: [FloatingNotificationBanner],\n\tin notificationBannerQueue: NotificationBannerQueue\n) {\n    banners.forEach { banner in\n      \tbanner.show(\n\t      \tbannerPosition: selectedBannerPosition(),\n\t\t \tqueue: notificationBannerQueue,\n\t\t \tcornerRadius: 8,\n\t\t\tshadowColor: UIColor(red: 0.431, green: 0.459, blue: 0.494, alpha: 1),\n\t\t  \tshadowBlurRadius: 16,\n\t\t\tshadowEdgeInsets: UIEdgeInsets(top: 8, left: 8, bottom: 0, right: 8)\n\t   )\n    }\n}\n```\n\nIt will display first three banners at once, and after some time (or by user tap) it will be hidden and 4 and 5 banner will be displayed when. All it with fancy animation.\n\n## Feature Requests\n\nI'd love to know anything that you think NotificationBanner is missing. Open an issue and I'll add the `feature request` label to it and I'll do everything I can to accomodate that request if it is in the library's best interest. 😄 \n\n## Apps that Use NotificationBanner\n[![Q - Talk About Music](AppIcons\u002Fq_talk_about_music.jpg)](https:\u002F\u002Fitunes.apple.com\u002Fus\u002Fapp\u002Fq-talk-about-music\u002Fid1071551321?mt=8) \n[![VH Dispatch](AppIcons\u002Fvh_dispatch.png)](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fvh-dispatch\u002Fid1249569084)\n[![Stikkr](AppIcons\u002Fstikkr.png)](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fstikkr\u002Fid851375015)\n[![CardCast](AppIcons\u002Fcardcast.png)](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fcardcast-business-cards\u002Fid1269278947)\n[![Happy Scale](AppIcons\u002Fhappy_scale.png)](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fhappy-scale\u002Fid532430574)\n[![Wanderings](AppIcons\u002Fwanderings.png)](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fwanderings-travel-tracking\u002Fid1292503352)\n[![Modern Magic 8 Ball](AppIcons\u002Fmodernmagic8ball.png)](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fmodern-magic-8-ball\u002Fid1381145384)\n[![Envision: Habits Tracker](AppIcons\u002Fenvision.png)](https:\u002F\u002Fapps.apple.com\u002Fapp\u002Fenvision-habits-tracker\u002Fid1423771095)\n[![TSUM](AppIcons\u002Ftsum.png)](https:\u002F\u002Fapps.apple.com\u002Fru\u002Fapp\u002F%D1%86%D1%83%D0%BC-%D0%B8%D0%BD%D1%82%D0%B5%D1%80%D0%BD%D0%B5%D1%82-%D0%BC%D0%B0%D0%B3%D0%B0%D0%B7%D0%B8%D0%BD-%D0%BE%D0%B4%D0%B5%D0%B6%D0%B4%D1%8B\u002Fid1089560311)\n[![RIS](AppIcons\u002Fris.png)](https:\u002F\u002Fapps.apple.com\u002Fru\u002Fapp\u002F%D1%80%D0%B5%D1%81%D1%82%D0%BE%D1%80%D0%B0%D0%BD%D1%8B-%D1%80%D0%B8%D1%81-%D0%B7%D0%B0%D0%BA%D0%B0%D0%B7-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0\u002Fid932844115)\n[![LukaPizza](AppIcons\u002Flukapizza.png)](https:\u002F\u002Fapps.apple.com\u002Fru\u002Fapp\u002Fluka-pizza-%D0%B7%D0%B0%D0%BA%D0%B0%D0%B7-%D0%B8-%D0%B4%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%BA%D0%B0\u002Fid1202155629)\n\n#### Feel free to add yours!\n\n## Author\n\nDalton Hinterscher, daltonhint4@gmail.com\n\n## License\n\nNotificationBanner is available under the MIT license. See the LICENSE file for more info.\n","NotificationBanner 是一个用于在 iOS 应用中显示高度可定制通知横幅的轻量级库。它支持多种样式的通知横幅，包括基础横幅、带侧视图的横幅、状态栏横幅、增长式横幅、浮动横幅以及堆叠横幅等，并且可以轻松地从屏幕顶部或底部弹出。项目使用 Swift 语言编写，兼容 iPhone、iPhone X 和 iPad 设备，支持自动布局调整、自定义 UIView、NSAttributedString 支持、触觉反馈等功能。适用于需要在应用内部提供即时消息提醒或重要信息展示的应用场景，如新闻客户端、社交软件等。",2,"2026-06-11 03:09:13","top_language"]