0
私はこれらの問題を抱えていました。
私はデフォルトの連絡先リストを開いて、特定の連絡先の選択電話番号でメッセージコンポーザーシートを開こうとします。
しかし、私のアプリを閉じて、代わりにその人に電話をかけようとします。
私は間違っていますか?
お知らせください。
これは私がメッセージボックスを開こうとするアドレス帳の代理人メソッドのコードです。 NOそこiPhoneの連絡先リストで電話番号を選択してメッセージ作成者を開きます
- (BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)peoplePicker shouldContinueAfterSelectingPerson:(ABRecordRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier
{
Class msgClass = (NSClassFromString(@"MFMessageComposeViewController"));
if (msgClass != nil)
{
// We must always check whether the current device is configured for sending messages
if ([msgClass canSendText])
{
[self showComposerforMessage];
[self dismissModalViewControllerAnimated:TRUE];
}
else
{
UIAlertView *objAlert=[[UIAlertView alloc]initWithTitle:@"" message:@"Device is not configured to send text message." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[objAlert show];
[objAlert release];
}
}
else
{
UIAlertView *objAlert=[[UIAlertView alloc]initWithTitle:@"" message:@"Device is not configured to send text message." delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil];
[objAlert show];
[objAlert release];
}
return TRUE;
}