@@ -917,12 +917,31 @@ class CustomMediaPlayerViewController: UIViewController, UIGestureRecognizerDele
917917 }
918918
919919 private func createCircularBlurBackground( size: CGFloat ) -> UIView {
920- let blurEffect = UIBlurEffect ( style: . systemUltraThinMaterial )
920+ let blurEffect = UIBlurEffect ( style: . systemMaterial )
921921 let blurView = UIVisualEffectView ( effect: blurEffect)
922922 blurView. translatesAutoresizingMaskIntoConstraints = false
923923 blurView. layer. cornerRadius = size / 2
924924 blurView. clipsToBounds = true
925925
926+ let vibrancyEffect = UIVibrancyEffect ( blurEffect: blurEffect)
927+ let vibrancyView = UIVisualEffectView ( effect: vibrancyEffect)
928+ vibrancyView. frame = blurView. bounds
929+ vibrancyView. autoresizingMask = [ . flexibleWidth, . flexibleHeight]
930+ blurView. contentView. addSubview ( vibrancyView)
931+
932+ let tintView = UIView ( )
933+ tintView. backgroundColor = UIColor . white. withAlphaComponent ( 0.08 )
934+ tintView. layer. cornerRadius = size / 2
935+ tintView. clipsToBounds = true
936+ tintView. translatesAutoresizingMaskIntoConstraints = false
937+ vibrancyView. contentView. addSubview ( tintView)
938+ NSLayoutConstraint . activate ( [
939+ tintView. leadingAnchor. constraint ( equalTo: vibrancyView. contentView. leadingAnchor) ,
940+ tintView. trailingAnchor. constraint ( equalTo: vibrancyView. contentView. trailingAnchor) ,
941+ tintView. topAnchor. constraint ( equalTo: vibrancyView. contentView. topAnchor) ,
942+ tintView. bottomAnchor. constraint ( equalTo: vibrancyView. contentView. bottomAnchor)
943+ ] )
944+
926945 NSLayoutConstraint . activate ( [
927946 blurView. widthAnchor. constraint ( equalToConstant: size) ,
928947 blurView. heightAnchor. constraint ( equalToConstant: size)
0 commit comments