diff --git a/Assets/Application Icon.sketch b/Assets/Application Icon.sketch new file mode 100644 index 0000000..773e5b9 Binary files /dev/null and b/Assets/Application Icon.sketch differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/Contents.json b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/Contents.json index 9221b9b..4e4cb5b 100644 --- a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,91 +1,109 @@ { "images" : [ { + "filename" : "icon_20pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "20x20" }, { + "filename" : "icon_20pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "20x20" }, { + "filename" : "icon_29pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "29x29" }, { + "filename" : "icon_29pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "29x29" }, { + "filename" : "icon_40pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "40x40" }, { + "filename" : "icon_40pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "40x40" }, { + "filename" : "icon_60pt@2x.png", "idiom" : "iphone", "scale" : "2x", "size" : "60x60" }, { + "filename" : "icon_60pt@3x.png", "idiom" : "iphone", "scale" : "3x", "size" : "60x60" }, { + "filename" : "icon_20pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" }, { + "filename" : "icon_20pt@2x-1.png", "idiom" : "ipad", "scale" : "2x", "size" : "20x20" }, { + "filename" : "icon_29pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" }, { + "filename" : "icon_29pt@2x-1.png", "idiom" : "ipad", "scale" : "2x", "size" : "29x29" }, { + "filename" : "icon_40pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" }, { + "filename" : "icon_40pt@2x-1.png", "idiom" : "ipad", "scale" : "2x", "size" : "40x40" }, { + "filename" : "icon_76pt.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" }, { + "filename" : "icon_76pt@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "76x76" }, { + "filename" : "icon_83.5@2x.png", "idiom" : "ipad", "scale" : "2x", "size" : "83.5x83.5" }, { + "filename" : "Icon.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/Icon.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/Icon.png new file mode 100644 index 0000000..90bd7e8 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/Icon.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt.png new file mode 100644 index 0000000..ceb65da Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png new file mode 100644 index 0000000..f4cc95e Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png new file mode 100644 index 0000000..f4cc95e Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png new file mode 100644 index 0000000..dd4f9e1 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt.png new file mode 100644 index 0000000..8383524 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png new file mode 100644 index 0000000..0c7343d Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png new file mode 100644 index 0000000..0c7343d Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png new file mode 100644 index 0000000..bd7b9c9 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt.png new file mode 100644 index 0000000..f4cc95e Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png new file mode 100644 index 0000000..fa0d734 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png new file mode 100644 index 0000000..fa0d734 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png new file mode 100644 index 0000000..2895c58 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png new file mode 100644 index 0000000..2895c58 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png new file mode 100644 index 0000000..75fed76 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_76pt.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_76pt.png new file mode 100644 index 0000000..5d91dc1 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_76pt.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png new file mode 100644 index 0000000..21c46a4 Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png differ diff --git a/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png new file mode 100644 index 0000000..4a0723a Binary files /dev/null and b/Example iOS/App/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png differ diff --git a/Example iOS/Info.plist b/Example iOS/Info.plist index a8624ed..58e1ce4 100644 --- a/Example iOS/Info.plist +++ b/Example iOS/Info.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + SPAlert CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/SPAlert.xcodeproj/project.pbxproj b/SPAlert.xcodeproj/project.pbxproj index 174e9a5..bc7db5e 100644 --- a/SPAlert.xcodeproj/project.pbxproj +++ b/SPAlert.xcodeproj/project.pbxproj @@ -551,7 +551,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = G2NP4VYW5G; INFOPLIST_FILE = "Example iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -573,7 +573,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = ""; + DEVELOPMENT_TEAM = G2NP4VYW5G; INFOPLIST_FILE = "Example iOS/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/Sources/SPAlert/SPAlertView.swift b/Sources/SPAlert/SPAlertView.swift index a3593f0..93c05e4 100644 --- a/Sources/SPAlert/SPAlertView.swift +++ b/Sources/SPAlert/SPAlertView.swift @@ -61,6 +61,8 @@ open class SPAlertView: UIView { open var dismissByTap: Bool = true + open var completion: (() -> Void)? = nil + // MARK: - Initializers public init(title: String, message: String? = nil, preset: SPAlertIconPreset) { @@ -163,6 +165,8 @@ open class SPAlertView: UIView { // Prepare for present + self.completion = completion + let contentСolor = defaultContentColor titleLabel?.textColor = contentСolor subtitleLabel?.textColor = contentСolor @@ -174,6 +178,8 @@ open class SPAlertView: UIView { // Present + haptic.impact() + UIView.animate(withDuration: presentDismissDuration, animations: { self.alpha = 1 self.transform = CGAffineTransform.identity @@ -187,13 +193,13 @@ open class SPAlertView: UIView { }) } - @objc open func dismiss() { UIView.animate(withDuration: presentDismissDuration, animations: { self.alpha = 0 self.transform = self.transform.scaledBy(x: self.presentDismissScale, y: self.presentDismissScale) - }, completion: { finished in - self.removeFromSuperview() + }, completion: { [weak self] finished in + self?.removeFromSuperview() + self?.completion?() }) }