Skip to content

Instantly share code, notes, and snippets.

@soapyigu
Created March 17, 2018 04:53
Show Gist options
  • Save soapyigu/97ff8d627cd8788b6d673cc24b534f05 to your computer and use it in GitHub Desktop.
Save soapyigu/97ff8d627cd8788b6d673cc24b534f05 to your computer and use it in GitHub Desktop.
import UIKit
import MediaPlayer
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let volumeView = MPVolumeView(frame: CGRect(x: 100, y: 100, width: 100, height: 100))
volumeView.isHidden = false
volumeView.alpha = 0.01
view.addSubview(volumeView)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment