gpt4 book ai didi

ios - ABNewPersonViewController imagePicker 方向和崩溃问题

转载 作者:行者123 更新时间:2023-11-29 03:46:17 25 4
gpt4 key购买 nike

我的 iPad 应用程序仅支持横向。我已经以模态方式呈现了 ABNewPersonViewController (在导航 Controller 中作为苹果文档的建议)并且处于景观中。

现在,

  1. 当我尝试“添加照片”时,imagePicker 会按照我的要求以 PORTRAIT 模式呈现。
  2. 添加照片后,点击图像会立即显示一个带有三个按钮的弹出窗口(- 选择照片、编辑照片、删除照片)。

Clicking the first two buttons crashes my app with following error message:

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <ABActionSheet: 0x9bbfde0; baseClass = UIActionSheet; frame = (0 0; 272 156); opaque = NO; animations = { opacity=<CABasicAnimation: 0xaa73d30>; }; layer = <CALayer: 0x9bd0370>> is associated with <_UIActionSheetHostingController: 0x9bb1000>. Clear this association before associating this view with <_UIActionSheetHostingController: 0xaa7a610>.'

对于一和二有什么解决方案吗?感谢和问候海雀

最佳答案

异常明确指出

“一个 View 一次最多只能与一个 View Controller 关联!”

您正在呈现一个 UIViewController ,并再次呈现一个 UIPopOverController 。单击 trieng 按钮的索引后,无法显示 Controller 。”

根据您的情况尝试使用 dismissViewController 方法。

关于ios - ABNewPersonViewController imagePicker 方向和崩溃问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17718319/

25 4 0
文章推荐: java - 克隆()不可见
文章推荐: java - 根据 javabean 值隐藏 '
'
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com