Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jovins/bursts
A Funny Framework is showing alerts, Have been Adapting Swift and SwiftUI
https://github.com/jovins/bursts
bursts swift swiftui
Last synced: 3 months ago
JSON representation
A Funny Framework is showing alerts, Have been Adapting Swift and SwiftUI
- Host: GitHub
- URL: https://github.com/jovins/bursts
- Owner: Jovins
- License: mit
- Created: 2021-07-19T02:01:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-03T03:37:10.000Z (over 3 years ago)
- Last Synced: 2024-10-10T22:42:05.725Z (3 months ago)
- Topics: bursts, swift, swiftui
- Language: Swift
- Homepage:
- Size: 6.52 MB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bursts 🔥
A Funny Framework is showing alerts, Have adapted Swift and SwiftUI If you like the project, please `star ★`.----
[![CI](https://img.shields.io/badge/Bursts-pasing-success.svg)](https://github.com/jovins/Bursts/actions) [![CI](https://img.shields.io/badge/SwiftUI-Adapting-blueviolet.svg)]() [![CI](https://img.shields.io/badge/Swift-5.1-important.svg)]()[![CI](https://img.shields.io/badge/License-MIT-red.svg)]()
### Features
- iOS 10+
- Can be used in UIKit and SwiftUI applications
- Light/Dark modes
- Interactive dismissal
- Queue to show consecutive bursts
- Support dynamic font sizing
- Support announcing title and subtitle via VoiceOver
- Show from top or bottom of screen----
### Installation
+ CocoaPods
```
use_frameworks!
platform :ios, '10.0'
pop 'Bursts'
```### Configurations
A `Bursts` can be configured with a configuration that specifies:
+ backgroundColor
+ shadow attribute
+ shouldRasterize
+ rasterizationScale
+ titleColor
+ subtitleColor
+ cornerRadius### Usage
+ Create a Bursts Example
```swift
// 1.title
let burst: Burst = "Title Only"
// 2.title Only
let burst = Burst(title: "Title Only")
// 3.set title and subtitle
let burst = burst(title: "Title", subtitle: "Subtitle")
// 4.set title、subtitle and animator duration
let burst = burst(title: "Title", subtitle: "Subtitle", duration: 5.0)
// 外观设置
var setting = BurstSetting()
setting.isDefault = false
setting.backgroundColor = UIColor(hex: 0x66ccff)
setting.shadowColor = .orange
setting.titleColor = .white
setting.subtitleColor = UIColor(hex: 0xEFEFEF)
// init Bursts
let burst = Burst(
title: "Title",
subtitle: "Subtitle",
icon: UIImage(systemName: "star.fill"),
action: .init {
print("Burst tapped")
Bursts.hide()
},
position: .top,
duration: 2.0,
setting: setting
)// Show Bursts
Bursts.show("Title")
Bursts.show(burst)
```### Example Projects
- Run the `SwiftUIExample` target to see how Bursts works in SwiftUI applications.
- Run the `UIKitExample` target to see how Bursts works in UIKit applications.### Author
### License
- `Bursts` is available under the MIT license. See the LICENSE file for more info.