2011-10-14 7 views
0
-(IBAction)enterVeryBasics:(id)sender { 
    VeryBasics *enterIntro = [[VeryBasics alloc]initWithNibName:Nil bundle:Nil]; 
    [self presentModalViewController:enterIntro animated:YES]; 
    [enterIntro release]; 
} 

내가 여기에이 코드를 가지고 있고, [self presentModalViewController:enterIntro animated:YES];에 나에게 SIGABRTSIGABRT 전환 전망 목표 C

나도 같은하는 .m 파일에 여러 다른 작업이를주고, 그러나 그들은이를 포함되지 않습니다 문제. 의 UIViewController 클래스 참조 인스턴스 메소드 서명에서

+1

펜촉으로 'nil'을 전달 하시겠습니까? 또는 코드에 특정 파일 이름이 포함되어 있습니까? –

+0

오류를 포함 시키면 SIGABRT에 문제의 원인에 대한 정보가 포함되는 경우가 있습니다. – DBD

+0

'[enterIntro release];'가 너무 일찍 나타납니다. 당신은'dismissModalViewController'를 언젠가는 해방시켜야합니다. –

답변

1

봐 :

- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated 

은 VeryBasics가의 UIViewController의 서브 클래스입니다인가? 그것은 당신의 코드처럼 보이지 않습니다.

+0

init 메서드는 반드시 UIViewController 중 하나처럼 보입니다 ... – JustSid

+0

@JustSid 맞아요 ... 내 대답을 업데이트 할게요. – ARC

0
VeryBasics *enterIntro = [[VeryBasics alloc]init]; 
self presentModalViewController:enterIntro animated:YES]; 
[enterIntro release]; 

님이 없으면 initWithNibName을 사용하십시오.