Skip to content

Commit

Permalink
Updated access level for view classes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvorobei committed Jul 1, 2023
1 parent d360697 commit 1da133b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions SPAlert.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
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 }
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { 'Sparrow Code' => '[email protected]' }

s.swift_version = '5.1'
s.ios.deployment_target = '11.0'
s.ios.deployment_target = '13.0'

s.source_files = 'Sources/AlertKit/**/*.swift'

Expand Down
10 changes: 5 additions & 5 deletions Sources/AlertKit/Views/AlertAppleMusic16View.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit

class AlertAppleMusic16View: UIView {
public class AlertAppleMusic16View: UIView {

open var dismissByTap: Bool = true
open var dismissInTime: Bool = true
Expand All @@ -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 = {
Expand All @@ -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()
Expand Down Expand Up @@ -179,7 +179,7 @@ class AlertAppleMusic16View: UIView {

private let layout: AlertLayout

override func layoutSubviews() {
public override func layoutSubviews() {
super.layoutSubviews()
backgroundView.frame = self.bounds

Expand All @@ -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()
Expand Down
8 changes: 4 additions & 4 deletions Sources/AlertKit/Views/AlertAppleMusic17View.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UIKit

class AlertAppleMusic17View: UIView {
public class AlertAppleMusic17View: UIView {

open var dismissByTap: Bool = true
open var dismissInTime: Bool = true
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1da133b

Please sign in to comment.