ios - UIImagePickerController 未显示调试视图层次结构
问题描述
我创建并展示了一个 UIImagePickerController 并想看看它的构成。相反,我得到了这个:
为什么调试视图层次结构没有显示 UIImagePickerController 及其所有视图,而是只显示一个黑色视图?我可以在技术上为我自己的视图和视图控制器做同样的事情吗?
解决方案
答案是 RemoteView[1]。iOS 有另一个项目来显示 ViewController 并将其流式传输到您的应用程序。远程进程使用 CALayerHost[2] 进入当前应用程序的上下文。PoC 示例(虽然不使用 XPC)[3]
[1] https://oleb.net/blog/2012/10/remote-view-controllers-in-ios-6/。
[2] http://iphonedevwiki.net/index.php/CALayerHost。
[3] https://github.com/freerunnering/libremoteview
推荐阅读
- flutter - 如何在 Flutter 中创建树视图布局?
- .net-core - 如何在 EF Core 2.2 中为 Oracle 设置执行策略?
- r - 使用名称列表中的调查包制作的标签表
- css - Bootstrap 4 在尊重列和行的同时垂直对齐页脚
- css - Python 使用 Selenium 查找元素
- firemonkey - 使用 goto 有什么问题?
- python - Raspberry Pi 4 上的 OpenCV 导入不起作用
- linux - linux 容器中的 setcap cap_net_admin 阻止用户访问每个文件
- python - 为什么线程在heroku中停止?
- django - 带有SPA的Django REST - 什么结构