diff --git a/SPAlert.podspec b/SPAlert.podspec index bd6b44b..dda12ba 100644 --- a/SPAlert.podspec +++ b/SPAlert.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'SPAlert' - s.version = '5.0.0' + s.version = '5.0.1' s.summary = 'Native alert from Apple Music & Feedback. Contains Done, Heart & Message and other presets. Support SwiftUI.' s.homepage = 'https://github.com/sparrowcode/AlertKit' s.source = { :git => 'https://github.com/sparrowcode/AlertKit.git', :tag => s.version } @@ -9,7 +9,7 @@ Pod::Spec.new do |s| s.author = { 'Sparrow Code' => 'hello@sparrowcode.io' } s.swift_version = '5.1' - s.ios.deployment_target = '11.0' + s.ios.deployment_target = '13.0' s.source_files = 'Sources/AlertKit/**/*.swift' diff --git a/Sources/AlertKit/Views/AlertAppleMusic16View.swift b/Sources/AlertKit/Views/AlertAppleMusic16View.swift index 7b8450f..5b29abc 100644 --- a/Sources/AlertKit/Views/AlertAppleMusic16View.swift +++ b/Sources/AlertKit/Views/AlertAppleMusic16View.swift @@ -1,6 +1,6 @@ import UIKit -class AlertAppleMusic16View: UIView { +public class AlertAppleMusic16View: UIView { open var dismissByTap: Bool = true open var dismissInTime: Bool = true @@ -15,7 +15,7 @@ class AlertAppleMusic16View: UIView { fileprivate var presentDismissDuration: TimeInterval = 0.2 fileprivate var presentDismissScale: CGFloat = 0.8 - open var completion: (() -> Void)? = nil + var completion: (() -> Void)? = nil private lazy var backgroundView: UIVisualEffectView = { let view: UIVisualEffectView = { @@ -29,7 +29,7 @@ class AlertAppleMusic16View: UIView { return view }() - init(title: String?, subtitle: String?, icon: AlertIcon?) { + public init(title: String?, subtitle: String?, icon: AlertIcon?) { if let title = title { let label = UILabel() @@ -179,7 +179,7 @@ class AlertAppleMusic16View: UIView { private let layout: AlertLayout - override func layoutSubviews() { + public override func layoutSubviews() { super.layoutSubviews() backgroundView.frame = self.bounds @@ -205,7 +205,7 @@ class AlertAppleMusic16View: UIView { } } - override func sizeThatFits(_ size: CGSize) -> CGSize { + public override func sizeThatFits(_ size: CGSize) -> CGSize { let width: CGFloat = 250 self.frame = .init(x: frame.origin.x, y: frame.origin.y, width: width, height: frame.height) layoutSubviews() diff --git a/Sources/AlertKit/Views/AlertAppleMusic17View.swift b/Sources/AlertKit/Views/AlertAppleMusic17View.swift index 83677f2..50681ea 100644 --- a/Sources/AlertKit/Views/AlertAppleMusic17View.swift +++ b/Sources/AlertKit/Views/AlertAppleMusic17View.swift @@ -1,6 +1,6 @@ import UIKit -class AlertAppleMusic17View: UIView { +public class AlertAppleMusic17View: UIView { open var dismissByTap: Bool = true open var dismissInTime: Bool = true @@ -29,7 +29,7 @@ class AlertAppleMusic17View: UIView { return view }() - init(title: String?, subtitle: String?, icon: AlertIcon?) { + public init(title: String?, subtitle: String?, icon: AlertIcon?) { if let title = title { let label = UILabel() @@ -176,13 +176,13 @@ class AlertAppleMusic17View: UIView { }) } - override func layoutSubviews() { + public override func layoutSubviews() { super.layoutSubviews() backgroundView.frame = self.bounds layout(maxWidth: frame.width) } - override func sizeThatFits(_ size: CGSize) -> CGSize { + public override func sizeThatFits(_ size: CGSize) -> CGSize { layout(maxWidth: nil) let maxX = subviews.sorted(by: { $0.frame.maxX > $1.frame.maxX }).first?.frame.maxX ?? .zero