Using AVRoutePickerView, I'm able to do the Airplay programmatically upon tapping the Airplay icon. Now I want, on viewDidLoad it should initialize the AVRoutePickerView and even tap the airplay icon (no need to manually tap on icon).
Here's my small piece of code to display Airplay icon on UIView
let routePV = AVRoutePickerView(frame: CGRect(x: 30.0, y: 150.0, width: 30.0, height: 30.0)) routePV = UIColor.clear
self.view.addSubview(routePV)
I'm really not sure how to trigger tap on viewdidload ?
Thanks