当呈现模态视图以允许选择地址簿时。我收到错误
No visible @interface uiScrollView declares selector for modal presented animated
这里
[self presentModalViewController:picker animated:YES];
我想我需要使用performSelector:@selector
以下帖子中的研究
Objective-C 调用编译器不相信存在的选择器(即使我们知道它存在)
但是我不确定如何在我的代码中实现
- (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;
}