@@ -18,14 +18,18 @@ final class AlertView: UIView {
1818
1919 weak var delegate : AlertViewDelegate ?
2020
21- private let separatorColor : UIColor = UIColor . lightGray
22-
2321 // MARK: - Subviews
2422
2523 // MARK: Blur
2624
2725 private lazy var blurView : UIVisualEffectView = {
28- let blurEffect = UIBlurEffect ( style: . extraLight)
26+ let blurStyle : UIBlurEffect . Style
27+ if #available( iOS 13 , * ) {
28+ blurStyle = . systemMaterial
29+ } else {
30+ blurStyle = . extraLight
31+ }
32+ let blurEffect = UIBlurEffect ( style: blurStyle)
2933
3034 let effectView = UIVisualEffectView ( effect: blurEffect)
3135 effectView. translatesAutoresizingMaskIntoConstraints = false
@@ -80,9 +84,9 @@ final class AlertView: UIView {
8084 } ( )
8185
8286 private lazy var contentSeparatorView : UIView = {
83- let separatorView = UIView ( )
84- separatorView. backgroundColor = separatorColor
87+ let separatorView = SeparatorView ( )
8588 separatorView. translatesAutoresizingMaskIntoConstraints = false
89+ separatorView. axis = . horizontal
8690 return separatorView
8791 } ( )
8892
@@ -144,10 +148,6 @@ final class AlertView: UIView {
144148 actionsStackView. addArrangedSubview ( contentSeparatorView)
145149 actionsStackView. addArrangedSubview ( actionSequenceView)
146150
147- NSLayoutConstraint . activate ( [
148- contentSeparatorView. heightAnchor. constraint ( equalToConstant: Layout . separatorThickness)
149- ] )
150-
151151 [ titleLabel, messageLabel] . forEach {
152152 $0. setContentHuggingPriority ( . required, for: . vertical)
153153 $0. setContentCompressionResistancePriority ( . required, for: . vertical)
@@ -208,9 +208,7 @@ final class AlertView: UIView {
208208 if !viewModel. actions. isEmpty {
209209 let actionsViewModel = AlertActionSequenceViewModel (
210210 actions: viewModel. actions,
211- disabledTintColor: viewModel. disabledTintColor,
212- separatorColor: separatorColor,
213- separatorWidth: Layout . separatorThickness
211+ disabledTintColor: viewModel. disabledTintColor
214212 )
215213 actionSequenceView. setup ( viewModel: actionsViewModel)
216214 }
@@ -222,10 +220,6 @@ final class AlertView: UIView {
222220
223221 private enum Layout {
224222
225- static var separatorThickness : CGFloat {
226- return 1.0 / UIScreen. main. scale
227- }
228-
229223 enum Content {
230224 static let top : CGFloat = 20
231225 static let bottom : CGFloat = 20
0 commit comments