I want to select an image from photos using new PHPickerViewController and I want to open PHPicker directly when my controller is load.
Like this

import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
// TODO: - Here I want PhotoPicker
}
}
you can call this method
openPHPicker()when ever you want to place your PHPicker.You can use this code also. for opening new PHPicker.
For More Knowledge about PHPicker in WWDC21 PHPicker WWDC20 Video and PHPicker WWDC21 Video
WWDC PHPicker Notes PHPicker Notes