如何通过编程iOS中使用新的phpickerviewController从照片中加载图像?
我想使用新的phpickerviewController
从照片中选择图像,并且我想直接打开phpickerviewcontroller
当我的控制器加载时。
像这样
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
// TODO: - Here I want PhotoPicker
}
}
I want to select an image from photos using new PHPickerViewController
and I want to open PHPickerViewController
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
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以在要放置phpicker时调用此方法
openphpicker()
。您也可以使用此代码。为了打开新 phpicker 。
有关wwdc21中的phpicker的更多了解, href =“ https://developer.apple.com/videos/play/wwdc2021/10046/” rel =“ noreferrer”> phpicker wwdc21视频
wwdc phpicker phpicker笔记.com/notes/wwdc20/10652/“ rel =“ noreferrer”> phpicker notes
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