@@ -5,7 +5,7 @@ I tried to recreate Apple's alerts as much as possible. You can find these alert
55
66![ Alert Kit v5] ( https://cdn.sparrowcode.io/github/alertkit/v5/preview-v1_2.png )
77
8- For run alert just call this:
8+ For UIKit & SwiftUI call this:
99
1010``` swift
1111AlertKitAPI.present (
@@ -27,25 +27,31 @@ public enum AlertViewStyle {
2727```
2828
2929### Community
30-
30+
3131<p float =" left " >
3232 <a href="https://twitter.com/sparrowcode_en">
3333 <img src="https://cdn.sparrowcode.io/github%2Fbadges%2Ftwitter.png?version=4" height="52">
3434 </a>
3535 <a href="https://t.me/sparrowcode_en">
3636 <img src="https://cdn.sparrowcode.io/github/badges/telegram.png?version=1" height="52">
3737 </a>
38- <a href="https://mastodon.social/@sparrowcode_en">
39- <img src="https://cdn.sparrowcode.io/github/badges/mastodon.png?version=2" height="52">
40- </a>
4138 <a href="#apps-using">
4239 <img src="https://cdn.sparrowcode.io/github/badges/download-on-the-appstore.png?version=4" height="52">
4340 </a>
4441</p >
4542
43+ ## Navigate
44+
45+ - [ Installation] ( #installation )
46+ - [ Swift Package Manager] ( #swift-package-manager )
47+ - [ CocoaPods] ( #cocoapods )
48+ - [ SwiftUI] ( #swiftui )
49+ - [ Customisation] ( #customisation )
50+ - [ Apps Using] ( #apps-using )
51+
4652## Installation
4753
48- Ready to use on iOS 13+.
54+ Ready to use on iOS 13+. Supports iOS and visionOS. Working with ` UIKit ` and ` SwiftUI ` .
4955
5056### Swift Package Manager
5157
@@ -59,7 +65,7 @@ or adding it to the `dependencies` of your `Package.swift`:
5965
6066``` swift
6167dependencies: [
62- .package (url : " https://github.com/sparrowcode/AlertKit" , .upToNextMajor (from : " 5.0 .0" ))
68+ .package (url : " https://github.com/sparrowcode/AlertKit" , .upToNextMajor (from : " 5.1 .0" ))
6369]
6470```
6571
@@ -80,11 +86,35 @@ pod 'SPAlert'
8086
8187If you prefer not to use any of dependency managers, you can integrate manually. Put ` Sources/AlertKit ` folder in your Xcode project. Make sure to enable ` Copy items if needed ` and ` Create groups ` .
8288
89+ ## SwiftUI
90+
91+ You can use basic way via AlertKitAPI or call via modifier:
92+
93+ ``` swift
94+ let alertView = AlertAppleMusic17View (title : " Hello" , subtitle : nil , icon : .done )
95+
96+ VStack {}
97+ .alert (isPresent : $alertPresented, view : alertView)
98+ ```
99+
100+ ## Customisation
101+
102+ If you need customisation fonts, icon, colors or any other, make view:
103+
104+ ``` swift
105+ let alertView = AlertAppleMusic17View (title : " Added to Library" , subtitle : nil , icon : .done )
106+ // Change content color
107+ alertView.contentColor = .systemBlue
108+ // Change font
109+ alertView.titleLabel .font = UIFont.systemFont (ofSize : 21 )
110+ ```
111+
83112## Apps Using
84113
85114<p float =" left " >
86115 <a href="https://apps.apple.com/app/id1624477055"><img src="https://cdn.sparrowcode.io/github/apps-using/id1624477055.png?version=2" height="65"></a>
87116 <a href="https://apps.apple.com/app/id1625641322"><img src="https://cdn.sparrowcode.io/github/apps-using/id1625641322.png?version=2" height="65"></a>
117+ <a href="https://apps.apple.com/app/id1625641322"><img src="https://cdn.sparrowcode.io/github/apps-using/id6449774982.png?version=2" height="65"></a>
88118 <a href="https://apps.apple.com/app/id875280793"><img src="https://cdn.sparrowcode.io/github/apps-using/id875280793.png?version=2" height="65"></a>
89119 <a href="https://apps.apple.com/app/id743843090"><img src="https://cdn.sparrowcode.io/github/apps-using/id743843090.png?version=2" height="65"></a>
90120 <a href="https://apps.apple.com/app/id537070378"><img src="https://cdn.sparrowcode.io/github/apps-using/id537070378.png?version=2" height="65"></a>
0 commit comments