我在我的应用中使用垂直位置的mpvolumeview。但现在我无法正确滑入滑块。它只适用于滑块的底部。
我添加MPVolumeView的代码:
volumeViewVertical = MPVolumeView(frame: CGRect(x: 60, y: -80, width: 140, height: 140))
volumeViewVertical.backgroundColor = .yellow
volumeViewVertical.setVolumeThumbImage(UIImage(named: "vc_slider_circle"), for: .normal)
volumeViewVertical.volumeSlider.minimumTrackTintColor = UIColor.white
volumeViewVertical.showsRouteButton = false
volumeViewVertical.transform = CGAffineTransform(rotationAngle: -CGFloat(M_PI_2))
sliderLayoutViewVertical?.addSubview(volumeViewVertical)
此致