简体   繁体   English

退出UIActionSheet时崩溃

[英]Crash when dismissing UIActionSheet

I am facing a mysterious crash issue when running our app (64 bit complaint) inside another app. 在另一个应用程序中运行我们的应用程序(64位投诉)时,我面临着一个神秘的崩溃问题。 The crash happens within UIKit after UIActionSheet is dismissed. UIActionSheet被关闭后,崩溃发生在UIKit

Below is the sequence of actions I am performing: 以下是我执行的操作顺序:

  1. Tap on the action sheet button on right side of navigation bar. 点击导航栏右侧的操作表按钮。
  2. Tap on some action makes a server call. 点击某些操作即可发出服务器呼叫。
  3. Tap on the action sheet button again and then tap on Edit button to bring the table in edit mode. 再次点击动作表按钮,然后点击“编辑”按钮以使表格进入编辑模式。
  4. Table comes in Edit mode but application crashes. 表进入编辑模式,但应用程序崩溃。

Console Logs: 控制台日志:

2014-07-14 14:26:57.404 AppleEasyPay[677:60b] -[__NSCFType _canBecomeKeyWindow]: unrecognized selector sent to instance 0x15c6abb70

在此处输入图片说明

- (void)showDeleteRequestConfirmation:(id)iSender {
      self.actionSheet = [[UIActionSheet alloc] init];
      self.actionSheet.destructiveButtonIndex = 0;
      self.actionSheet.actionSheetStyle = UIActionSheetStyleBlackTranslucent;
      [self.actionSheet addButtonWithTitle:MyLocalized(kDeleteButtonKey)];
      [self.actionSheet addButtonWithTitle:MyLocalized(kCancelButtonKey)];
      self.actionSheet.title = MyLocalized(kDeleteConfirmationMessageKey);
      self.actionSheet.tag = kDeleteConfirmationActionSheet;
      self.actionSheet.delegate = self;
      [self.actionSheet showInView:self.tableView];
}


- (void)showCompleteRequestConfirmaton:(id)iSender {
    if (self.totalQuantityScanned < self.totalQuantityToBeScanned) {
        self.actionSheet = [[UIActionSheet alloc] init];
            self.actionSheet.cancelButtonIndex = 1;
            [self.actionSheet addButtonWithTitle:MyLocalized(kCompleteButtonKey)];
            [self.actionSheet addButtonWithTitle:MyLocalized(kCancelButtonKey)];
            self.actionSheet.title = MyLocalized(kCompleteRequestMessageKey);
            self.actionSheet.tag = kCompleteConfirmationActionSheet;
            self.actionSheet.delegate = self;
            [self.actionSheet showInView:self.tableView];
    } else {
        [self completeRequest:iSender];
    }
}

It was a mysteriously weird issue. 这是一个神秘而奇怪的问题。 I just put a strong property for my UIAlerView which I was showing on tap on my first action sheet and put that in the header file and it worked. 我只是为我的UIAlerView设置了一个强大的属性,将其显示在我的第一个操作表上,然后将其放在头文件中就可以了。 Putting the property in the extension was crashing it. 将属性放入扩展名会使它崩溃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM