├── SwiftUIExamples
├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Preview Content
│ └── Preview Assets.xcassets
│ │ └── Contents.json
├── SwiftUIExamplesApp.swift
├── ContentView.swift
└── ContentViewModel.swift
├── UIKitExamples
├── Assets.xcassets
│ ├── Contents.json
│ ├── AccentColor.colorset
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── AppDelegate.swift
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
└── ViewController.swift
├── FontExamples
├── AveriaSerifLibre-Bold.ttf
└── AveriaSerifLibre-Regular.ttf
├── .swiftlint.yml
├── .swiftpm
└── xcode
│ └── package.xcworkspace
│ └── contents.xcworkspacedata
├── AlertViewCustom.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── project.pbxproj
├── Sources
└── AlertViewCustom
│ ├── Utils
│ ├── Enums.swift
│ ├── Extensions.swift
│ └── Structs.swift
│ ├── AlertViewCustom.swift
│ └── AlertView.swift
├── Package.swift
├── AlertViewCustom.podspec
├── LICENSE
├── .gitignore
└── README.md
/SwiftUIExamples/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/UIKitExamples/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/FontExamples/AveriaSerifLibre-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jadebowl/AlertViewCustom/HEAD/FontExamples/AveriaSerifLibre-Bold.ttf
--------------------------------------------------------------------------------
/.swiftlint.yml:
--------------------------------------------------------------------------------
1 | disabled_rules:
2 | - trailing_whitespace
3 |
4 | analyzer_rules:
5 | - explicit_self
6 |
7 | included:
8 | - Sources
--------------------------------------------------------------------------------
/FontExamples/AveriaSerifLibre-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jadebowl/AlertViewCustom/HEAD/FontExamples/AveriaSerifLibre-Regular.ttf
--------------------------------------------------------------------------------
/SwiftUIExamples/Preview Content/Preview Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/UIKitExamples/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/SwiftUIExamples/Assets.xcassets/AccentColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "idiom" : "universal"
5 | }
6 | ],
7 | "info" : {
8 | "author" : "xcode",
9 | "version" : 1
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/SwiftUIExamples/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/UIKitExamples/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "platform" : "ios",
6 | "size" : "1024x1024"
7 | }
8 | ],
9 | "info" : {
10 | "author" : "xcode",
11 | "version" : 1
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/AlertViewCustom.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sources/AlertViewCustom/Utils/Enums.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | /// Choose the alert position
4 | public enum AlertPosition {
5 | /// Default position
6 | case center
7 | /// When set to true the alert appears with an animation from the bottom
8 | case bottom(animated: Bool)
9 | }
10 |
--------------------------------------------------------------------------------
/AlertViewCustom.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftUIExamples/SwiftUIExamplesApp.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftUIExamplesApp.swift
3 | // SwiftUIExamples
4 | //
5 | // Created by Giada Ciotola on 28/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | @main
11 | struct SwiftUIExamplesApp: App {
12 | var body: some Scene {
13 | WindowGroup {
14 | ContentView()
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/UIKitExamples/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIAppFonts
6 |
7 | AveriaSerifLibre-Regular.ttf
8 | AveriaSerifLibre-Bold.ttf
9 | AveriaSerifLibre-Italic.ttf
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/UIKitExamples/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // UIKitExamples
4 | //
5 | // Created by Giada Ciotola on 28/09/23.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 | var window: UIWindow?
13 |
14 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
15 | return true
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.8
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "AlertViewCustom",
8 | platforms: [
9 | .iOS(.v14),
10 | .macOS(.v11)
11 | ],
12 | products: [
13 | .library(
14 | name: "AlertViewCustom",
15 | targets: ["AlertViewCustom"]),
16 | ],
17 | dependencies: [],
18 | targets: [
19 | .target(
20 | name: "AlertViewCustom",
21 | dependencies: [])
22 | ]
23 | )
24 |
--------------------------------------------------------------------------------
/SwiftUIExamples/ContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentView.swift
3 | // SwiftUIExamples
4 | //
5 | // Created by Giada Ciotola on 28/09/23.
6 | //
7 |
8 | import SwiftUI
9 |
10 | struct ContentView: View {
11 | @StateObject var viewModel = ContentViewModel()
12 |
13 | var body: some View {
14 | Color.blue
15 | .ignoresSafeArea(.all)
16 | .overlay(
17 | VStack {
18 | Button {
19 | viewModel.showAlert()
20 | } label: {
21 | Text("Show Alert")
22 | }.font(.system(size: 17, weight: .semibold, design: .default))
23 | .foregroundColor(.white)
24 | })
25 | }
26 | }
27 |
28 | #Preview {
29 | ContentView()
30 | }
31 |
--------------------------------------------------------------------------------
/AlertViewCustom.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'AlertViewCustom'
3 | s.version = '4.0.0'
4 | s.summary = 'Create a custom UIAlertView to fit the style of your app'
5 |
6 | s.description = <<-DESC
7 | With AlertViewCustom you can create your own customised UIAlertView instead of using the default one from Apple, which doesn't always fit in with the style of your app.
8 | DESC
9 |
10 | s.homepage = 'https://github.com/jadebowl/AlertViewCustom'
11 | s.license = { :type => 'MIT', :file => 'LICENSE' }
12 | s.author = { 'Giada Ciotola' => 'giadaciotola@hotmail.it' }
13 | s.source = { :git => 'https://github.com/jadebowl/AlertViewCustom.git', :tag => s.version.to_s }
14 |
15 | s.ios.deployment_target = '14.0'
16 | s.source_files = 'Sources/**/*'
17 | s.frameworks = 'UIKit'
18 |
19 | s.swift_version = '5.0'
20 |
21 | end
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2023 Giada Ciotola
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
--------------------------------------------------------------------------------
/UIKitExamples/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SwiftUIExamples/ContentViewModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ContentViewModel.swift
3 | // SwiftUIExamples
4 | //
5 | // Created by Giada Ciotola on 18/10/23.
6 | //
7 |
8 | import SwiftUI
9 | import AlertViewCustom
10 |
11 | class ContentViewModel: ObservableObject {
12 | let alert = AlertView()
13 |
14 | func showAlert() {
15 | let agreeButton = AgreeButton(title: "Go to Settings")
16 | let alertSettings = AlertSettings(accentColor: .systemBlue,
17 | backgroundColor: .systemBackground,
18 | icon: UIImage(systemName: "hand.wave"),
19 | title: "I am a title",
20 | message: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
21 | agreeButton: agreeButton,
22 | cancelTitle: "Cancel",
23 | position: .center)
24 | alert.setupContents(delegate: self, settings: alertSettings)
25 | alert.fadeIn(duration: 0.3)
26 | }
27 | }
28 |
29 | extension ContentViewModel: AlertViewDelegate {
30 | func agreeAction() {
31 | // MARK: - Example: Go to Settings
32 | guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return }
33 | if UIApplication.shared.canOpenURL(settingsUrl) {
34 | UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
35 | print("Settings opened: \(success)")
36 | })
37 | }
38 | }
39 |
40 | func cancelAction() {
41 | alert.removeFromSuperView(duration: 0.3)
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/UIKitExamples/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // UIKitExamples
4 | //
5 | // Created by Giada Ciotola on 28/09/23.
6 | //
7 |
8 | import UIKit
9 | import AlertViewCustom
10 |
11 | class ViewController: UIViewController {
12 |
13 | var alert = AlertView()
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 | }
18 |
19 | func setupAlert() {
20 | let agreeButton = AgreeButton(title: "Go to Settings", borderWidth: 3)
21 | let alertSettings = AlertSettings(accentColor: .systemBlue,
22 | backgroundColor: .systemBackground,
23 | fontName: "AveriaSerifLibre",
24 | icon: UIImage(systemName: "hand.wave"),
25 | title: "I am a title",
26 | message: "Lorem ipsum dolor sit amet, consectetuadipiscing elit, sed do eiusmod tempor incididunt ulabore et dolore magna aliqua.",
27 | agreeButton: agreeButton,
28 | cancelTitle: "Cancel",
29 | position: .bottom(animated: true))
30 | alert.setupContents(delegate: self, settings: alertSettings)
31 | alert.fadeIn(duration: 0.3)
32 | }
33 |
34 | @IBAction func showAlert(_ sender: UIButton) {
35 | setupAlert()
36 | }
37 | }
38 |
39 | extension ViewController: AlertViewDelegate {
40 | func agreeAction() {
41 | // MARK: - Example: Go to Settings
42 | guard let settingsUrl = URL(string: UIApplication.openSettingsURLString) else { return }
43 | if UIApplication.shared.canOpenURL(settingsUrl) {
44 | UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
45 | print("Settings opened: \(success)")
46 | })
47 | }
48 | }
49 |
50 | func cancelAction() {
51 | alert.removeFromSuperView(duration: 0.3)
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Sources/AlertViewCustom/Utils/Extensions.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | internal extension UIColor {
4 | func contrastColor() -> UIColor {
5 | var bit = CGFloat(0)
6 | var red = CGFloat(0)
7 | var green = CGFloat(0)
8 | var blue = CGFloat(0)
9 | var alpha = CGFloat(0)
10 |
11 | getRed(&red, green: &green, blue: &blue, alpha: &alpha)
12 |
13 | let luminance = 1 - ((0.299 * red) + (0.587 * green) + (0.114 * blue))
14 | if luminance < 0.5 {
15 | bit = CGFloat(0)
16 | } else {
17 | bit = CGFloat(1)
18 | }
19 | return UIColor(red: bit, green: bit, blue: bit, alpha: 1)
20 | }
21 | }
22 |
23 | extension UIWindow {
24 | func dismiss() {
25 | isHidden = true
26 | windowScene = nil
27 | }
28 | }
29 |
30 | internal extension UIApplication {
31 | var activeWindowScene: UIWindowScene? {
32 | return connectedScenes
33 | .compactMap { $0 as? UIWindowScene }
34 | .first { $0.activationState == .foregroundActive }
35 | }
36 | }
37 |
38 | internal extension UIFont {
39 | enum FontStyle {
40 | case headline
41 | case body
42 | case button
43 |
44 | var metrics: UIFontMetrics? {
45 | switch self {
46 | case .headline: return UIFontMetrics(forTextStyle: .headline)
47 | case .body: return UIFontMetrics(forTextStyle: .body)
48 | case .button: return UIFontMetrics(forTextStyle: .body)
49 | }
50 | }
51 |
52 | var size: CGFloat {
53 | switch self {
54 | case .headline: return 19
55 | case .body: return 17
56 | case .button: return 19
57 | }
58 | }
59 |
60 | func fontName(name: String) -> String {
61 | switch self {
62 | case .headline, .button: return name+"-Bold"
63 | case .body: return name+"-Regular"
64 | }
65 | }
66 | }
67 |
68 | static func font(for style: FontStyle, name: String) -> UIFont {
69 | let font = UIFont(name: style.fontName(name: name), size: style.size) ?? UIFont.systemFont(ofSize: style.size)
70 | return style.metrics?.scaledFont(for: font) ?? font
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/Sources/AlertViewCustom/Utils/Structs.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 |
3 | /**
4 | All the alert properties you can customise
5 | - parameters:
6 | - accentColor: Applies color to icon, agree button background and cancel button title
7 | - backgroundColor
8 | - backgroundRadius: Applies a corner radius to the alert view
9 | - fontName: Applies a custom font to title, message, agree button and cancel button.
10 | Font files imported in the project folder have to be named with suffixes "-Regular" and "-Bold"
11 | - icon
12 | - title
13 | - message
14 | - agreeButton: With a title, a corner radius and a border width
15 | - cancelTitle
16 | - position
17 | */
18 | public struct AlertSettings {
19 | public init(accentColor: UIColor,
20 | backgroundColor: UIColor,
21 | backgroundRadius: CGFloat = 16,
22 | fontName: String? = nil,
23 | icon: UIImage? = nil,
24 | title: String? = nil,
25 | message: String? = nil,
26 | agreeButton: AgreeButton,
27 | cancelTitle: String? = nil,
28 | position: AlertPosition? = .center) {
29 | self.accentColor = accentColor
30 | self.backgroundColor = backgroundColor
31 | self.backgroundRadius = backgroundRadius
32 | self.fontName = fontName
33 | self.icon = icon
34 | self.title = title
35 | self.message = message
36 | self.agreeButton = agreeButton
37 | self.cancelTitle = cancelTitle
38 | self.position = position
39 | }
40 | let accentColor: UIColor
41 | let backgroundColor: UIColor
42 | let backgroundRadius: CGFloat
43 | let fontName: String?
44 | let icon: UIImage?
45 | let title: String?
46 | let message: String?
47 | let agreeButton: AgreeButton
48 | let cancelTitle: String?
49 | let position: AlertPosition?
50 | }
51 |
52 | /**
53 | Customise the agree button
54 | - parameters:
55 | - title
56 | - cornerRadius
57 | - borderWidth: Applies a border with the accentColor and makes the background clear
58 | */
59 | public struct AgreeButton {
60 | public init(title: String, cornerRadius: CGFloat = 16, borderWidth: CGFloat = 0) {
61 | self.title = title
62 | self.cornerRadius = cornerRadius
63 | self.borderWidth = borderWidth
64 | }
65 | let title: String
66 | let cornerRadius: CGFloat
67 | let borderWidth: CGFloat
68 | }
69 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## User settings
6 | xcuserdata/
7 |
8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
9 | *.xcscmblueprint
10 | *.xccheckout
11 |
12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
13 | build/
14 | DerivedData/
15 | *.moved-aside
16 | *.pbxuser
17 | !default.pbxuser
18 | *.mode1v3
19 | !default.mode1v3
20 | *.mode2v3
21 | !default.mode2v3
22 | *.perspectivev3
23 | !default.perspectivev3
24 |
25 | ## Obj-C/Swift specific
26 | *.hmap
27 |
28 | ## App packaging
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | # Package.pins
42 | # Package.resolved
43 | # *.xcodeproj
44 | #
45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
46 | # hence it is not needed unless you have added a package configuration file to your project
47 | # .swiftpm
48 |
49 | .build/
50 |
51 | # CocoaPods
52 | #
53 | # We recommend against adding the Pods directory to your .gitignore. However
54 | # you should judge for yourself, the pros and cons are mentioned at:
55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
56 | #
57 | # Pods/
58 | #
59 | # Add this line if you want to avoid checking in source code from the Xcode workspace
60 | # *.xcworkspace
61 |
62 | # Carthage
63 | #
64 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
65 | # Carthage/Checkouts
66 |
67 | Carthage/Build/
68 |
69 | # Accio dependency management
70 | Dependencies/
71 | .accio/
72 |
73 | # fastlane
74 | #
75 | # It is recommended to not store the screenshots in the git repo.
76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed.
77 | # For more information about the recommended setup visit:
78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
79 |
80 | fastlane/report.xml
81 | fastlane/Preview.html
82 | fastlane/screenshots/**/*.png
83 | fastlane/test_output
84 |
85 | # Code Injection
86 | #
87 | # After new code Injection tools there's a generated folder /iOSInjectionProject
88 | # https://github.com/johnno1962/injectionforxcode
89 |
90 | iOSInjectionProject/
91 | /Sources/CustomAlert/.DS_Store
92 | /.DS_Store
93 | .DS_Store
94 |
--------------------------------------------------------------------------------
/UIKitExamples/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | []([https://swift.org/package-manager/](https://github.com/apple/swift-package-manager))
2 | [](https://cocoapods.org/pods/AlertViewCustom)
3 | [](https://cocoapods.org/pods/AlertViewCustom)
4 |
5 |
6 | [](https://swiftpackageindex.com/jadebowl/AlertViewCustom)
7 |
8 | [](https://app.codacy.com/gh/jadebowl/AlertViewCustom/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
9 |
10 |
11 | # AlertViewCustom
12 |
13 |
14 | With AlertViewCustom you can create your own customised UIAlertView instead of using the default one from Apple, which doesn't always fit in with the style of your app.
15 |
16 |
17 | ## Features
18 | - Can be used both in UIKit and SwiftUI
19 | - Add Icon
20 | - Personalise Title, Message and both Buttons
21 | - Possibility to hide Title, Message and Cancel Button
22 | - Change Alert Position (.center or .bottom)
23 | - Change Agree Button Corner Radius
24 | - Change Agree Button Color
25 | - Change View Background Color
26 | - Change Corner Radius of the whole AlertView
27 | - Add Animation from the Bottom when in .bottom Position
28 |
29 | ### Latest Updates:
30 | - Possibility to change Font
31 | - Possibility to have the Agree Button Outlined
32 |
33 | ## Examples
34 |