私no visible @ interface for "ICMinorWorksPart1" declares the selector "dismissModalViewControllerAnimated"
は次のようになっています:
[self presentModalViewController:picker animated:YES];
[self dismissModalViewControllerAnimated:YES];
[self dismissModalViewControllerAnimated:YES];
そして、コンパイラが何を訴えているのかわかりませんか?
.h
#import <AddressBookUI/AddressBookUI.h>
@interface ICMinorWorksPart1 : ICCertificateComponent <UITextViewDelegate,ABPeoplePickerNavigationControllerDelegate>
.....
.m
#import "ICMinorWorksPart1.h"
@implementation ICMinorWorksPart1
@synthesize dateMinorWorksCompletedField=_dateMinorWorksCompletedField;
@synthesize certificateReferenceField=_certificateReferenceField;
@synthesize clientField=_clientField;
@synthesize detailsOfDeparturesField=_detailsOfDeparturesField;
@synthesize descriptionOfMinorWorksField=_descriptionOfMinorWorksField;
@synthesize addressOfTheMinorWorks=_addressOfTheMinorWorks;
- (id)initWithCertificate:(Certificate *)certificate
{
if ((self = [super initWithCertificate:certificate])) {
[[NSBundle mainBundle] loadNibNamed:@"MinorWorksPart1" owner:self options:nil];
self.view.contentSize = CGSizeMake(self.contentView.frame.size.width, self.contentView.frame.size.height);
self.dateMinorWorksCompletedField.textValue = ([self attributeWithName:@"dateMinorWorksCompleted"]).value;
DebugLog(@"dateMinorWorksCompleted attribute value is %@", ([self attributeWithName:@"dateMinorWorksCompleted"]).value);
DebugLog(@"Certificate reference is %@", self.certificate.reference);
self.certificateReferenceField.text = (self.certificate.reference != nil ? self.certificate.reference : @"");
self.clientField.text = ([self attributeWithName:@"client"]).value;
self.detailsOfDeparturesField.text = ([self attributeWithName:@"detailsOfDepartures"]).value;
self.addressOfTheMinorWorks.text = ([self attributeWithName:@"addressOfTheMinorWorks"]).value;
self.descriptionOfMinorWorksField.text = ([self attributeWithName:@"descriptionOfMinorWorks"]).value;
}
return self;
}
- (void)save
{
([self attributeWithName:@"dateMinorWorksCompleted"]).value = [ICUtils nonNilString:self.dateMinorWorksCompletedField.textField.text];
DebugLog(@"dateMinorWorksCompleted value is %@", self.dateMinorWorksCompletedField.textField.text);
self.certificate.reference = [ICUtils nonNilString:self.certificateReferenceField.text];
([self attributeWithName:@"client"]).value = [ICUtils nonNilString:self.clientField.text];
([self attributeWithName:@"detailsOfDepartures"]).value = [ICUtils nonNilString:self.detailsOfDeparturesField.text];
([self attributeWithName:@"addressOfTheMinorWorks"]).value = [ICUtils nonNilString:self.addressOfTheMinorWorks.text];
([self attributeWithName:@"descriptionOfMinorWorks"]).value = [ICUtils nonNilString:self.descriptionOfMinorWorksField.text];
}
//add adress
- (IBAction)addAddressBtn:(id)sender {
ABPeoplePickerNavigationController *picker =
[[ABPeoplePickerNavigationController alloc] init];
picker.peoplePickerDelegate = self;
[self presentModalViewController:picker animated:YES];
}
- (void)peoplePickerNavigationControllerDidCancel:
(ABPeoplePickerNavigationController *)peoplePicker
{
[self dismissModalViewControllerAnimated:YES];
}
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person {
[self displayPerson:person];
[self dismissModalViewControllerAnimated:YES];
return NO;
}
- (BOOL)peoplePickerNavigationController:
(ABPeoplePickerNavigationController *)peoplePicker
shouldContinueAfterSelectingPerson:(ABRecordRef)person
property:(ABPropertyID)property
identifier:(ABMultiValueIdentifier)identifier
{
return NO;
}