Commit a6644a39 authored by DavidHuang's avatar DavidHuang

图片替换

parent 4804e939
...@@ -144,12 +144,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -144,12 +144,11 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
let vc = UIViewController.current ?? UIViewController() let vc = UIViewController.current ?? UIViewController()
if vc.isKind(of: YHLivePlayerViewController.self) { if vc.isKind(of: YHLivePlayerViewController.self) {
if let vc2 = vc as? YHLivePlayerViewController,vc2.canDoRotateFunc() { if let vc2 = vc as? YHLivePlayerViewController,vc2.canDoRotateFunc() {
print(" 可旋转") printLog(" 可旋转")
return [.portrait, .landscapeRight] return [.portrait, .landscapeRight]
} }
} }
printLog("不 可旋转")
print("不 可旋转")
return .portrait return .portrait
} }
......
...@@ -128,8 +128,8 @@ class YHLivePlayerViewController: YHBasePlayerViewController { ...@@ -128,8 +128,8 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
button.addTarget(self, action: #selector(playeButtonClicked), for: .touchUpInside) button.addTarget(self, action: #selector(playeButtonClicked), for: .touchUpInside)
return button return button
}() }()
// MARK: - Initialization // MARK: - Initialization
init(id: Int, url: String? = nil, title: String? = nil, roomId: String? = nil) { init(id: Int, url: String? = nil, title: String? = nil, roomId: String? = nil) {
liveId = id liveId = id
self.roomId = roomId self.roomId = roomId
...@@ -417,6 +417,7 @@ class YHLivePlayerViewController: YHBasePlayerViewController { ...@@ -417,6 +417,7 @@ class YHLivePlayerViewController: YHBasePlayerViewController {
//是否可旋转 //是否可旋转
func canDoRotateFunc() -> Bool { func canDoRotateFunc() -> Bool {
return true //直播暂停时有其他问题 先放开
if let model = viewModel.liveDetailModel { if let model = viewModel.liveDetailModel {
if model.status == 1 { if model.status == 1 {
if model.stream_status == 1 || model.stream_status == 2 { if model.stream_status == 1 || model.stream_status == 2 {
...@@ -962,12 +963,14 @@ extension YHLivePlayerViewController { ...@@ -962,12 +963,14 @@ extension YHLivePlayerViewController {
messageListStateButton.isHidden = false messageListStateButton.isHidden = false
closeButton.isHidden = false closeButton.isHidden = false
topBarView.isHidden = false topBarView.isHidden = false
self.playButton.setImage(UIImage(named: "live_play_interface_orientatio"), for: .normal)
} else { } else {
bottomInputBar.isHidden = true bottomInputBar.isHidden = true
messageListView.isHidden = true messageListView.isHidden = true
messageListStateButton.isHidden = true messageListStateButton.isHidden = true
closeButton.isHidden = true closeButton.isHidden = true
topBarView.isHidden = true topBarView.isHidden = true
self.playButton.setImage(UIImage(named: "live_play_interface_orientatio_up"), for: .normal)
} }
if #available(iOS 16.0, *) { if #available(iOS 16.0, *) {
...@@ -990,6 +993,7 @@ extension YHLivePlayerViewController { ...@@ -990,6 +993,7 @@ extension YHLivePlayerViewController {
messageListStateButton.isHidden = false messageListStateButton.isHidden = false
closeButton.isHidden = false closeButton.isHidden = false
topBarView.isHidden = false topBarView.isHidden = false
self.playButton.setImage(UIImage(named: "live_play_interface_orientatio"), for: .normal)
} }
func changeLandscape() { func changeLandscape() {
...@@ -1004,6 +1008,7 @@ extension YHLivePlayerViewController { ...@@ -1004,6 +1008,7 @@ extension YHLivePlayerViewController {
messageListStateButton.isHidden = true messageListStateButton.isHidden = true
closeButton.isHidden = true closeButton.isHidden = true
topBarView.isHidden = true topBarView.isHidden = true
self.playButton.setImage(UIImage(named: "live_play_interface_orientatio_up"), for: .normal)
} }
@objc func orientationDidChange() { @objc func orientationDidChange() {
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "横屏1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "横屏1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment