A Funny Framework is showing alerts, Have been Adapting Swift and SwiftUI
MIT License
A Funny Framework is showing alerts, Have adapted Swift and SwiftUI If you like the project, please star ★
.
use_frameworks!
platform :ios, '10.0'
pop 'Bursts'
A Bursts
can be configured with a configuration that specifies:
// 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)
SwiftUIExample
target to see how Bursts works in SwiftUI applications.UIKitExample
target to see how Bursts works in UIKit applications.Bursts
is available under the MIT license. See the LICENSE file for more info.