mirror of
https://github.com/sparrowcode/AlertKit.git
synced 2026-06-16 12:44:37 +00:00
+2
-1
@@ -5,7 +5,8 @@ import PackageDescription
|
||||
let package = Package(
|
||||
name: "AlertKit",
|
||||
platforms: [
|
||||
.iOS(.v13)
|
||||
.iOS(.v13),
|
||||
.tvOS(.v13)
|
||||
],
|
||||
products: [
|
||||
.library(
|
||||
|
||||
@@ -10,6 +10,7 @@ Pod::Spec.new do |s|
|
||||
|
||||
s.swift_version = '5.1'
|
||||
s.ios.deployment_target = '13.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
|
||||
s.source_files = 'Sources/AlertKit/**/*.swift'
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ public enum AlertHaptic {
|
||||
case none
|
||||
|
||||
func impact() {
|
||||
#if os(iOS)
|
||||
let generator = UINotificationFeedbackGenerator()
|
||||
switch self {
|
||||
case .success:
|
||||
@@ -19,5 +20,6 @@ public enum AlertHaptic {
|
||||
case .none:
|
||||
break
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,11 +19,15 @@ public class AlertAppleMusic16View: UIView {
|
||||
|
||||
private lazy var backgroundView: UIVisualEffectView = {
|
||||
let view: UIVisualEffectView = {
|
||||
#if !os(tvOS)
|
||||
if #available(iOS 13.0, *) {
|
||||
return UIVisualEffectView(effect: UIBlurEffect(style: .systemThickMaterial))
|
||||
} else {
|
||||
return UIVisualEffectView(effect: UIBlurEffect(style: .light))
|
||||
}
|
||||
#else
|
||||
return UIVisualEffectView(effect: UIBlurEffect(style: .light))
|
||||
#endif
|
||||
}()
|
||||
view.isUserInteractionEnabled = false
|
||||
return view
|
||||
|
||||
@@ -19,11 +19,15 @@ public class AlertAppleMusic17View: UIView {
|
||||
|
||||
private lazy var backgroundView: UIVisualEffectView = {
|
||||
let view: UIVisualEffectView = {
|
||||
#if !os(tvOS)
|
||||
if #available(iOS 13.0, *) {
|
||||
return UIVisualEffectView(effect: UIBlurEffect(style: .systemThickMaterial))
|
||||
} else {
|
||||
return UIVisualEffectView(effect: UIBlurEffect(style: .light))
|
||||
}
|
||||
#else
|
||||
return UIVisualEffectView(effect: UIBlurEffect(style: .light))
|
||||
#endif
|
||||
}()
|
||||
view.isUserInteractionEnabled = false
|
||||
return view
|
||||
|
||||
Reference in New Issue
Block a user