【发布时间】:2011-11-11 22:00:59
【问题描述】:
嗨,我对我在这里做错的事情束手无策。我正在使用 ios5,如果我不调用 presentPopoverFromBarButtonItem,没有任何崩溃。有没有人经历过类似的事情?我查了苹果开发者论坛,谷歌,堆栈溢出,什么都找不到。
在 gdb 上运行 bt 也没有显示任何提示。
UIViewController *viewTwo;
viewTwo = [[ViewTwo alloc] initWithNibName:@"ViewTwo" bundle:nil];
UIPopoverController *popover;
popover = [[UIPopoverController alloc] initWithContentViewController:viewTwo];
[popover presentPopoverFromRect:[theButton bounds]
inView:theButton
permittedArrowDirections:UIPopoverArrowDirectionLeft
animated:NO];
【问题讨论】:
-
取消变量是实际的条形按钮项吗? (即不是零)
-
我将代码更改为一个更易于阅读的示例,以防其他人遇到同样的问题。
标签: ios crash ios5 uipopovercontroller xcode4.2