2014-02-19 1 views
2

스택은 다음과 같습니다.이 충돌을 해결하는 방법은 무엇입니까? iOS7에서만 존재하며 스택에 uitableview가있는 이유는 무엇입니까? UIAlertViewiOS7에서 UIAlertView 충돌 개인 메서드

0 libobjc.A.dylib objc_msgSend + 5 
1 UIKit -[UIAlertView(Private) modalItem:shouldDismissForButtonAtIndex:] + 62 
2 UIKit -[_UIModalItemsCoordinator _notifyDelegateModalItem:tappedButtonAtIndex:] + 94 
3 UIKit -[_UIModalItemAlertContentView tableView:didSelectRowAtIndexPath:] + 894 
4 UIKit -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1078 
5 UIKit -[UITableView _userSelectRowAtPendingSelectionIndexPath:] + 214 
6 UIKit _applyBlockToCFArrayCopiedToStack + 316 
7 UIKit _afterCACommitHandler + 430 
8 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20 

- (id)initWithIdentifier:(LTAlertMsgIdentifier)alertIdentifier 
       delegate:(id /*<UIAlertViewDelegate>*/)delegate 
     cancelButtonTitle:(NSString *)cancelButtonTitle 
     otherButtonTitles:(NSString *)otherButtonTitles, ... { 

    LTAlertMsgManager *sharedAlertMsgMgr = [LTAlertMsgManager shareAlertManageInstance]; 

    NSString *strMsg = [sharedAlertMsgMgr getLTAlertMsgByAlertID:alertIdentifier]; 
    if ([NSString isBlankString:strMsg]){ 
     // alert is invalid, if alert message is empty 
     return nil; 
    } 

    NSString *strTitle = [sharedAlertMsgMgr getLTAlertTitleByAlertID:alertIdentifier]; 
    if (self = [super initWithTitle:([NSString isBlankString:strTitle] ? nil : strTitle) 
          message:strMsg 
          delegate:delegate 
        cancelButtonTitle:cancelButtonTitle 
        otherButtonTitles:nil]){ 
     va_list args; 
     va_start(args, otherButtonTitles); 
     for (NSString *arg = otherButtonTitles; arg != nil; arg = va_arg(args, NSString*)) 
     { 
      [self addButtonWithTitle:arg]; 
     } 
     va_end(args); 
    } 

    NSLog(@"cancel button index - %d", self.cancelButtonIndex); 
    return self; 

} 
+0

표시하십시오. didSelectRowAtIndexPath : – Pfitz

+1

경고보기를 설명하십시오. 충돌 할 때 무엇을하고 계십니까? – Wain

+0

UIAlertView는 서브 클래 싱을위한 것이 아닙니다. – vikingosegundo

답변

2

버튼은 UITableView을 사용하여 구현된다. 그래서 버튼을 탭하면 tableView:didSelectRowAtIndexPath이 발생합니다. 이러한 오류의 원인이

일반적인 문제는 다음과 같습니다

  1. 경고
  2. 대표가 이미 해제 메인 스레드에서 표시되지 않습니다 (확인 경고 대리인이 경고의 전체 수명 어딘가에 보관되어 있는지 확인).
+0

모든 스택은 다음과 같습니다.이 문제점을 재현 할 수 없습니다. 그래서, 나는 그것을 추적하고 고칠 수 없다. 경고 관련 코드 만 검토하십시오. 감사! – user3327566

+0

@ user3327566 추가 한 코드는 okey입니다. 경고가 표시되는 방식과 그 대리인이 더 중요합니다. – Sulthan

0

iOS 7 bug or my bug in UIAlertView

UIAlertView의 위임이 @property(nonatomic, assign) id delegate이 발생한다, 그래서 대표가 dealloced 때 alertView.delegate = nil을 보장합니다.