2012-12-02 4 views
1

내 응용 프로그램에 기본 UIAlertView을 적용하려고합니다 (스토리 보드를 사용 중입니다). 하지만 앱을 실행하면 앱의 로딩 화면에서 지연된 후 디버거 화면으로 이동합니다.응용 프로그램에 추가 할 때 UIAlertView가 충돌 함

내 .H :

#import <UIKit/UIKit.h> 
    @interface MindTripAnim :UIViewController { 
     IBOutlet UIImageView *animation; 
    } 

    - (IBAction)showMessage:(id)sender; 

    @end 

내하는 .m : 내가 잘못하고, 또는 왜 앱이 로딩 화면에서 실속 유지하고있는 무슨 확실하지 않다

#import "MindTripAnim.h" 
@interface MindTripAnim() 
@end 

@implementation MindTripAnim 

- (void)viewDidLoad { 
    animation.animationImages = [NSArray arrayWithObjects: 
          [UIImage imageNamed:@"trips1.png"], 
          [UIImage imageNamed:@"trips2.png"], 
          [UIImage imageNamed:@"trips3.png"], 
          [UIImage imageNamed:@"trips4.png"], 
          [UIImage imageNamed:@"trips5.png"],       
          [UIImage imageNamed:@"trips6.png"],nil]; 
    [animation setAnimationRepeatCount:0];  
    animation.animationDuration = 0.65; 
    [animation startAnimating]; 
} 

- (void)didReceiveMemoryWarning 
{ 
    [super didReceiveMemoryWarning]; 
    // Dispose of any resources that can be recreated. 
} 

- (IBAction)showMessage:(id)sender 
{ 
    UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Hello World!" message:@"This is your first UIAlertview message." delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil]; 
    [message show]; 
} 
@end 

, 도와주세요 ! 39 :

제가

2012년 12월 1일 19 디버거이 발견 03.428 MindTrip [3327 : 11303] '[앱 종료 * 인해 캐치되지 않는 예외'NSUnknownKeyException '이유에를 setValue : forUndefinedKey :] :이 클래스는 키 경고 값에 대해 키 값 코딩을 준수하지 않습니다. ' * 우선 투사 호출 스택 (0x1c9a012 0x10d7e7e 0x1d22fb1 0xb84711 0xb05ec8 0xb059b7 0xb30428 0x23c0cc 0x10eb663 0x1c9545a 0x23abcf 0xffe37 0x100418 0x100648 0x100882 0x4fa25 0x4fdbf 0x4ff55 0x58f67 0x1cfcc 0x1dfab 0x2f315 0x3024b 0x21cf8 0x1bf5df9 0x1bf5ad0 0x1c0fbf5 0x1c0f962 0x1c40bb6 0x1c3ff44 0x1c3fe1b 0x1d7da 0x1f65c 0x2a4d 0x2975) 의 libC++ abi.dylib : 종료 (lldb) 예외를 throw라는

+0

'showMessage :'메소드를 호출하는 사람이 있습니까? – David

+0

디버거가 말하는 정보에 붙여 넣을 수 있습니다 – Live2Enjoy7

+0

그 방법은 정보 버튼에 링크되어 있습니다.이 튜토리얼을 따라합니다. http://mobile.tutsplus.com/tutorials/iphone/uialertview/ – husammiwadi

답변

1

문제는 스토리 보드에 당신이 alert을 추가 한 (또는 뷰에 대한 포인터가 alert라고도 함)이다하지만 같은 클래스에 추가되지 않습니다 암호. 프로그래밍 방식으로 경고보기를 표시하는 경우 스토리 보드에서 제거 할 수 있습니다.

관련 문제