我无法在中声明@synthesize mCallnumber
。Callmethod
如果我声明它正在抛出错误,并且当我尝试在标题中声明它时,它也会抛出错误并且应用程序被终止。请帮助,因为我对这个 Objective-C 非常陌生。
-(IBAction)gotohomepage:(id)sender
{
[self dismissViewControllerAnimated:YES completion:nil];
}
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person
{
mContactNumber.text=@"";
mEmailId.text=@"";
mFirstName.text=@"";
mLastName.text=@"";
mFirstName.text=(NSString *)ABRecordCopyValue(person, kABPersonFirstNameProperty);
mLastName.text=(NSString *)ABRecordCopyValue(person, kABPersonLastNameProperty);
ABMultiValueRef phoneIdIndex=ABRecordCopyValue(person,kABPersonPhoneProperty);
CFIndex thePhoneIndex=ABMultiValueGetCount(phoneIdIndex);
if (thePhoneIndex!=0) {
mPhoneNumber=(NSString *)ABMultiValueCopyValueAtIndex(phoneIdIndex, 0);
mContactNumber.text=mPhoneNumber;
}
ABMultiValueRef emailIdIndex=ABRecordCopyValue(person, kABPersonEmailProperty);
CFIndex theEmailIndex=ABMultiValueGetCount(emailIdIndex);
if (theEmailIndex!=0) {
mEmailIdIndex=(NSString *)ABMultiValueCopyValueAtIndex(emailIdIndex, 0);
mEmailId.text=mEmailIdIndex;
}
[self dismissModalViewControllerAnimated:YES];
mCall.hidden=NO;
mEmail.hidden=NO;
mSMS.hidden=NO;
return NO;
}
- (void)peoplePickerNavigationControllerDidCancel:(ABPeoplePickerNavigationController *)peoplePicker
{
[self dismissModalViewControllerAnimated:YES];
}
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
{
return YES;
}
-(IBAction)callmethod
{
contactsViewController *actionHandleView=[[contactsViewController alloc]initWithNibName:@"contactsViewController" bundle:nil];
actionHandleView.mCallNumber=mPhoneNumber;
[self.navigationController pushViewController:actionHandleView animated:YES];
[actionHandleView release];
}