2013-05-25 9 views
0

내 아이폰 프로젝트에서 AHALertView를 사용하려고했지만 작동하지 않습니다. AHAlertView의 샘플 프로젝트를 실행해도 컴파일되지 않으며 '선언되지 않은 식별자 사용'및 기타 경고를 표시하는 13 개의 오류가 표시됩니다. 게다가. 누구나 그런 문제에 직면 했습니까? 그렇다면 어떻게 수정합니까? 여기 아이폰 프로젝트에서 AHAlertView를 사용하는 방법?

코드입니다 : -

- (IBAction)addEmail:(id)sender 
{ 
     AHAlertView *addFriendAlertView = [[AHAlertView alloc]initWithTitle:@"Add New Contact" message:@"Enter New E-mail"]; 
     addFriendAlertView.alertViewStyle = AHAlertViewStylePlainTextInput; 

     [addFriendAlertView setCancelButtonTitle:@"Cancel" block:^{ 
     NSLog(@"User cancelled the alert instead of entering new address"); 
}]; 

     [addFriendAlertView addButtonWithTitle:@"OK" block:^{ 
     NSLog(@"User entered the email :- %@",[addFriendAlertView textFieldAtIndex:0].text); 
}]; 

     [addFriendAlertView show]; 
+1

처럼이 속성을 합성하는 데 필요한 최신 엑스 코드 버전을 사용하지 않는 경우 https://github.com/warrenm/ AHAlertView는 매우 상세합니다. 오류에 따라 선언되지 않은 것은 무엇입니까? –

+0

선언되지 않은 식별자 '_presentationStyle', '_ dissmissalStyle', '_ title'등의 사용. – icodes

답변

0

당신이 명시 적으로

@synthesize presentationStyle = _presentationStyle; etc........ 
+0

고맙습니다 ...-) – icodes

관련 문제