Add blurred background to info panel
This commit is contained in:
parent
a8aefd186f
commit
77e6777b91
|
@ -11,7 +11,7 @@ import SwiftUI
|
||||||
|
|
||||||
class AudioViewController: UIViewController {
|
class AudioViewController: UIViewController {
|
||||||
|
|
||||||
var height : CGFloat = 400
|
var height : CGFloat = 420
|
||||||
|
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
|
|
|
@ -18,17 +18,36 @@ class InfoTabBarViewController: UITabBarController, UIGestureRecognizerDelegate
|
||||||
var tabBarHeight : CGFloat = 0
|
var tabBarHeight : CGFloat = 0
|
||||||
|
|
||||||
|
|
||||||
|
// override func viewWillAppear(_ animated: Bool) {
|
||||||
|
// tabBar.standardAppearance.backgroundColor = .clear
|
||||||
|
// tabBar.standardAppearance.backgroundImage = UIImage()
|
||||||
|
// tabBar.standardAppearance.backgroundEffect = .none
|
||||||
|
// tabBar.barTintColor = .clear
|
||||||
|
// for view in tabBar.subviews {
|
||||||
|
// print(view.description)
|
||||||
|
//// if view.description.contains("_UIBarBackground") {
|
||||||
|
////
|
||||||
|
//// view.removeFromSuperview()
|
||||||
|
//// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
mediaInfoController = MediaInfoViewController()
|
mediaInfoController = MediaInfoViewController()
|
||||||
audioViewController = AudioViewController()
|
audioViewController = AudioViewController()
|
||||||
subtitleViewController = SubtitlesViewController()
|
subtitleViewController = SubtitlesViewController()
|
||||||
|
|
||||||
tabBarHeight = tabBar.frame.size.height
|
|
||||||
|
|
||||||
|
|
||||||
viewControllers = [mediaInfoController!, audioViewController!, subtitleViewController!]
|
viewControllers = [mediaInfoController!, audioViewController!, subtitleViewController!]
|
||||||
|
|
||||||
|
tabBarHeight = tabBar.frame.size.height
|
||||||
|
|
||||||
|
tabBar.standardAppearance.backgroundColor = .clear
|
||||||
|
tabBar.standardAppearance.backgroundImage = UIImage()
|
||||||
|
tabBar.standardAppearance.backgroundEffect = .none
|
||||||
|
tabBar.barTintColor = .clear
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupInfoViews(mediaItem: BaseItemDto, subtitleTracks: [Subtitle], selectedSubtitleTrack : Int32, audioTracks: [AudioTrack], selectedAudioTrack: Int32, delegate: VideoPlayerSettingsDelegate) {
|
func setupInfoViews(mediaItem: BaseItemDto, subtitleTracks: [Subtitle], selectedSubtitleTrack : Int32, audioTracks: [AudioTrack], selectedAudioTrack: Int32, delegate: VideoPlayerSettingsDelegate) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ struct MediaInfoView: View {
|
||||||
|
|
||||||
}
|
}
|
||||||
.padding(.leading, 350)
|
.padding(.leading, 350)
|
||||||
.padding(.trailing, 200)
|
.padding(.trailing, 125)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
EmptyView()
|
EmptyView()
|
||||||
|
|
|
@ -11,7 +11,7 @@ import SwiftUI
|
||||||
|
|
||||||
class SubtitlesViewController: UIViewController {
|
class SubtitlesViewController: UIViewController {
|
||||||
|
|
||||||
var height : CGFloat = 400
|
var height : CGFloat = 420
|
||||||
|
|
||||||
|
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
|
|
|
@ -83,7 +83,6 @@
|
||||||
<containerView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lie-K8-LNT">
|
<containerView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="lie-K8-LNT">
|
||||||
<rect key="frame" x="88" y="57" width="1744" height="635"/>
|
<rect key="frame" x="88" y="57" width="1744" height="635"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<color key="backgroundColor" red="0.10195661340000001" green="0.1019650772" blue="0.1060298011" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
|
||||||
<connections>
|
<connections>
|
||||||
<segue destination="odZ-Ww-zvF" kind="embed" identifier="infoView" id="i7y-hI-hVh"/>
|
<segue destination="odZ-Ww-zvF" kind="embed" identifier="infoView" id="i7y-hI-hVh"/>
|
||||||
</connections>
|
</connections>
|
||||||
|
|
|
@ -124,6 +124,14 @@ class VideoPlayerViewController: UIViewController, VideoPlayerSettingsDelegate,
|
||||||
infoViewContainer.center = infoPanelHiddenPoint
|
infoViewContainer.center = infoPanelHiddenPoint
|
||||||
infoViewContainer.layer.cornerRadius = 40
|
infoViewContainer.layer.cornerRadius = 40
|
||||||
|
|
||||||
|
let blurEffectView = UIVisualEffectView(effect: UIBlurEffect(style: .regular))
|
||||||
|
blurEffectView.frame = infoViewContainer.bounds
|
||||||
|
blurEffectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||||
|
blurEffectView.layer.cornerRadius = 40
|
||||||
|
blurEffectView.clipsToBounds = true
|
||||||
|
infoViewContainer.addSubview(blurEffectView)
|
||||||
|
infoViewContainer.sendSubviewToBack(blurEffectView)
|
||||||
|
|
||||||
transportBarView.layer.cornerRadius = CGFloat(5)
|
transportBarView.layer.cornerRadius = CGFloat(5)
|
||||||
|
|
||||||
setupGestures()
|
setupGestures()
|
||||||
|
|
Loading…
Reference in New Issue