Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork148
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.
License
sparrowcode/AlertKit
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Popup from Apple Music & Feedback in AppStore. ContainsDone,Heart,Error and other. Supports Dark Mode.I tried to recreate Apple's alerts as much as possible. You can find these alerts in the AppStore after feedback and after you add a song to your library in Apple Music.
For UIKit & SwiftUI call this:
AlertKitAPI.present( title:"Added to Library", icon:.done, style:.iOS17AppleMusic, haptic:.success)
Available 2 styles:
publicenumAlertViewStyle{case iOS16AppleMusiccase iOS17AppleMusic}
Ready to use on iOS 13+. Supports iOS and visionOS. Working withUIKit andSwiftUI.
In Xcode go to Project -> Your Project Name ->Package Dependencies -> TapPlus. Insert url:
https://github.com/sparrowcode/AlertKitor adding it to thedependencies of yourPackage.swift:
dependencies:[.package(url:"https://github.com/sparrowcode/AlertKit",.upToNextMajor(from:"5.1.8"))]
This is an outdated way of doing things. I advise you to useSPM. However, I will continue to support Cocoapods for some time.
Cocoapods Installation
CocoaPods is a dependency manager. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in yourPodfile:
pod'SPAlert'
If you prefer not to use any of dependency managers, you can integrate manually. PutSources/AlertKit folder in your Xcode project. Make sure to enableCopy items if needed andCreate groups.
You can use basic way viaAlertKitAPI or call via modifier:
letalertView=AlertAppleMusic17View(title:"Hello", subtitle:nil, icon:.done)VStack{}.alert(isPresent: $alertPresented, view: alertView)
If you need customisation fonts, icon, colors or any other, make view:
letalertView=AlertAppleMusic17View(title:"Added to Library", subtitle:nil, icon:.done)// change fontalertView.titleLabel.font=UIFont.systemFont(ofSize:21)// change coloralertView.titleLabel.textColor=.white
You can present and dismiss alerts manually via view.
letalertView=AlertAppleMusic17View(title:"Added to Library", subtitle:nil, icon:.done)// presentalertView.present(on:self)// and dismissalertView.dismiss()
For dismiss all alerts that was presented:
AlertKitAPI.dismissAllAlerts()
If you use aAlertKit, add your app via Pull Request.
About
Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.
Topics
Resources
License
Code of conduct
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors14
Uh oh!
There was an error while loading.Please reload this page.











