Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets.

License

NotificationsYou must be signed in to change notification settings

sparrowcode/AlertKit

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.

Alert Kit v5

For UIKit & SwiftUI call this:

AlertKitAPI.present(    title:"Added to Library",    icon:.done,    style:.iOS17AppleMusic,    haptic:.success)

Available 2 styles:

publicenumAlertViewStyle{case iOS16AppleMusiccase iOS17AppleMusic}

iOS Dev Community

Navigate

Installation

Ready to use on iOS 13+. Supports iOS and visionOS. Working withUIKit andSwiftUI.

Swift Package Manager

In Xcode go to Project -> Your Project Name ->Package Dependencies -> TapPlus. Insert url:

https://github.com/sparrowcode/AlertKit

or adding it to thedependencies of yourPackage.swift:

dependencies:[.package(url:"https://github.com/sparrowcode/AlertKit",.upToNextMajor(from:"5.1.8"))]

CocoaPods:

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'

Manually

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.

SwiftUI

You can use basic way viaAlertKitAPI or call via modifier:

letalertView=AlertAppleMusic17View(title:"Hello", subtitle:nil, icon:.done)VStack{}.alert(isPresent: $alertPresented, view: alertView)

Customisation

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

Present & Dismiss

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()

Apps Using

If you use aAlertKit, add your app via Pull Request.

Sponsor this project

 

Contributors14


[8]ページ先頭

©2009-2025 Movatter.jp