Compare commits
2 Commits
release/v2
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 61aa85463c | |||
| fe6ce3a91c |
@@ -138,10 +138,13 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate, Serv
|
||||
width: bodyBounds.width - visualizationFrame.width,
|
||||
height: bodyBounds.height
|
||||
)
|
||||
let audioHeight = min(
|
||||
let audioContentHeight = min(
|
||||
AudioSectionView.preferredHeight(forWidth: rightColumnFrame.width),
|
||||
bodyBounds.height * 0.22
|
||||
)
|
||||
let audioBottomInset = view.safeAreaInsets.bottom
|
||||
let audioHeight = audioContentHeight + audioBottomInset
|
||||
_audioSectionView.bottomContentInset = audioBottomInset
|
||||
_switchesController.view.frame = CGRect(
|
||||
x: rightColumnFrame.minX,
|
||||
y: rightColumnFrame.minY,
|
||||
@@ -164,6 +167,7 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate, Serv
|
||||
let switchesHeight = bodyBounds.height - audioHeight - lightsHeight - (sectionSpacing * 2.0)
|
||||
|
||||
_visualizationController.view.frame = .zero
|
||||
_audioSectionView.bottomContentInset = 0.0
|
||||
_switchesController.view.frame = CGRect(
|
||||
x: bodyBounds.minX,
|
||||
y: bodyBounds.minY,
|
||||
@@ -220,6 +224,11 @@ class MainViewController: UIViewController, SwitchesViewControllerDelegate, Serv
|
||||
return true
|
||||
}
|
||||
|
||||
override var prefersHomeIndicatorAutoHidden: Bool
|
||||
{
|
||||
return true
|
||||
}
|
||||
|
||||
// MARK: SwitchesViewControllerDelegate
|
||||
|
||||
func switchesViewControllerDidToggleDevices(_ controller: SwitchesViewController, devices: [AnyDevice])
|
||||
|
||||
@@ -8,6 +8,15 @@ import UIKit
|
||||
final class AudioSectionView: UIView
|
||||
{
|
||||
var mixerSettingsHandler: (() -> Void)?
|
||||
var bottomContentInset: CGFloat = 0.0
|
||||
{
|
||||
didSet
|
||||
{
|
||||
if oldValue != bottomContentInset {
|
||||
setNeedsLayout()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private let _label = UILabel(frame: .zero)
|
||||
private let _mixerSettingsButton = AudioActionButton(type: .custom)
|
||||
@@ -51,7 +60,10 @@ final class AudioSectionView: UIView
|
||||
x: 0.0,
|
||||
y: _label.frame.maxY + labelSpacing,
|
||||
width: bounds.width,
|
||||
height: max(0.0, bounds.height - _label.frame.height - labelSpacing)
|
||||
height: max(
|
||||
0.0,
|
||||
bounds.height - _label.frame.height - labelSpacing - bottomContentInset
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user