├── .all-contributorsrc
├── .gitignore
├── Docs
├── screenshot_dark.png
└── screenshot_light.png
├── LICENSE
├── Package.swift
├── README.md
├── Sources
└── iDonateAlert
│ ├── AlertViewController.swift
│ ├── Assets.xcassets
│ ├── Contents.json
│ ├── afad.imageset
│ │ ├── Contents.json
│ │ ├── Layer_1 1.png
│ │ ├── Layer_1.png
│ │ ├── Layer_1@2x 1.png
│ │ ├── Layer_1@2x.png
│ │ ├── Layer_1@3x 1.png
│ │ └── Layer_1@3x.png
│ ├── ahbap.imageset
│ │ ├── Contents.json
│ │ ├── Group 1.png
│ │ ├── Group.png
│ │ ├── Group@2x 1.png
│ │ ├── Group@2x.png
│ │ ├── Group@3x 1.png
│ │ └── Group@3x.png
│ ├── closeButton.imageset
│ │ ├── Contents.json
│ │ ├── close-circle 1.png
│ │ ├── close-circle.png
│ │ ├── close-circle@2x 1.png
│ │ ├── close-circle@2x.png
│ │ ├── close-circle@3x 1.png
│ │ └── close-circle@3x.png
│ ├── heart.imageset
│ │ ├── Contents.json
│ │ ├── Group 25@1x.png
│ │ ├── Group 25@2x.png
│ │ └── Group 25@3x.png
│ ├── kizilay.imageset
│ │ ├── Contents.json
│ │ ├── Group 27.png
│ │ ├── Group 27@2x.png
│ │ ├── Group 27@3x.png
│ │ ├── Group 30.png
│ │ ├── Group 30@2x.png
│ │ └── Group 30@3x.png
│ ├── leftCornerIcon.imageset
│ │ ├── Contents.json
│ │ ├── Vector@1x.png
│ │ ├── Vector@2x.png
│ │ └── Vector@3x.png
│ ├── rightCornerIcon.imageset
│ │ ├── Contents.json
│ │ ├── Vector@1x.png
│ │ ├── Vector@2x.png
│ │ └── Vector@3x.png
│ └── singleHeart.imageset
│ │ ├── Contents.json
│ │ ├── Vector@1x.png
│ │ ├── Vector@2x.png
│ │ └── Vector@3x.png
│ ├── Colors.xcassets
│ ├── Contents.json
│ ├── afadBlue.colorset
│ │ └── Contents.json
│ ├── afadButtonBackgroundColor.colorset
│ │ └── Contents.json
│ ├── ahbapButtonBackgroundColor.colorset
│ │ └── Contents.json
│ ├── ahbapGreen.colorset
│ │ └── Contents.json
│ ├── baseBackgroundColor.colorset
│ │ └── Contents.json
│ ├── baseDonateTextColor.colorset
│ │ └── Contents.json
│ ├── baseTextColor.colorset
│ │ └── Contents.json
│ ├── individualButonBorderColor.colorset
│ │ └── Contents.json
│ ├── kızılayBackgroundColor.colorset
│ │ └── Contents.json
│ └── kızılayRed.colorset
│ │ └── Contents.json
│ ├── Extensions
│ ├── Color+Extensions.swift
│ ├── UIButton+Extension.swift
│ ├── UIFont+Extensions.swift
│ └── UIImage+Extensions.swift
│ ├── Localizer
│ ├── Locale+Extension.swift
│ └── Localizer.swift
│ ├── Resources
│ ├── en.lproj
│ │ └── Localizable.strings
│ └── tr.lproj
│ │ └── Localizable.strings
│ ├── iDonateAlert.storyboard
│ └── iDonateAlert.swift
├── Tests
└── iDonateAlertTests
│ └── iDonateAlertTests.swift
├── iDonateAlertSample.xcodeproj
├── project.pbxproj
└── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ └── IDEWorkspaceChecks.plist
└── iDonateAlertSample
├── AppDelegate.swift
├── Assets.xcassets
├── AppIcon.appiconset
│ └── Contents.json
└── Contents.json
├── Base.lproj
├── LaunchScreen.storyboard
└── Main.storyboard
├── Info.plist
├── MainViewController.swift
├── SceneDelegate.swift
└── ViewController.swift
/.all-contributorsrc:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | "README.md"
4 | ],
5 | "imageSize": 100,
6 | "commit": false,
7 | "commitConvention": "angular",
8 | "contributors": [
9 | {
10 | "login": "Rashidium",
11 | "name": "Rashid Ramazanov",
12 | "avatar_url": "https://avatars.githubusercontent.com/u/11058743?v=4",
13 | "profile": "https://github.com/Rashidium",
14 | "contributions": [
15 | "code",
16 | "doc",
17 | "infra",
18 | "mentoring"
19 | ]
20 | },
21 | {
22 | "login": "NOTB4D",
23 | "name": "Eser Kucuker",
24 | "avatar_url": "https://avatars.githubusercontent.com/u/75912206?v=4",
25 | "profile": "https://github.com/NOTB4D",
26 | "contributions": [
27 | "code",
28 | "doc"
29 | ]
30 | },
31 | {
32 | "login": "Pessevmeyen",
33 | "name": "Furkan Erucar",
34 | "avatar_url": "https://avatars.githubusercontent.com/u/97690923?v=4",
35 | "profile": "https://github.com/Pessevmeyen",
36 | "contributions": [
37 | "code"
38 | ]
39 | },
40 | {
41 | "login": "samet-ogutcuoglu",
42 | "name": "Samet Ögütcüoğlu",
43 | "avatar_url": "https://avatars.githubusercontent.com/u/108695720?v=4",
44 | "profile": "https://github.com/samet-ogutcuoglu",
45 | "contributions": [
46 | "code"
47 | ]
48 | },
49 | {
50 | "login": "bariscan-mobven",
51 | "name": "bariscan-mobven",
52 | "avatar_url": "https://avatars.githubusercontent.com/u/125072849?v=4",
53 | "profile": "https://github.com/bariscan-mobven",
54 | "contributions": [
55 | "content",
56 | "eventOrganizing",
57 | "ideas",
58 | "translation"
59 | ]
60 | }
61 | ],
62 | "contributorsPerLine": 7,
63 | "skipCi": true,
64 | "repoType": "github",
65 | "repoHost": "https://github.com",
66 | "projectName": "iDonateAlert",
67 | "projectOwner": "mobven"
68 | }
69 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 | FeedbackReporterIOS/DrivedData
9 | *.ipa
10 | *.app.dSYM.zip
11 |
12 | ## Various settings
13 | *.pbxuser
14 | !default.pbxuser
15 | *.mode1v3
16 | !default.mode1v3
17 | *.mode2v3
18 | !default.mode2v3
19 | *.perspectivev3
20 | !default.perspectivev3
21 | xcuserdata/
22 |
23 | ## Other
24 | *.moved-aside
25 | *.xccheckout
26 | *.xcscmblueprint
27 |
28 | ## Obj-C/Swift specific
29 | *.hmap
30 | *.ipa
31 | *.dSYM.zip
32 | *.dSYM
33 |
34 | ## Playgrounds
35 | timeline.xctimeline
36 | playground.xcworkspace
37 |
38 | # Swift Package Manager
39 | #
40 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
41 | # Packages/
42 | # Package.pins
43 | # Package.resolved
44 | # *.xcodeproj
45 | #
46 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
47 | # hence it is not needed unless you have added a package configuration file to your project
48 | .swiftpm
49 |
50 | .build/
51 |
52 | # CocoaPods
53 | #
54 | # We recommend against adding the Pods directory to your .gitignore. However
55 | # you should judge for yourself, the pros and cons are mentioned at:
56 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
57 | #
58 | Pods/
59 |
60 | # Carthage
61 | #
62 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
63 | # Carthage/Checkouts
64 |
65 | Carthage/Build
66 | vendor
67 |
68 | # fastlane
69 | #
70 | # It is recommended to not store the screenshots in the git repo.
71 | # Instead, use fastlane to re-generate the screenshots whenever they are needed.
72 | # For more information about the recommended setup visit:
73 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
74 |
75 | fastlane/report.xml
76 | fastlane/Preview.html
77 | fastlane/screenshots
78 | fastlane/test_output
79 | .DS_Store
80 | fastlane/README.md
81 | reports/
82 | firebase-debug.log
83 | Gemfile.lock
84 | fastlane/Matchfile
85 |
--------------------------------------------------------------------------------
/Docs/screenshot_dark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Docs/screenshot_dark.png
--------------------------------------------------------------------------------
/Docs/screenshot_light.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Docs/screenshot_light.png
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2023 Mobven
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version: 5.7
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: "iDonateAlert",
8 | defaultLocalization: "tr",
9 | platforms: [.iOS(.v11)],
10 | products: [
11 | .library(
12 | name: "iDonateAlert",
13 | targets: ["iDonateAlert"])
14 | ],
15 | dependencies: [
16 | ],
17 | targets: [
18 | .target(
19 | name: "iDonateAlert",
20 | dependencies: []
21 | ),
22 | .testTarget(
23 | name: "iDonateAlertTests",
24 | dependencies: ["iDonateAlert"])
25 | ]
26 | )
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # iDonateAlert
2 |
3 | [](#contributors-)
4 |
5 |
6 | iDonateAlert iOS SDK to show donation alerts easily in your app.
7 |
8 | ## Examples
9 |
10 |
11 |
12 |
13 |
14 |
15 | ## Requirements
16 | * iOS 11.0+
17 | * Xcode 14+
18 | * Swift 5.7+
19 |
20 | ## Installation
21 | iDonateAlert is distributed with [Swift Package Manager](https://swift.org/package-manager/). You can add framework to your project from Xcode's `File > Swift Packages > Add Package Dependency` menu with its github URL:
22 | ```
23 | https://github.com/mobven/iDonateAlert.git
24 | ```
25 |
26 | ## Usage
27 | ### Default initializer
28 | iDonateAlert can be initialized through, which has default title and message those are presented in the screenshot above.
29 | ```swift
30 | let alert = iDonateAlert()
31 | alert.present(over: self)
32 | ```
33 |
34 | ### Custom title, message and icon
35 | If you want to use custom title and message, you can use below initializer. You can pass `icon` to use custom icon.
36 | ```swift
37 | let alert = iDonateAlert(title: "Donate", message: "Donation lorem impsum...")
38 | alert.present(over: self)
39 | ```
40 |
41 | ### Attributed title and message, and custom icon
42 | You can use `.init(attributedTitle:, attributedMessage:)` to use attributed parameters for title and messages including your own fonts.
43 | ```swift
44 | let attributedTitle = NSAttributedString(string: "Donate")
45 | let attributedMessage = NSAttributedString(string: "Donation lorem impsum...")
46 | let alert = iDonateAlert(attributedTitle: attributedTitle, attributedMessage: attributedMessage)
47 | alert.present(over: self)
48 | ```
49 |
50 | ### Custom Action Buttons
51 | By default it has, AHBAP, AFAD and Turk Kizilayi buttons. If you want to add custom buttons, you can set it via:
52 | ```swift
53 | let alert = iDonateAlert()
54 | alert.removeAllActions()
55 | alert.addAction(
56 | .init(
57 | title: "INDIVIDUAL DONATION", image: nil,
58 | borderColor: UIColor.systemPink, backgroundColor: UIColor.white,
59 | url: URL(string: "https://www.afad.gov.tr/depremkampanyasi2")!
60 | )
61 | )
62 | alert.present(over: self)
63 | ```
64 |
65 | ### Localization
66 | You can pass `iDonateAlertLocale` value to it's initializer to set locale.
67 | ```swift
68 | let alert = iDonateAlert(locale: .en)
69 | ```
70 | Currently, English and Turkish languages are supported. Please feel free to contribute to add other languages.
71 |
72 | ## Contributors ✨
73 |
74 | Thanks goes to these wonderful people ([emoji meanings](https://allcontributors.org/docs/en/emoji-key)):
75 |
76 |
77 |
78 |
79 |
90 |
91 |
92 |
93 |
94 |
95 |
96 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
97 |
98 | ---
99 | Developed with 🖤 at [Mobven](https://mobven.com/)
100 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/AlertViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AlertViewController.swift
3 | // KocAilem
4 | //
5 | // Created by Rasid Ramazanov on 06.11.2019.
6 | // Copyright © 2019 Mobven. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SafariServices
11 |
12 |
13 | final class AlertViewController: UIViewController {
14 | @IBOutlet private var contentView: UIView!
15 | @IBOutlet private var scrollView: UIScrollView!
16 | @IBOutlet private var alertIconHeightConstraint: NSLayoutConstraint!
17 | @IBOutlet private var alertIconImage: UIImageView!
18 | @IBOutlet private var alertTitleLabel: UILabel!
19 | @IBOutlet private var alertMessageLabel: UILabel!
20 | @IBOutlet private var buttonsStackView: UIStackView!
21 | @IBOutlet weak var rightCornerIcon: UIImageView!
22 | @IBOutlet weak var leftCornerIcon: UIImageView!
23 | @IBOutlet weak var singleHeart: UIImageView!
24 | @IBOutlet weak var dismissButton: UIButton!
25 |
26 | var alertIcon: UIImage?
27 | var alertTitle: String!
28 | var titleFont: UIFont?
29 | var alertMessage: String!
30 | var alertButtons: [iDonateAlert.Button]!
31 | var attributedTitle: NSAttributedString?
32 | var attributedMessage: NSAttributedString?
33 |
34 | @IBInspectable private var imageContainerHeight: CGFloat = 120
35 | @IBInspectable private var buttonHeight: CGFloat = 40
36 | @IBInspectable private var buttonCornerRadius: CGFloat = 20
37 |
38 | override func viewDidLoad() {
39 | super.viewDidLoad()
40 | updateUIForTraitCollection()
41 | alertIconHeightConstraint.constant = alertIcon == nil ? 0 : imageContainerHeight
42 | alertIconImage.image = alertIcon
43 | alertTitleLabel.text = alertTitle
44 | if let attributedTitle {
45 | alertTitleLabel.attributedText = attributedTitle
46 | }
47 | if let font = titleFont {
48 | alertTitleLabel.font = font
49 | }
50 | alertMessageLabel.text = alertMessage
51 | if let attributedMessage {
52 | alertMessageLabel.attributedText = attributedMessage
53 | }
54 | setButtons()
55 | dismissButton.localizedTitleKey = "close"
56 | }
57 |
58 | @IBAction func dismiss(_ sender: UIButton) {
59 | dismiss(animated: true)
60 | }
61 |
62 | private func setButtons() {
63 | for (index, alertButton) in alertButtons.enumerated() {
64 | let button = UIButton(frame: .init(origin: .zero, size: .init(
65 | width: buttonsStackView.frame.width,
66 | height: buttonHeight
67 | )))
68 | button.layer.cornerRadius = buttonCornerRadius
69 | button.setTitle(alertButton.title, for: .normal)
70 | button.tag = index
71 | button.addTarget(self, action: #selector(selectButton(_:)), for: .touchUpInside)
72 | button.layer.borderWidth = 2
73 | button.layer.cornerRadius = 8
74 | button.layer.borderColor = alertButton.borderColor?.cgColor
75 | button.backgroundColor = alertButton.backgroundColor
76 | button.setTitleColor(alertButton.defaultTitleColor, for: .normal)
77 | button.setImage(alertButton.image, for: .normal)
78 | buttonsStackView.addArrangedSubview(button)
79 | NSLayoutConstraint.activate([button.heightAnchor.constraint(equalToConstant: 52)])
80 | }
81 | }
82 |
83 | @objc private func selectButton(_ button: UIButton) {
84 | let config = SFSafariViewController.Configuration()
85 | let safariViewController = SFSafariViewController(url: alertButtons[button.tag].url, configuration: config)
86 | safariViewController.modalPresentationStyle = .fullScreen
87 | present(safariViewController, animated: true)
88 | }
89 |
90 | override public func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
91 | super.traitCollectionDidChange(previousTraitCollection)
92 | updateUIForTraitCollection()
93 | }
94 |
95 | private func updateUIForTraitCollection(_ previousTraitCollection: UITraitCollection? = nil) {
96 | if #available(iOS 13.0, *) {
97 | guard traitCollection.hasDifferentColorAppearance(comparedTo: previousTraitCollection) else {
98 | return
99 | }
100 | if traitCollection.userInterfaceStyle == .light {
101 | leftCornerIcon.isHidden = false
102 | rightCornerIcon.isHidden = false
103 | } else {
104 | leftCornerIcon.isHidden = true
105 | rightCornerIcon.isHidden = true
106 | }
107 |
108 | }
109 | }
110 | }
111 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Layer_1.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "Layer_1 1.png",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "filename" : "Layer_1@2x.png",
21 | "idiom" : "universal",
22 | "scale" : "2x"
23 | },
24 | {
25 | "appearances" : [
26 | {
27 | "appearance" : "luminosity",
28 | "value" : "dark"
29 | }
30 | ],
31 | "filename" : "Layer_1@2x 1.png",
32 | "idiom" : "universal",
33 | "scale" : "2x"
34 | },
35 | {
36 | "filename" : "Layer_1@3x.png",
37 | "idiom" : "universal",
38 | "scale" : "3x"
39 | },
40 | {
41 | "appearances" : [
42 | {
43 | "appearance" : "luminosity",
44 | "value" : "dark"
45 | }
46 | ],
47 | "filename" : "Layer_1@3x 1.png",
48 | "idiom" : "universal",
49 | "scale" : "3x"
50 | }
51 | ],
52 | "info" : {
53 | "author" : "xcode",
54 | "version" : 1
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@2x 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@2x 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@3x 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@3x 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/afad.imageset/Layer_1@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Group.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "Group 1.png",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "filename" : "Group@2x.png",
21 | "idiom" : "universal",
22 | "scale" : "2x"
23 | },
24 | {
25 | "appearances" : [
26 | {
27 | "appearance" : "luminosity",
28 | "value" : "dark"
29 | }
30 | ],
31 | "filename" : "Group@2x 1.png",
32 | "idiom" : "universal",
33 | "scale" : "2x"
34 | },
35 | {
36 | "filename" : "Group@3x.png",
37 | "idiom" : "universal",
38 | "scale" : "3x"
39 | },
40 | {
41 | "appearances" : [
42 | {
43 | "appearance" : "luminosity",
44 | "value" : "dark"
45 | }
46 | ],
47 | "filename" : "Group@3x 1.png",
48 | "idiom" : "universal",
49 | "scale" : "3x"
50 | }
51 | ],
52 | "info" : {
53 | "author" : "xcode",
54 | "version" : 1
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@2x 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@2x 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@3x 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@3x 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/ahbap.imageset/Group@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "close-circle.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "close-circle 1.png",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "filename" : "close-circle@2x.png",
21 | "idiom" : "universal",
22 | "scale" : "2x"
23 | },
24 | {
25 | "appearances" : [
26 | {
27 | "appearance" : "luminosity",
28 | "value" : "dark"
29 | }
30 | ],
31 | "filename" : "close-circle@2x 1.png",
32 | "idiom" : "universal",
33 | "scale" : "2x"
34 | },
35 | {
36 | "filename" : "close-circle@3x.png",
37 | "idiom" : "universal",
38 | "scale" : "3x"
39 | },
40 | {
41 | "appearances" : [
42 | {
43 | "appearance" : "luminosity",
44 | "value" : "dark"
45 | }
46 | ],
47 | "filename" : "close-circle@3x 1.png",
48 | "idiom" : "universal",
49 | "scale" : "3x"
50 | }
51 | ],
52 | "info" : {
53 | "author" : "xcode",
54 | "version" : 1
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@2x 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@2x 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@3x 1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@3x 1.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/closeButton.imageset/close-circle@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/heart.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Group 25@1x.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "idiom" : "universal",
16 | "scale" : "1x"
17 | },
18 | {
19 | "filename" : "Group 25@2x.png",
20 | "idiom" : "universal",
21 | "scale" : "2x"
22 | },
23 | {
24 | "appearances" : [
25 | {
26 | "appearance" : "luminosity",
27 | "value" : "dark"
28 | }
29 | ],
30 | "idiom" : "universal",
31 | "scale" : "2x"
32 | },
33 | {
34 | "filename" : "Group 25@3x.png",
35 | "idiom" : "universal",
36 | "scale" : "3x"
37 | },
38 | {
39 | "appearances" : [
40 | {
41 | "appearance" : "luminosity",
42 | "value" : "dark"
43 | }
44 | ],
45 | "idiom" : "universal",
46 | "scale" : "3x"
47 | }
48 | ],
49 | "info" : {
50 | "author" : "xcode",
51 | "version" : 1
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/heart.imageset/Group 25@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/heart.imageset/Group 25@1x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/heart.imageset/Group 25@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/heart.imageset/Group 25@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/heart.imageset/Group 25@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/heart.imageset/Group 25@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Group 27.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "appearances" : [
10 | {
11 | "appearance" : "luminosity",
12 | "value" : "dark"
13 | }
14 | ],
15 | "filename" : "Group 30.png",
16 | "idiom" : "universal",
17 | "scale" : "1x"
18 | },
19 | {
20 | "filename" : "Group 27@2x.png",
21 | "idiom" : "universal",
22 | "scale" : "2x"
23 | },
24 | {
25 | "appearances" : [
26 | {
27 | "appearance" : "luminosity",
28 | "value" : "dark"
29 | }
30 | ],
31 | "filename" : "Group 30@2x.png",
32 | "idiom" : "universal",
33 | "scale" : "2x"
34 | },
35 | {
36 | "filename" : "Group 27@3x.png",
37 | "idiom" : "universal",
38 | "scale" : "3x"
39 | },
40 | {
41 | "appearances" : [
42 | {
43 | "appearance" : "luminosity",
44 | "value" : "dark"
45 | }
46 | ],
47 | "filename" : "Group 30@3x.png",
48 | "idiom" : "universal",
49 | "scale" : "3x"
50 | }
51 | ],
52 | "info" : {
53 | "author" : "xcode",
54 | "version" : 1
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 27.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 27@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 27@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 27@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 27@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 30.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 30.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 30@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 30@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 30@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/kizilay.imageset/Group 30@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/leftCornerIcon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Vector@1x.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "filename" : "Vector@2x.png",
10 | "idiom" : "universal",
11 | "scale" : "2x"
12 | },
13 | {
14 | "filename" : "Vector@3x.png",
15 | "idiom" : "universal",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "author" : "xcode",
21 | "version" : 1
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/leftCornerIcon.imageset/Vector@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/leftCornerIcon.imageset/Vector@1x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/leftCornerIcon.imageset/Vector@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/leftCornerIcon.imageset/Vector@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/leftCornerIcon.imageset/Vector@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/leftCornerIcon.imageset/Vector@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/rightCornerIcon.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Vector@1x.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "filename" : "Vector@2x.png",
10 | "idiom" : "universal",
11 | "scale" : "2x"
12 | },
13 | {
14 | "filename" : "Vector@3x.png",
15 | "idiom" : "universal",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "author" : "xcode",
21 | "version" : 1
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/rightCornerIcon.imageset/Vector@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/rightCornerIcon.imageset/Vector@1x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/rightCornerIcon.imageset/Vector@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/rightCornerIcon.imageset/Vector@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/rightCornerIcon.imageset/Vector@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/rightCornerIcon.imageset/Vector@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/singleHeart.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "filename" : "Vector@1x.png",
5 | "idiom" : "universal",
6 | "scale" : "1x"
7 | },
8 | {
9 | "filename" : "Vector@2x.png",
10 | "idiom" : "universal",
11 | "scale" : "2x"
12 | },
13 | {
14 | "filename" : "Vector@3x.png",
15 | "idiom" : "universal",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "author" : "xcode",
21 | "version" : 1
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/singleHeart.imageset/Vector@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/singleHeart.imageset/Vector@1x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/singleHeart.imageset/Vector@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/singleHeart.imageset/Vector@2x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Assets.xcassets/singleHeart.imageset/Vector@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mobven/iDonateAlert/5e25b486f47c29dacffcbda154d46bf67f8da872/Sources/iDonateAlert/Assets.xcassets/singleHeart.imageset/Vector@3x.png
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/afadBlue.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0xA6",
9 | "green" : "0x54",
10 | "red" : "0x00"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0xA6",
27 | "green" : "0x54",
28 | "red" : "0x00"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/afadButtonBackgroundColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0xFF",
9 | "green" : "0xFF",
10 | "red" : "0xFF"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0xA6",
27 | "green" : "0x54",
28 | "red" : "0x00"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/ahbapButtonBackgroundColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0xFF",
9 | "green" : "0xFF",
10 | "red" : "0xFF"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x40",
27 | "green" : "0xBE",
28 | "red" : "0x88"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/ahbapGreen.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x40",
9 | "green" : "0xBE",
10 | "red" : "0x88"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x40",
27 | "green" : "0xBE",
28 | "red" : "0x88"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/baseBackgroundColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0xFA",
9 | "green" : "0xFA",
10 | "red" : "0xFA"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x25",
27 | "green" : "0x20",
28 | "red" : "0x1E"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/baseDonateTextColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x6E",
9 | "green" : "0x62",
10 | "red" : "0xCF"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x6E",
27 | "green" : "0x62",
28 | "red" : "0xCF"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/baseTextColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x42",
9 | "green" : "0x33",
10 | "red" : "0x25"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0xFF",
27 | "green" : "0xFF",
28 | "red" : "0xFF"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/individualButonBorderColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x42",
9 | "green" : "0x33",
10 | "red" : "0x25"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0xFF",
27 | "green" : "0xFF",
28 | "red" : "0xFF"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/kızılayBackgroundColor.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0xFF",
9 | "green" : "0xFF",
10 | "red" : "0xFF"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x2C",
27 | "green" : "0x2A",
28 | "red" : "0xDE"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Colors.xcassets/kızılayRed.colorset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "colors" : [
3 | {
4 | "color" : {
5 | "color-space" : "srgb",
6 | "components" : {
7 | "alpha" : "1.000",
8 | "blue" : "0x2C",
9 | "green" : "0x2A",
10 | "red" : "0xDE"
11 | }
12 | },
13 | "idiom" : "universal"
14 | },
15 | {
16 | "appearances" : [
17 | {
18 | "appearance" : "luminosity",
19 | "value" : "dark"
20 | }
21 | ],
22 | "color" : {
23 | "color-space" : "srgb",
24 | "components" : {
25 | "alpha" : "1.000",
26 | "blue" : "0x2C",
27 | "green" : "0x2A",
28 | "red" : "0xDE"
29 | }
30 | },
31 | "idiom" : "universal"
32 | }
33 | ],
34 | "info" : {
35 | "author" : "xcode",
36 | "version" : 1
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Extensions/Color+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Color+Extensions.swift
3 | //
4 | //
5 | // Created by Rashid Ramazanov on 10.02.2023.
6 | //
7 |
8 | import Foundation
9 | import UIKit
10 |
11 | public extension UIColor {
12 | static var afadBlue: UIColor { UIColor(colorName: "afadBlue") }
13 | static var afadButtonBackgroundColor: UIColor { UIColor(colorName: "afadButtonBackgroundColor") }
14 | static var ahbapGreen: UIColor { UIColor(colorName: "ahbapGreen") }
15 | static var ahbapButtonBackgroundColor: UIColor { UIColor(colorName: "ahbapButtonBackgroundColor") }
16 | static var baseDonateTextColor: UIColor { UIColor(colorName: "baseDonateTextColor") }
17 | static var baseTextColor: UIColor { UIColor(colorName: "baseTextColor") }
18 | static var baseBackgroundColor: UIColor { UIColor(colorName: "baseBackgroundColor") }
19 | static var individualButonBorderColor: UIColor { UIColor(colorName: "individualButonBorderColor") }
20 | static var kızılayBackgroundColor: UIColor { UIColor(colorName: "kızılayBackgroundColor") }
21 | static var kızılayRed: UIColor { UIColor(colorName: "kızılayRed") }
22 |
23 | }
24 | public extension UIColor {
25 | convenience init(colorName: String) {
26 | if #available(iOS 13.0, *) {
27 | self.init(named: colorName, in: Bundle.module, compatibleWith: .current)!
28 | } else {
29 | self.init(named: colorName, in: Bundle.module, compatibleWith: nil)!
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Extensions/UIButton+Extension.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIButton+Extension.swift
3 | // Localizer
4 | //
5 | // Created by Rashid Ramazanov on 29.12.2020.
6 | // Copyright © 2020 Mobven. All rights reserved.
7 | //
8 |
9 | import Foundation
10 | import UIKit
11 |
12 | struct AssociatedKey {
13 | static var textKey: UInt8 = 0
14 | static var placeholderKey: UInt8 = 1
15 | }
16 |
17 | public extension UIButton {
18 | @IBInspectable var localizedTitleKey: String {
19 | get {
20 | objc_getAssociatedObject(self, &AssociatedKey.textKey) as? String ?? ""
21 | }
22 | set {
23 | objc_setAssociatedObject(self, &AssociatedKey.textKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
24 | setTitle(newValue.localized, for: .normal)
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Extensions/UIFont+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIFont+Extensions.swift
3 | // iDonateAlert
4 | //
5 | // Created by Rashid Ramazanov on 11.02.2023.
6 | //
7 |
8 | import Foundation
9 | import UIKit
10 |
11 | extension UIFont {
12 | static func regular(_ size: CGFloat) -> UIFont {
13 | UIFont(name: "HelveticaNeue", size: size)!
14 | }
15 | static func medium(_ size: CGFloat) -> UIFont {
16 | UIFont(name: "HelveticaNeue-Medium", size: size)!
17 | }
18 | static func bold(_ size: CGFloat) -> UIFont {
19 | UIFont(name: "HelveticaNeue-Bold", size: size)!
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Extensions/UIImage+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+Extensions.swift
3 | // iDonateAlert
4 | //
5 | // Created by Rashid Ramazanov on 10.02.2023.
6 | //
7 |
8 | import Foundation
9 | import UIKit
10 |
11 | extension UIImage {
12 | convenience init?(named: String, in bundle: Bundle = .module) {
13 | if #available(iOS 13.0, *) {
14 | self.init(named: named, in: bundle, compatibleWith: .current)
15 | } else {
16 | self.init(named: named, in: bundle, compatibleWith: nil)
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Localizer/Locale+Extension.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Locale+Extension.swift
3 | // Extensions
4 | //
5 | // Created by Rasid Ramazanov on 30.12.2020.
6 | // Copyright © 2020 Mobven. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension Locale {
12 | /// Turkish, tr_TR.
13 | static var tr = Locale(identifier: "tr_TR")
14 | /// English, en_US.
15 | static var en = Locale(identifier: "en_US")
16 | }
17 |
18 | public enum iDonateAlertLocale {
19 | case tr, en
20 |
21 | public var locale: Locale {
22 | switch self {
23 | case .tr: return Locale.tr
24 | case .en: return Locale.en
25 | }
26 | }
27 | }
28 |
29 | extension Locale {
30 | func code() -> String {
31 | String(languageCode?.prefix(2) ?? "tr")
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Localizer/Localizer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Localizer.swift
3 | // Localizer
4 | //
5 | // Created by Rashid Ramazanov on 29.12.2020.
6 | // Copyright © 2020 Mobven. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Singleton Localizer class.
12 | final class Localizer {
13 | /// Current Localizer instance.
14 | static let current = Localizer()
15 |
16 | var locale: Locale
17 |
18 | init() {
19 | if #available(iOS 13.0, *) {
20 | locale = Locale.current
21 | } else {
22 | locale = Localizer.getLanguage() == "en" ? .en : .tr
23 | }
24 | }
25 |
26 | static func getLanguage() -> String {
27 | if let currentLanguage = UserDefaults.standard.object(forKey: "CurrentLanguageKey") as? String {
28 | return currentLanguage
29 | }
30 | return defaultLanguage()
31 | }
32 |
33 | static func availableLanguages() -> [String] {
34 | var availableLanguages = Bundle.main.localizations
35 | // Removing "Base" from array
36 | if let indexOfBase = availableLanguages.firstIndex(of: "Base") {
37 | availableLanguages.remove(at: indexOfBase)
38 | }
39 | return availableLanguages
40 | }
41 |
42 | private static func defaultLanguage() -> String {
43 | var defaultLanguage = String()
44 | guard let preferredLanguage = Bundle.main.preferredLocalizations.first else {
45 | return "tr"
46 | }
47 | let availableLanguages: [String] = Localizer.availableLanguages()
48 | if availableLanguages.contains(preferredLanguage) {
49 | defaultLanguage = preferredLanguage
50 | } else {
51 | defaultLanguage = "tr"
52 | }
53 | return defaultLanguage
54 | }
55 | }
56 |
57 | /// Localization based string extension.
58 | extension String {
59 | /// Returns localized text with the current locale.
60 | var localized: String {
61 | let bundle = Bundle.module
62 | if let path = bundle.path(forResource: Localizer.current.locale.code(), ofType: "lproj"),
63 | let bundle = Bundle(path: path) {
64 | return bundle.localizedString(forKey: self, value: nil, table: nil)
65 | } else if let path = bundle.path(forResource: "Base", ofType: "lproj"),
66 | let bundle = Bundle(path: path) {
67 | return bundle.localizedString(forKey: self, value: nil, table: nil)
68 | }
69 | return self
70 | }
71 |
72 | /// Returns localizedUppercase text with the current locale.
73 | var localizedWithUppercase: String {
74 | localized.uppercased(with: Localizer.current.locale)
75 | }
76 |
77 | /// Returns localizedLowercase text with the current locale.
78 | var localizedWithLowercase: String {
79 | localized.lowercased(with: Localizer.current.locale)
80 | }
81 |
82 | /// Returns localizedCapitalized text with the current locale.
83 | var localizedWithCapitalization: String {
84 | localized.capitalized(with: Localizer.current.locale)
85 | }
86 |
87 | /// Returns localized text with the current locale.
88 | /// - parameter arguments: Arguments used for string formatting.
89 | /// Check String.init(format:arguments:) for details
90 | func localized(with arguments: String...) -> String {
91 | var string = localized
92 | for index in 0 ..< arguments.count {
93 | string = string.replacingOccurrences(of: "{\(index + 1)}", with: "%\(index + 1)$@")
94 | }
95 | return String(format: string, arguments: arguments)
96 | }
97 |
98 | func localizedPath(ofType ext: String?) -> String? {
99 | Bundle.module.path(forResource: self, ofType: ext)
100 | }
101 | }
102 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Resources/en.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | "alert_default_title" = "Make a Difference with Every Donation";
2 | "change_color_title" = "Every Donation";
3 | "alert_default_mesaage" = "Our app allows you to make a difference in the lives of those affected by the earthquakes on February 6, 2023. With just a few taps, you can donate to disaster relief efforts and provide aid to those in need.";
4 | "default_message_bold" = "February 6, 2023";
5 | "close" = "Dismiss ";
6 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/Resources/tr.lproj/Localizable.strings:
--------------------------------------------------------------------------------
1 | "alert_default_title" = "Her Bağışla Fark Yaratın";
2 | "change_color_title" = "Fark Yaratın";
3 | "alert_default_mesaage" = "Uygulamamız, 6 Şubat 2023 tarihinde yaşanan depremden etkilenenlerin hayatlarında bir fark yaratmanızı diliyor. Sadece birkaç dokunuşla afet yardımı çabalarına bağışta bulunabilir ve ihtiyacı olanlara yardım sağlayabilirsiniz.";
4 | "default_message_bold" = "6 Şubat 2023";
5 | "close" = "Kapat ";
6 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/iDonateAlert.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | Cabin-Bold
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | Uygulamamız, 6 Şubat 2023 tarihinde yaşanan ve 11 ilde etkisini hissettiren depremden etkilenenlerin hayatlarında bir fark yaratmanızı diliyor.
53 | Sadece birkaç dokunuşla afet yardımı çabalarına bağışta bulunabilir ve ihtiyacı olanlara
54 | yardım sağlayabilirsiniz.
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
--------------------------------------------------------------------------------
/Sources/iDonateAlert/iDonateAlert.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iDonateAlert.swift
3 | // iDonateAlert
4 | //
5 | // Created by Rashid Ramazanov on 10.02.2023.
6 | //
7 |
8 | import Foundation
9 | import UIKit
10 |
11 | public final class iDonateAlert {
12 | // swiftlint:disable nesting
13 | public struct Button {
14 | var title: String?
15 | var image: UIImage?
16 | var defaultTitleColor: UIColor?
17 | var url: URL
18 | var borderColor: UIColor?
19 | var backgroundColor: UIColor?
20 |
21 | /// Button initializer
22 | /// - Parameters:
23 | /// - title: Sets the text that appears on the button
24 | /// - image: If we want the image to appear on the button, we can set its asset
25 | /// - titleColor: To give color to the text that appears on the button
26 | /// - borderColor: It is used to give the border color to the button. Gets a value of type CGColor
27 | /// - backgroundColor: It is used to give a background color to the button
28 | /// - url: The Url to show on SafariViewController when the button is pressed.
29 | public init(
30 | title: String?,
31 | image: UIImage?,
32 | titleColor: UIColor? = .baseDonateTextColor,
33 | borderColor: UIColor? = .clear,
34 | backgroundColor: UIColor? = .clear,
35 | url: URL
36 | ) {
37 | self.title = title
38 | self.image = image
39 | defaultTitleColor = titleColor
40 | self.borderColor = borderColor
41 | self.backgroundColor = backgroundColor
42 | self.url = url
43 | }
44 | }
45 |
46 | // swiftlint:enable nesting
47 |
48 | var icon: UIImage?
49 | var title: String?
50 | var message: String?
51 | var titleFont: UIFont?
52 | var buttons: [Button] = []
53 | var attributedTitle: NSAttributedString?
54 | var attributedMessage: NSAttributedString?
55 |
56 | /// - Parameters:
57 | /// - locale: Locale of the alert.
58 | /// - icon: The Icon that is desired to appear on the screen. If no icon is entered initially, a custom icon will appear.
59 | /// - title: It is the title that appears on the homepage. It cannot be nil.
60 | /// - message: The message to be displayed on the screen is defined here.
61 | /// - titleFont: To set the font. If it is nil, system font will be used.
62 | public init(
63 | locale: iDonateAlertLocale = .tr,
64 | icon: UIImage? = nil,
65 | title: String,
66 | message: String,
67 | titleFont: UIFont? = nil
68 | ) {
69 | Localizer.current.locale = locale.locale
70 | self.icon = icon ?? UIImage(named: "heart", in: .module)
71 | self.title = title
72 | self.message = message
73 | self.titleFont = titleFont
74 | self.buttons = [.ahbap, .afad, .kizilay]
75 | }
76 |
77 | /// With this initializer, only icon and text can be inited
78 | /// - Parameters:
79 | /// - locale: Locale of the alert.
80 | /// - icon: The Icon that is desired to appear on the screen is defined. If no icon is entered initially, a custom icon will appear.
81 | /// - attributedTitle: to add attribution to the title that appears on the screen
82 | /// - attributedMessage: to add attributes to the message that appears on the screen
83 | public init(
84 | locale: iDonateAlertLocale = .tr,
85 | icon: UIImage? = nil,
86 | attributedTitle: NSAttributedString? = nil,
87 | attributedMessage: NSAttributedString? = nil
88 | ) {
89 | Localizer.current.locale = locale.locale
90 | self.icon = icon ?? UIImage(named: "heart", in: .module)
91 | self.attributedTitle = attributedTitle ?? defaultAttributedTitle()
92 | self.attributedMessage = attributedMessage ?? defaultAttributedMessage()
93 | self.buttons = [.ahbap, .afad, .kizilay]
94 | }
95 |
96 | ///Deletes all buttons on the screen
97 | public func removeAllActions() {
98 | buttons.removeAll()
99 | }
100 |
101 | /// Adds button to the screen
102 | public func addAction(_ button: Button) {
103 | buttons.append(button)
104 | }
105 |
106 | /// Present IDonate alert.
107 | /// - Parameters:
108 | /// - viewController: The controller present IDonate over.
109 | /// - animated: Pass true to animate the presentation; otherwise, pass false.
110 | /// - completion: The block to execute after the presentation finishes. This block has no return value and takes no parameters. You may specify nil for this parameter.
111 | public func present(over viewController: UIViewController, animated: Bool = true, completion: (() -> Void)? = nil) {
112 | guard let controller = UIStoryboard(name: "iDonateAlert", bundle: .module)
113 | .instantiateInitialViewController() as? AlertViewController else {
114 | fatalError("AlertViewController could not be initialized")
115 | }
116 | controller.alertIcon = icon
117 | controller.alertTitle = title
118 | controller.alertMessage = message
119 | controller.titleFont = titleFont
120 | controller.alertButtons = buttons
121 | controller.attributedTitle = attributedTitle
122 | controller.attributedMessage = attributedMessage
123 | controller.modalPresentationStyle = .overFullScreen
124 | controller.modalTransitionStyle = .crossDissolve
125 | viewController.present(controller, animated: animated, completion: completion)
126 | }
127 |
128 | private func defaultAttributedTitle() -> NSAttributedString {
129 | let defaultMessage = "alert_default_title".localized
130 | let mutableAttributedString = NSMutableAttributedString(string: defaultMessage)
131 | let range = (defaultMessage as NSString).range(of: "change_color_title".localized)
132 |
133 | mutableAttributedString.addAttributes(
134 | [NSAttributedString.Key.font: UIFont.regular(24)],
135 | range: NSRange(location: 0, length: mutableAttributedString.string.count)
136 | )
137 |
138 | mutableAttributedString.addAttributes(
139 | [
140 | NSAttributedString.Key.foregroundColor: UIColor.baseDonateTextColor,
141 | NSAttributedString.Key.font: UIFont.bold(24)
142 | ],
143 | range: range
144 | )
145 |
146 | return mutableAttributedString
147 | }
148 |
149 | private func defaultAttributedMessage() -> NSAttributedString {
150 | let defaultMessage = "alert_default_mesaage".localized
151 | let mutableAttributedString = NSMutableAttributedString(
152 | string: defaultMessage, attributes: [
153 | NSAttributedString.Key.font: UIFont.regular(13)
154 | ]
155 | )
156 | let range = (defaultMessage as NSString).range(of: "default_message_bold".localized)
157 |
158 | mutableAttributedString.addAttribute(
159 | NSAttributedString.Key.font,
160 | value: UIFont.bold(13),
161 | range: range
162 | )
163 |
164 | return mutableAttributedString
165 | }
166 | }
167 |
168 | public extension iDonateAlert.Button {
169 | static var ahbap: Self {
170 | .init(title: nil, image: UIImage(named: "ahbap", in: .module), borderColor: .ahbapGreen, backgroundColor: .ahbapButtonBackgroundColor, url: URL(string: "https://ahbap.org/bagisci-ol")!)
171 | }
172 |
173 | static var afad: Self {
174 | .init(title: nil, image: UIImage(named: "afad", in: .module), borderColor: .afadBlue, backgroundColor: .afadButtonBackgroundColor, url: URL(string: "https://www.afad.gov.tr/depremkampanyasi2")!)
175 | }
176 |
177 | static var kizilay: Self {
178 | .init(title: nil, image: UIImage(named: "kizilay", in: .module), borderColor: .kızılayRed, backgroundColor: .kızılayBackgroundColor, url: URL(string: "https://www.kizilay.org.tr/bagis")!)
179 | }
180 | }
181 |
--------------------------------------------------------------------------------
/Tests/iDonateAlertTests/iDonateAlertTests.swift:
--------------------------------------------------------------------------------
1 | import XCTest
2 | @testable import iDonateAlert
3 |
4 | final class iDonateAlertTests: XCTestCase {
5 | func testExample() throws {
6 | // This is an example of a functional test case.
7 | // Use XCTAssert and related functions to verify your tests produce the correct
8 | // results.
9 | XCTAssertEqual(iDonateAlert().text, "Hello, World!")
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/iDonateAlertSample.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 56;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1918C0BB2996AAA500074098 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1918C0BA2996AAA500074098 /* AppDelegate.swift */; };
11 | 1918C0BD2996AAA500074098 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1918C0BC2996AAA500074098 /* SceneDelegate.swift */; };
12 | 1918C0BF2996AAA500074098 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1918C0BE2996AAA500074098 /* MainViewController.swift */; };
13 | 1918C0C22996AAA500074098 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1918C0C02996AAA500074098 /* Main.storyboard */; };
14 | 1918C0C42996AAA500074098 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1918C0C32996AAA500074098 /* Assets.xcassets */; };
15 | 1918C0C72996AAA500074098 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1918C0C52996AAA500074098 /* LaunchScreen.storyboard */; };
16 | 1918C0D22996ABA400074098 /* iDonateAlert in Frameworks */ = {isa = PBXBuildFile; productRef = 1918C0D12996ABA400074098 /* iDonateAlert */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXFileReference section */
20 | 1918C0B72996AAA500074098 /* iDonateAlertSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iDonateAlertSample.app; sourceTree = BUILT_PRODUCTS_DIR; };
21 | 1918C0BA2996AAA500074098 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
22 | 1918C0BC2996AAA500074098 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; };
23 | 1918C0BE2996AAA500074098 /* MainViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = ""; };
24 | 1918C0C12996AAA500074098 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
25 | 1918C0C32996AAA500074098 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
26 | 1918C0C62996AAA500074098 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
27 | 1918C0C82996AAA500074098 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
28 | 19859C8B2996B0D60001A0E2 /* */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = ""; sourceTree = ""; };
29 | /* End PBXFileReference section */
30 |
31 | /* Begin PBXFrameworksBuildPhase section */
32 | 1918C0B42996AAA500074098 /* Frameworks */ = {
33 | isa = PBXFrameworksBuildPhase;
34 | buildActionMask = 2147483647;
35 | files = (
36 | 1918C0D22996ABA400074098 /* iDonateAlert in Frameworks */,
37 | );
38 | runOnlyForDeploymentPostprocessing = 0;
39 | };
40 | /* End PBXFrameworksBuildPhase section */
41 |
42 | /* Begin PBXGroup section */
43 | 1918C0AE2996AAA500074098 = {
44 | isa = PBXGroup;
45 | children = (
46 | 19859C8B2996B0D60001A0E2 /* */,
47 | 1918C0B92996AAA500074098 /* iDonateAlertSample */,
48 | 1918C0B82996AAA500074098 /* Products */,
49 | 1918C0D02996ABA400074098 /* Frameworks */,
50 | );
51 | sourceTree = "";
52 | };
53 | 1918C0B82996AAA500074098 /* Products */ = {
54 | isa = PBXGroup;
55 | children = (
56 | 1918C0B72996AAA500074098 /* iDonateAlertSample.app */,
57 | );
58 | name = Products;
59 | sourceTree = "";
60 | };
61 | 1918C0B92996AAA500074098 /* iDonateAlertSample */ = {
62 | isa = PBXGroup;
63 | children = (
64 | 1918C0BA2996AAA500074098 /* AppDelegate.swift */,
65 | 1918C0BC2996AAA500074098 /* SceneDelegate.swift */,
66 | 1918C0BE2996AAA500074098 /* MainViewController.swift */,
67 | 1918C0C02996AAA500074098 /* Main.storyboard */,
68 | 1918C0C32996AAA500074098 /* Assets.xcassets */,
69 | 1918C0C52996AAA500074098 /* LaunchScreen.storyboard */,
70 | 1918C0C82996AAA500074098 /* Info.plist */,
71 | );
72 | path = iDonateAlertSample;
73 | sourceTree = "";
74 | };
75 | 1918C0D02996ABA400074098 /* Frameworks */ = {
76 | isa = PBXGroup;
77 | children = (
78 | );
79 | name = Frameworks;
80 | sourceTree = "";
81 | };
82 | /* End PBXGroup section */
83 |
84 | /* Begin PBXNativeTarget section */
85 | 1918C0B62996AAA500074098 /* iDonateAlertSample */ = {
86 | isa = PBXNativeTarget;
87 | buildConfigurationList = 1918C0CB2996AAA500074098 /* Build configuration list for PBXNativeTarget "iDonateAlertSample" */;
88 | buildPhases = (
89 | 1918C0B32996AAA500074098 /* Sources */,
90 | 1918C0B42996AAA500074098 /* Frameworks */,
91 | 1918C0B52996AAA500074098 /* Resources */,
92 | );
93 | buildRules = (
94 | );
95 | dependencies = (
96 | );
97 | name = iDonateAlertSample;
98 | packageProductDependencies = (
99 | 1918C0D12996ABA400074098 /* iDonateAlert */,
100 | );
101 | productName = iDonateAlertSample;
102 | productReference = 1918C0B72996AAA500074098 /* iDonateAlertSample.app */;
103 | productType = "com.apple.product-type.application";
104 | };
105 | /* End PBXNativeTarget section */
106 |
107 | /* Begin PBXProject section */
108 | 1918C0AF2996AAA500074098 /* Project object */ = {
109 | isa = PBXProject;
110 | attributes = {
111 | BuildIndependentTargetsInParallel = 1;
112 | LastSwiftUpdateCheck = 1420;
113 | LastUpgradeCheck = 1420;
114 | TargetAttributes = {
115 | 1918C0B62996AAA500074098 = {
116 | CreatedOnToolsVersion = 14.2;
117 | };
118 | };
119 | };
120 | buildConfigurationList = 1918C0B22996AAA500074098 /* Build configuration list for PBXProject "iDonateAlertSample" */;
121 | compatibilityVersion = "Xcode 14.0";
122 | developmentRegion = en;
123 | hasScannedForEncodings = 0;
124 | knownRegions = (
125 | en,
126 | Base,
127 | );
128 | mainGroup = 1918C0AE2996AAA500074098;
129 | productRefGroup = 1918C0B82996AAA500074098 /* Products */;
130 | projectDirPath = "";
131 | projectRoot = "";
132 | targets = (
133 | 1918C0B62996AAA500074098 /* iDonateAlertSample */,
134 | );
135 | };
136 | /* End PBXProject section */
137 |
138 | /* Begin PBXResourcesBuildPhase section */
139 | 1918C0B52996AAA500074098 /* Resources */ = {
140 | isa = PBXResourcesBuildPhase;
141 | buildActionMask = 2147483647;
142 | files = (
143 | 1918C0C72996AAA500074098 /* LaunchScreen.storyboard in Resources */,
144 | 1918C0C42996AAA500074098 /* Assets.xcassets in Resources */,
145 | 1918C0C22996AAA500074098 /* Main.storyboard in Resources */,
146 | );
147 | runOnlyForDeploymentPostprocessing = 0;
148 | };
149 | /* End PBXResourcesBuildPhase section */
150 |
151 | /* Begin PBXSourcesBuildPhase section */
152 | 1918C0B32996AAA500074098 /* Sources */ = {
153 | isa = PBXSourcesBuildPhase;
154 | buildActionMask = 2147483647;
155 | files = (
156 | 1918C0BF2996AAA500074098 /* MainViewController.swift in Sources */,
157 | 1918C0BB2996AAA500074098 /* AppDelegate.swift in Sources */,
158 | 1918C0BD2996AAA500074098 /* SceneDelegate.swift in Sources */,
159 | );
160 | runOnlyForDeploymentPostprocessing = 0;
161 | };
162 | /* End PBXSourcesBuildPhase section */
163 |
164 | /* Begin PBXVariantGroup section */
165 | 1918C0C02996AAA500074098 /* Main.storyboard */ = {
166 | isa = PBXVariantGroup;
167 | children = (
168 | 1918C0C12996AAA500074098 /* Base */,
169 | );
170 | name = Main.storyboard;
171 | sourceTree = "";
172 | };
173 | 1918C0C52996AAA500074098 /* LaunchScreen.storyboard */ = {
174 | isa = PBXVariantGroup;
175 | children = (
176 | 1918C0C62996AAA500074098 /* Base */,
177 | );
178 | name = LaunchScreen.storyboard;
179 | sourceTree = "";
180 | };
181 | /* End PBXVariantGroup section */
182 |
183 | /* Begin XCBuildConfiguration section */
184 | 1918C0C92996AAA500074098 /* Debug */ = {
185 | isa = XCBuildConfiguration;
186 | buildSettings = {
187 | ALWAYS_SEARCH_USER_PATHS = NO;
188 | CLANG_ANALYZER_NONNULL = YES;
189 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
190 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
191 | CLANG_ENABLE_MODULES = YES;
192 | CLANG_ENABLE_OBJC_ARC = YES;
193 | CLANG_ENABLE_OBJC_WEAK = YES;
194 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
195 | CLANG_WARN_BOOL_CONVERSION = YES;
196 | CLANG_WARN_COMMA = YES;
197 | CLANG_WARN_CONSTANT_CONVERSION = YES;
198 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
199 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
200 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
201 | CLANG_WARN_EMPTY_BODY = YES;
202 | CLANG_WARN_ENUM_CONVERSION = YES;
203 | CLANG_WARN_INFINITE_RECURSION = YES;
204 | CLANG_WARN_INT_CONVERSION = YES;
205 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
206 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
207 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
208 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
209 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
210 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
211 | CLANG_WARN_STRICT_PROTOTYPES = YES;
212 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
213 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
214 | CLANG_WARN_UNREACHABLE_CODE = YES;
215 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
216 | COPY_PHASE_STRIP = NO;
217 | DEBUG_INFORMATION_FORMAT = dwarf;
218 | ENABLE_STRICT_OBJC_MSGSEND = YES;
219 | ENABLE_TESTABILITY = YES;
220 | GCC_C_LANGUAGE_STANDARD = gnu11;
221 | GCC_DYNAMIC_NO_PIC = NO;
222 | GCC_NO_COMMON_BLOCKS = YES;
223 | GCC_OPTIMIZATION_LEVEL = 0;
224 | GCC_PREPROCESSOR_DEFINITIONS = (
225 | "DEBUG=1",
226 | "$(inherited)",
227 | );
228 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
229 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
230 | GCC_WARN_UNDECLARED_SELECTOR = YES;
231 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
232 | GCC_WARN_UNUSED_FUNCTION = YES;
233 | GCC_WARN_UNUSED_VARIABLE = YES;
234 | IPHONEOS_DEPLOYMENT_TARGET = 16.2;
235 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
236 | MTL_FAST_MATH = YES;
237 | ONLY_ACTIVE_ARCH = YES;
238 | SDKROOT = iphoneos;
239 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
240 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
241 | };
242 | name = Debug;
243 | };
244 | 1918C0CA2996AAA500074098 /* Release */ = {
245 | isa = XCBuildConfiguration;
246 | buildSettings = {
247 | ALWAYS_SEARCH_USER_PATHS = NO;
248 | CLANG_ANALYZER_NONNULL = YES;
249 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
250 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
251 | CLANG_ENABLE_MODULES = YES;
252 | CLANG_ENABLE_OBJC_ARC = YES;
253 | CLANG_ENABLE_OBJC_WEAK = YES;
254 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
255 | CLANG_WARN_BOOL_CONVERSION = YES;
256 | CLANG_WARN_COMMA = YES;
257 | CLANG_WARN_CONSTANT_CONVERSION = YES;
258 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
259 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
260 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
261 | CLANG_WARN_EMPTY_BODY = YES;
262 | CLANG_WARN_ENUM_CONVERSION = YES;
263 | CLANG_WARN_INFINITE_RECURSION = YES;
264 | CLANG_WARN_INT_CONVERSION = YES;
265 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
266 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
267 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
268 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
269 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
270 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
271 | CLANG_WARN_STRICT_PROTOTYPES = YES;
272 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
273 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
274 | CLANG_WARN_UNREACHABLE_CODE = YES;
275 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
276 | COPY_PHASE_STRIP = NO;
277 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
278 | ENABLE_NS_ASSERTIONS = NO;
279 | ENABLE_STRICT_OBJC_MSGSEND = YES;
280 | GCC_C_LANGUAGE_STANDARD = gnu11;
281 | GCC_NO_COMMON_BLOCKS = YES;
282 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
283 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
284 | GCC_WARN_UNDECLARED_SELECTOR = YES;
285 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
286 | GCC_WARN_UNUSED_FUNCTION = YES;
287 | GCC_WARN_UNUSED_VARIABLE = YES;
288 | IPHONEOS_DEPLOYMENT_TARGET = 16.2;
289 | MTL_ENABLE_DEBUG_INFO = NO;
290 | MTL_FAST_MATH = YES;
291 | SDKROOT = iphoneos;
292 | SWIFT_COMPILATION_MODE = wholemodule;
293 | SWIFT_OPTIMIZATION_LEVEL = "-O";
294 | VALIDATE_PRODUCT = YES;
295 | };
296 | name = Release;
297 | };
298 | 1918C0CC2996AAA500074098 /* Debug */ = {
299 | isa = XCBuildConfiguration;
300 | buildSettings = {
301 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
302 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
303 | CODE_SIGN_STYLE = Automatic;
304 | CURRENT_PROJECT_VERSION = 1;
305 | DEVELOPMENT_TEAM = A2X4D6G99N;
306 | GENERATE_INFOPLIST_FILE = YES;
307 | INFOPLIST_FILE = iDonateAlertSample/Info.plist;
308 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
309 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
310 | INFOPLIST_KEY_UIMainStoryboardFile = Main;
311 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
312 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
313 | LD_RUNPATH_SEARCH_PATHS = (
314 | "$(inherited)",
315 | "@executable_path/Frameworks",
316 | );
317 | MARKETING_VERSION = 1.0;
318 | PRODUCT_BUNDLE_IDENTIFIER = com.mobven.ios.iDonateAlertSample;
319 | PRODUCT_NAME = "$(TARGET_NAME)";
320 | SWIFT_EMIT_LOC_STRINGS = YES;
321 | SWIFT_VERSION = 5.0;
322 | TARGETED_DEVICE_FAMILY = "1,2";
323 | };
324 | name = Debug;
325 | };
326 | 1918C0CD2996AAA500074098 /* Release */ = {
327 | isa = XCBuildConfiguration;
328 | buildSettings = {
329 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
330 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
331 | CODE_SIGN_STYLE = Automatic;
332 | CURRENT_PROJECT_VERSION = 1;
333 | DEVELOPMENT_TEAM = A2X4D6G99N;
334 | GENERATE_INFOPLIST_FILE = YES;
335 | INFOPLIST_FILE = iDonateAlertSample/Info.plist;
336 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
337 | INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen;
338 | INFOPLIST_KEY_UIMainStoryboardFile = Main;
339 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
340 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
341 | LD_RUNPATH_SEARCH_PATHS = (
342 | "$(inherited)",
343 | "@executable_path/Frameworks",
344 | );
345 | MARKETING_VERSION = 1.0;
346 | PRODUCT_BUNDLE_IDENTIFIER = com.mobven.ios.iDonateAlertSample;
347 | PRODUCT_NAME = "$(TARGET_NAME)";
348 | SWIFT_EMIT_LOC_STRINGS = YES;
349 | SWIFT_VERSION = 5.0;
350 | TARGETED_DEVICE_FAMILY = "1,2";
351 | };
352 | name = Release;
353 | };
354 | /* End XCBuildConfiguration section */
355 |
356 | /* Begin XCConfigurationList section */
357 | 1918C0B22996AAA500074098 /* Build configuration list for PBXProject "iDonateAlertSample" */ = {
358 | isa = XCConfigurationList;
359 | buildConfigurations = (
360 | 1918C0C92996AAA500074098 /* Debug */,
361 | 1918C0CA2996AAA500074098 /* Release */,
362 | );
363 | defaultConfigurationIsVisible = 0;
364 | defaultConfigurationName = Release;
365 | };
366 | 1918C0CB2996AAA500074098 /* Build configuration list for PBXNativeTarget "iDonateAlertSample" */ = {
367 | isa = XCConfigurationList;
368 | buildConfigurations = (
369 | 1918C0CC2996AAA500074098 /* Debug */,
370 | 1918C0CD2996AAA500074098 /* Release */,
371 | );
372 | defaultConfigurationIsVisible = 0;
373 | defaultConfigurationName = Release;
374 | };
375 | /* End XCConfigurationList section */
376 |
377 | /* Begin XCSwiftPackageProductDependency section */
378 | 1918C0D12996ABA400074098 /* iDonateAlert */ = {
379 | isa = XCSwiftPackageProductDependency;
380 | productName = iDonateAlert;
381 | };
382 | /* End XCSwiftPackageProductDependency section */
383 | };
384 | rootObject = 1918C0AF2996AAA500074098 /* Project object */;
385 | }
386 |
--------------------------------------------------------------------------------
/iDonateAlertSample.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/iDonateAlertSample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/iDonateAlertSample/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // iDonateAlertSample
4 | //
5 | // Created by Rashid Ramazanov on 10.02.2023.
6 | //
7 |
8 | import UIKit
9 |
10 | @main
11 | class AppDelegate: UIResponder, UIApplicationDelegate {
12 |
13 |
14 |
15 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
16 | // Override point for customization after application launch.
17 | return true
18 | }
19 |
20 | // MARK: UISceneSession Lifecycle
21 |
22 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
23 | // Called when a new scene session is being created.
24 | // Use this method to select a configuration to create the new scene with.
25 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
26 | }
27 |
28 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) {
29 | // Called when the user discards a scene session.
30 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
31 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
32 | }
33 |
34 |
35 | }
36 |
37 |
--------------------------------------------------------------------------------
/iDonateAlertSample/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 |
--------------------------------------------------------------------------------
/iDonateAlertSample/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "author" : "xcode",
4 | "version" : 1
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/iDonateAlertSample/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 |
--------------------------------------------------------------------------------
/iDonateAlertSample/Base.lproj/Main.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 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/iDonateAlertSample/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIApplicationSceneManifest
6 |
7 | UIApplicationSupportsMultipleScenes
8 |
9 | UISceneConfigurations
10 |
11 | UIWindowSceneSessionRoleApplication
12 |
13 |
14 | UISceneConfigurationName
15 | Default Configuration
16 | UISceneDelegateClassName
17 | $(PRODUCT_MODULE_NAME).SceneDelegate
18 | UISceneStoryboardFile
19 | Main
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/iDonateAlertSample/MainViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MainViewController.swift
3 | // iDonateAlert
4 | //
5 | // Created by Furkan Eruçar on 10.02.2023.
6 | //
7 |
8 | import UIKit
9 | import iDonateAlert
10 |
11 | class MainViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | }
16 |
17 | @IBAction func presentDefault() {
18 | let alert = iDonateAlert(locale: .en)
19 | alert.present(over: self)
20 | }
21 |
22 | @IBAction func presentCustomButtons() {
23 | let alert = iDonateAlert()
24 | alert.removeAllActions()
25 | alert.addAction(.init(title: "INDIVIDUAL DONATION", image: nil, url: URL(string: "https://www.google.com")!))
26 | alert.present(over: self)
27 | }
28 |
29 | @IBAction func presentCustomTitle() {
30 | let alert = iDonateAlert(title: "Donate", message: "Donation lorem impsum...")
31 | alert.removeAllActions()
32 | alert.addAction(
33 | .init(
34 | title: "INDIVIDUAL DONATION", image: nil,
35 | borderColor: UIColor.systemPink, backgroundColor: UIColor.white,
36 | url: URL(string: "https://www.afad.gov.tr/depremkampanyasi2")!
37 | )
38 | )
39 | alert.present(over: self)
40 | }
41 |
42 | @IBAction func presentCustomAttributedTitle() {
43 | let attributedTitle = NSAttributedString(string: "Donate")
44 | let attributedMessage = NSAttributedString(string: "Donation lorem impsum...")
45 | let alert = iDonateAlert(attributedTitle: attributedTitle, attributedMessage: attributedMessage)
46 | alert.present(over: self)
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/iDonateAlertSample/SceneDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SceneDelegate.swift
3 | // iDonateAlertSample
4 | //
5 | // Created by Rashid Ramazanov on 10.02.2023.
6 | //
7 |
8 | import UIKit
9 |
10 | class SceneDelegate: UIResponder, UIWindowSceneDelegate {
11 |
12 | var window: UIWindow?
13 |
14 |
15 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
16 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
17 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
18 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
19 | guard let _ = (scene as? UIWindowScene) else { return }
20 | }
21 |
22 | func sceneDidDisconnect(_ scene: UIScene) {
23 | // Called as the scene is being released by the system.
24 | // This occurs shortly after the scene enters the background, or when its session is discarded.
25 | // Release any resources associated with this scene that can be re-created the next time the scene connects.
26 | // The scene may re-connect later, as its session was not necessarily discarded (see `application:didDiscardSceneSessions` instead).
27 | }
28 |
29 | func sceneDidBecomeActive(_ scene: UIScene) {
30 | // Called when the scene has moved from an inactive state to an active state.
31 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive.
32 | }
33 |
34 | func sceneWillResignActive(_ scene: UIScene) {
35 | // Called when the scene will move from an active state to an inactive state.
36 | // This may occur due to temporary interruptions (ex. an incoming phone call).
37 | }
38 |
39 | func sceneWillEnterForeground(_ scene: UIScene) {
40 | // Called as the scene transitions from the background to the foreground.
41 | // Use this method to undo the changes made on entering the background.
42 | }
43 |
44 | func sceneDidEnterBackground(_ scene: UIScene) {
45 | // Called as the scene transitions from the foreground to the background.
46 | // Use this method to save data, release shared resources, and store enough scene-specific state information
47 | // to restore the scene back to its current state.
48 | }
49 |
50 |
51 | }
52 |
53 |
--------------------------------------------------------------------------------
/iDonateAlertSample/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // iDonateAlertSample
4 | //
5 | // Created by Rashid Ramazanov on 10.02.2023.
6 | //
7 |
8 | import UIKit
9 | import iDonateAlert
10 |
11 | class ViewController: UIViewController {
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | // Do any additional setup after loading the view.
16 | }
17 |
18 | override func viewDidAppear(_ animated: Bool) {
19 | super.viewDidAppear(animated)
20 | }
21 |
22 | }
23 |
24 |
--------------------------------------------------------------------------------