新iPad导致presentPopoverFromRect上的EXC_BAD_ACCESS

时间:2012-04-07 21:38:16

标签: objective-c ios ipad

我的应用程序在为图像选择器呈现Popover时崩溃,但仅在新的iPad 3上崩溃。我认为它与新分辨率有关。

我提供Popover的代码:

[popoverController presentPopoverFromRect:[selectPhotoButton frame] inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

在iPad 1和iPad 2上运行良好,但是在新的iPad"中,我收到以下崩溃/消息:

Thread 1: EXC_BAD_ACCESS (code=2, address=0x24)

知道是什么原因引起的吗?我的App Store评分正在逐渐下降..

1 个答案:

答案 0 :(得分:1)

或者:

  • popover已取消分配,但指针未设置为nil
  • selectPhotoButton已取消分配,但指针未设置为nil
  • self.view已取消分配,但指针未设置为nil