1

在一个项目中,我将 Three20 用于一些代码(不使用TTNavigator或一些高级功能,只有几件事)。

当我尝试创建一个UIActionSheet时,我得到一个EXC_BAD_ACCESS错误。触发它的代码如下(在 a 上UIViewController

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

    UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Is Anyone Injured?"
                                                             delegate:self
                                                    cancelButtonTitle:nil
                                               destructiveButtonTitle:nil
                                                    otherButtonTitles:nil];
    [actionSheet addButtonWithTitle:@"Cancel"];
    [actionSheet showInView:self.view];
}

一旦我运行这段代码,我就会得到一个EXC_BAD_ACCESS错误,并且堆栈指向调用的方法- (CGRect)frameWithKeyboardSubtracted:(CGFloat)plusHeight

在Three20's 里面UIViewAdditions.m

我注释掉了方法,然后得到了一个EXC_BAD_INSTRUCTION代替,但这次是在方法中调用- (NSDictionary *)userInfoForKeyboardNotification. 再次将其注释掉,现在在另一种方法中失败了UIViewAdditions.m

有没有人遇到过这个问题?我试过用 调试NSZombieEnabled,但这不是原因(没有消息发送到僵尸对象)。

4

1 回答 1

0

我通过检查每个 Three20 项目的“仅构建活动架构”复选框来解决。对于几个 Three20 相关的错误,这似乎是一个神奇的设置...... 替代文字

于 2010-09-15T22:23:31.247 回答