[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-6887":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":22,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":39,"discoverSource":40},6887,"JDStatusBarNotification","calimarkus\u002FJDStatusBarNotification","calimarkus","Highly customizable & feature rich notifications. Interactive dismiss. Custom Views. SwiftUI. Tap-to-hold. Progress. Written in Swift, compatible for ObjC!","http:\u002F\u002Fcalimarkus.github.io\u002FJDStatusBarNotification\u002Fdocumentation\u002Fjdstatusbarnotification",null,"Swift",4329,565,105,3,0,2,60.46,"MIT License",false,"main",true,[24,25,26,27,28,29,30,31,32,33,34,35],"activity","alert","banner","bubble","ios","notification","pill","progress","progress-bar","toast","toast-notifications","tooltip","2026-06-12 04:00:30","# JDStatusBarNotification\n\n[![](https:\u002F\u002Fimg.shields.io\u002Fendpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fcalimarkus%2FJDStatusBarNotification%2Fbadge%3Ftype%3Dswift-versions)](https:\u002F\u002Fswiftpackageindex.com\u002Fcalimarkus\u002FJDStatusBarNotification)\n\nHighly customizable & feature rich notifications displayed below the status bar \u002F notch \u002F Island. Written in Swift, compatible for Obj-C! Please open a [Github issue](https:\u002F\u002Fgithub.com\u002Fcalimarkus\u002FJDStatusBarNotification\u002Fissues), if you think anything is missing or wrong.\n\n* Customizable colors, fonts & animations with multiple built-in styles\n* Interactive & interuptable Drag-to-Dismiss\n* Adaptive, dynamic layout\n    * Built-in pill-style or full-width layouts\n    * Pill width matches the presented text (customizable)\n    * Works on notch and no-notch devices\n    * Works in landscape & portrait\n* Built-in features (automatic layout):\n    * Title, subtitle and left-hand-views (e.g. Icons)\n    * An activity indicator\n    * A progress bar\n    * Custom views (UIView or SwiftUI View)\n\nSome examples of the possibilities - the pill style is the default:\n\n![examples](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F173831886-d7c8cca9-9274-429d-b924-78f21a4f6092.jpg)\n\nFull-Width styles in action - the above pill style supports the same features and animations:\n\n| Drag to dismiss | Activity & Progress Bars | Custom styles |\n| ------------- | ------------- | ------------- |\n| ![1](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F172001713-74d8c212-cd58-4687-8d6b-472e1bdb944d.gif) | ![3](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F172001734-be3c4e36-46b6-4f9f-a3d5-59a51e5db675.gif) | ![2](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F172001727-65aa6374-beeb-4a5c-adac-7e1967236b63.gif) |\n\n| Landscape apps (device rotation also supported) |\n| ------------- |\n| ![landscape](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F172003389-7752a183-f960-4bef-87c7-fcf583e4a13f.gif) |\n\n## Installation\n\n- [**SPM (Swift Package Manager):**](https:\u002F\u002Fgithub.com\u002Fapple\u002Fswift-package-manager)\n  - Xcode -> File -> Add packages: `git@github.com:calimarkus\u002FJDStatusBarNotification.git`\n  - Importing:\n      - In Swift: `import JDStatusBarNotification`\n      - In ObjC: `@import JDStatusBarNotification;`\n- [**CocoaPods:**](https:\u002F\u002Fguides.cocoapods.org)\n  - `pod 'JDStatusBarNotification'`\n- [**Carthage:**](https:\u002F\u002Fgithub.com\u002FCarthage\u002FCarthage)\n  - `github \"calimarkus\u002FJDStatusBarNotification\"`\n- **Manually:**\n  - Copy the `JDStatusBarNotification\u002FJDStatusBarNotification` folder into your project.\n\n## Documentation\n\nFind the [class documentation](http:\u002F\u002Fcalimarkus.github.io\u002FJDStatusBarNotification\u002Fdocumentation\u002Fjdstatusbarnotification) hosted on Github.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n## Getting started\n\nAll examples here are written in Swift. But everything can be called from Objective-C too. Also checkout the example project, which has many examples and includes a convenient style editor to build a custom style.\n\n### SwiftUI state-driven presentation\n\n#### Showing a simple text notification\n\n```swift\nvar body: some View {\n    Button(\"Present\u002Fdismiss\") {\n      isPresented.toggle()\n    }\n    .notification(title: \"Hello World\", isPresented: $isPresented)\n}\n```\n\n#### Showing a styled notification with subtitle, activity and\u002For progress\n\n```swift\nvar body: some View {\n    Button(\"Present\u002Fdismiss\") {\n      isPresented.toggle()\n    }\n    .notification(title: \"A text\",\n                  subtitle: \"with a little subtitle.\",\n                  isPresented: $isPresented,\n                  isShowingActivity: $activity, \u002F\u002F toggles an activity indicator on\u002Foff\n                  progress: $progress,          \u002F\u002F sets the percentage of a progress bar\n                  includedStyle: .success)      \u002F\u002F picks a predefined style\n}\n```\n\n\n#### Showing a custom view as notification\n\n```swift\nvar body: some View {\n    Button(\"Present\u002Fdismiss\") {\n      isPresented.toggle()\n    }\n    .notification(isPresented: $isPresented) {\n      Text(\"👋 Hi there!\")\n        .font(.subheadline)\n        .foregroundStyle(.white)\n    }\n}\n```\n\n### Manual presentation (from Swift or ObjC)\n\n#### Showing a text notification\n\n```swift\nNotificationPresenter.shared.present(\"Hello World\")\n\n\u002F\u002F with completion\nNotificationPresenter.shared.present(\"Hello World\") { presenter in\n    \u002F\u002F ...\n}\n```\n\n#### Dismissing a notification\n\n```swift\nNotificationPresenter.shared.dismiss()\n\n\u002F\u002F with completion\nNotificationPresenter.shared.dismiss(after: 0.5) { presenter in\n   \u002F\u002F ...\n}\n```\n\n#### Showing activity\n\n```swift\nNotificationPresenter.shared.present(\"\")\nNotificationPresenter.shared.displayActivityIndicator(true)\n```\n\n![activity](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F175884729-c6255d41-4728-4bcb-bf72-fb12db01b5d5.gif)\n\n#### Showing a custom left view\n\n```swift\nlet image = UIImageView(image: UIImage(systemName: \"gamecontroller.fill\"))\nNotificationPresenter.shared.present(\"Player II\", subtitle: \"Connected\")\nNotificationPresenter.shared.displayLeftView(image)\n```\n\n![leftview](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F175884751-c93ffd31-a436-43d2-9eed-82d7cb23d8f6.gif)\n\n#### Showing progress\n\n```swift\nNotificationPresenter.shared.present(\"Animating Progress…\") { presenter in\n  presenter.animateProgressBar(to: 1.0, duration: 0.75) { presenter in\n    presenter.dismiss()\n  }\n}\n\n\u002F\u002F or set an explicit percentage manually (without animation)\nNotificationPresenter.shared.displayProgressBar(at: 0.0)\n```\n\n![progress](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F175886588-e1aba466-85fa-4e32-951a-cd368c7d553d.gif)\n\n#### Using other included styles\n\nThere's a few included styles you can easily use with the following API:\n\n```swift\nNotificationPresenter.shared.present(\"Yay, it works!\",\n                                     includedStyle: .success)\n```\n\n![itworks](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F175888059-3beeb659-b561-4e7c-9c66-6fbc683ae152.jpg)\n\n#### Showing a custom SwiftUI view (Swift only)\n\n```swift\nNotificationPresenter.shared.presentSwiftView {\n    Text(\"Hi from Swift!\")\n}\n\n\u002F\u002F with completion\nNotificationPresenter.shared.presentSwiftView {\n    Text(\"Hi from Swift!\")\n} completion: { presenter in\n   \u002F\u002F ...\n}\n```\n\n#### Using a custom UIView (Swift or ObjC)\n\nIf you want full control over the notification content and styling, you can use your own custom UIView.\n\n```swift\n\u002F\u002F present a custom view\nlet button = UIButton(type: .system, primaryAction: UIAction { _ in\n  NotificationPresenter.shared.dismiss()\n})\nbutton.setTitle(\"Dismiss!\", for: .normal)\nNotificationPresenter.shared.presentCustomView(button)\n```\n\n| Light Mode  | Dark Mode |\n| --- | --- |\n| ![customView](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F173234544-7a75edbe-00b1-437b-8651-2e63a1ba63c8.gif) | ![customView2](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F173234636-b3745101-0723-4342-9a3a-32a868ea820e.gif) |\n\n## Customization\n\nYou have the option to easily create & use fully customized styles.\n\n### From SwiftUI\n\nModify the style in a `NotificationStyleClosure`:\n\n```swift\nvar body: some View {\n    Button(\"Present\u002Fdismiss\") {\n      isPresented.toggle()\n    }\n    .notification(isPresented: $isPresented, style: {\n      let s = $0.backgroundStyle\n      s.backgroundColor = .black\n      s.pillStyle.minimumWidth = 150\n      s.pillStyle.height = 44\n    }) {\n      Text(\"👋 Hi there!\")\n        .font(.subheadline)\n        .foregroundStyle(.white)\n    }\n}\n```\n\n### Manually\n\nThe ``PrepareStyleClosure`` provides a copy of the default style, which can then be modified. See the ``StatusBarNotificationStyle`` API for all options.\n\n```swift\n\u002F\u002F update default style\nNotificationPresenter.shared.updateDefaultStyle { style in\n   style.backgroundStyle.backgroundColor = .red\n   style.textStyle.textColor = .white\n   style.textStyle.font = UIFont.preferredFont(forTextStyle: .title3)\n   \u002F\u002F and many more options\n   return style\n}\n\n\u002F\u002F set a named custom style\nNotificationPresenter.shared.addStyle(named: \"xxx\") { style in\n   \u002F\u002F ...\n   return style\n}\n```\n\n### Style Editor\n\nOr checkout the example project, which contains a full style editor. You can tweak all customization options within the app, see the changes live and even export the configuration code for the newly created style to easily use it in your app.\n\n![style-editor](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F174438815-4e3de17f-eb15-4281-b786-c1bfce7415da.jpg)\n\n### Background Styles\n\nThere's two supported `StatusBarNotificationBackgroundType`'s:\n\n```swift\nenum {\n    \u002F\u002F\u002F The background is a floating pill around the text.\n    \u002F\u002F\u002F The pill size and appearance can be customized. This is the default.\n    .pill,\n\n    \u002F\u002F\u002F The background covers the full display width and the full status bar + navbar height.\n    .fullWidth\n}\n```\n\n### Animation Types\n\nThe supported `StatusBarNotificationAnimationType`'s:\n\n```swift\nenum {\n    \u002F\u002F\u002F Slide in from the top of the screen and slide\n    \u002F\u002F\u002F back out to the top. This is the default.\n    .move,\n\n    \u002F\u002F\u002F Fade-in and fade-out in place. No movement animation.\n    .fade,\n\n    \u002F\u002F\u002F Fall down from the top and bounce a little bit, before\n    \u002F\u002F\u002F coming to a rest. Slides back out to the top.\n    .bounce\n}\n```\n\n## Troubleshooting\n\n### No notifications are showing up\n\nIf your app uses a `UIWindowScene` the `NotificationPresenter` needs to know about it before you present any notifications.\nThe library attempts to find the correct WindowScene automatically, but that might fail. If it fails no notifications will show up at all. You can explicitly set the window scene to resolve this:\n\n```swift\nNotificationPresenter.shared().setWindowScene(windowScene)\n```\n\n## Twitter\n\nI'm [@calimarkus](http:\u002F\u002Ftwitter.com\u002Fcalimarkus) on Twitter. Feel free to [post a tweet](https:\u002F\u002Ftwitter.com\u002Fintent\u002Ftweet?button_hashtag=JDStatusBarNotification&text=Simple%20and%20customizable%20statusbar%20notifications%20for%20iOS!%20Check%20it%20out.%20https:\u002F\u002Fgithub.com\u002Fcalimarkus\u002FJDStatusBarNotification&via=calimarkus), if you like JDStatusBarNotification.  \n\n[![tweetbutton](https:\u002F\u002Fuser-images.githubusercontent.com\u002F807039\u002F170856086-2c283e68-a44f-4a9f-b327-bd5a7c654455.png)](https:\u002F\u002Ftwitter.com\u002Fintent\u002Ftweet?button_hashtag=JDStatusBarNotification&text=Simple%20and%20customizable%20statusbar%20notifications%20for%20iOS!%20Check%20it%20out.%20https:\u002F\u002Fgithub.com\u002Fcalimarkus\u002FJDStatusBarNotification&via=calimarkus)\n\n## Credits\n\nOriginally based on `KGStatusBar` by Kevin Gibbon\n","JDStatusBarNotification 是一个高度可定制且功能丰富的 iOS 通知库，支持在状态栏下方显示通知。它使用 Swift 编写，同时兼容 Objective-C。该库提供了多种内置样式、自定义颜色、字体和动画，支持拖动关闭、活动指示器、进度条以及自定义视图等功能。其动态布局适应不同设备（包括有无刘海屏）和屏幕方向，非常适合需要在应用中实现多样化通知展示的场景，如消息提示、操作反馈等。","2026-06-11 03:09:22","top_language"]