一直很动听 2015-11-04 13:09 采纳率: 0%
浏览 1990

iphone和pad适配的问题

请问一个问题,我在iphone上datepicker弹出来了但是在pad上就崩溃了白了如下的错误,是怎么回事?

2015-11-04 21:04:44.406 JSH[1421:491081] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Your application has presented a UIAlertController () of style UIAlertControllerStyleActionSheet. The modalPresentationStyle of a UIAlertController with this style is UIModalPresentationPopover. You must provide location information for this popover through the alert controller's popoverPresentationController. You must provide either a sourceView and sourceRect or a barButtonItem. If this information is not known when you present the alert controller, you may provide it in the UIPopoverPresentationControllerDelegate method -prepareForPopoverPresentation.'
*** First throw call stack:
(0x2303167b 0x34c16e17 0x279e11cd 0x27467b3f 0x27465a5f 0x273c60b9 0x273d19eb 0x27113ecd 0x22ff44c9 0x22ff27cd 0x22ff2bff 0x22f46119 0x22f45f05 0x2c0e3ac9 0x27188f15 0x3431a9 0x35385873)
libc++abi.dylib: terminating with uncaught exception of type NSException

  • 写回答

1条回答 默认 最新

  • mifit 2015-11-10 01:26
    关注

    你的app弹出一个UIAlerController,呈现模式UIModalPresentationPopover。你必须提供BarButtonItem。或者使用UIPopoverPresentationControllerDelegate代理的方法prepareForPopoverPresentation

    评论

报告相同问题?

悬赏问题

  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记