Skip to content

Commit

Permalink
Replace deprecated AirPlay chooser with modern to fix light mode issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeehut committed Oct 31, 2021
1 parent c1e9ed2 commit a61e3fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions App/Sources/ScreenFlows/Settings/AudioVolumeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@

import AVKit
import UIKit
import MediaPlayer
import HandyUIKit

class AudioVolumeView: UIView {
private let currentPortLabel: UILabel
private let deviceChooserButton: MPVolumeView
private let deviceChooserButton: AVRoutePickerView

override init(
frame: CGRect
) {
deviceChooserButton = .init(frame: .init(x: 36, y: 0, width: 25, height: frame.height))
deviceChooserButton.showsVolumeSlider = false
deviceChooserButton.prioritizesVideoDevices = false

currentPortLabel = .init(frame: .init(size: frame.size))
currentPortLabel.textColor = .secondaryLabel
Expand All @@ -30,13 +29,6 @@ class AudioVolumeView: UIView {

updateCurrentPortLabel()
subscribeToRouteChangeNotification()

#if targetEnvironment(simulator)
let imageView = UIImageView(image: UIImage(systemName: "airplayvideo"))
imageView.contentMode = .scaleAspectFit
deviceChooserButton.addSubview(imageView)
imageView.bindEdgesToSuperview()
#endif
}

required init?(
Expand Down
4 changes: 2 additions & 2 deletions Prayer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 767S6EFMJ8;
INFOPLIST_FILE = "$(SRCROOT)/App/SupportingFiles/Info.plist";
Expand All @@ -1552,7 +1552,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = 767S6EFMJ8;
INFOPLIST_FILE = "$(SRCROOT)/App/SupportingFiles/Info.plist";
Expand Down

0 comments on commit a61e3fc

Please sign in to comment.