0
받기 "UIAlertView에 대해 표시 할 수있는 @interface가 없으면 선택기 'message : delegate : otherButtonTitles'"이 선언됩니다. 사용자가 이미지를 선택한 후에 표시 할 2 단추 경고 대화 상자를 설정하려고합니다. 나는 .h 파일 UIAlertDelegate에있다. 여기에 경고 대화 상자로 이미지 따기 코드입니다. 라인 "DIR = [[UIAlertView ALLOC]에경고 대화 상자를 사용하는 중 오류가 발생했습니다.
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[[UIApplication sharedApplication]setStatusBarHidden:YES];
[self dismissModalViewControllerAnimated:YES];
UIImage *originalImage = [info objectForKey:UIImagePickerControllerOriginalImage];
NSData *imageData = UIImagePNGRepresentation(originalImage);
NSString* imageName = @"yourPhoto.png";
NSString* paths = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)objectAtIndex:0];
NSString* fullPathToFile = [paths stringByAppendingPathComponent:imageName];
[imageData writeToFile:fullPathToFile atomically:NO];
UIAlertView *dir;
dir = [[[UIAlertView alloc]
message:@"Choose the direction."
delegate:self
otherButtonTitles:@"Left",@"Right",nil];
[dir show];
}
- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker {
[[UIApplication sharedApplication] setStatusBarHidden:YES];
[self dismissModalViewControllerAnimated:YES];
}
오류 쇼는 사람이 내가이 오류를 받고 있어요 왜 나를 도와 어떻게 해결하는 수