我正在尝试使用相机 API 拍照但是当我尝试使用
[self presentingViewController:picker animated: YES];
我不断收到错误消息:
'MainViewController' 没有可见的@interface 声明选择器'presentingViewController:animated:'
而且我似乎无法弄清楚如何解决它。
我正在尝试使用相机 API 拍照但是当我尝试使用
[self presentingViewController:picker animated: YES];
我不断收到错误消息:
'MainViewController' 没有可见的@interface 声明选择器'presentingViewController:animated:'
而且我似乎无法弄清楚如何解决它。
应该是[self presentModalViewController: picker animated: YES]
(现已弃用)
或者[self presentViewController:picker animated:YES completion: NULL];
查看UIViewController
类参考以获取更多详细信息
没有什么像@danielbeard 建议presentingViewController: animated:
的那样。presentModalViewController: animated:
presentingViewController
是一个只读属性,它讲述:
“呈现此视图控制器的视图控制器。(只读)”来自文档。