I stuck in issue with these.
I open default contact list and try to open message composer sheet by selection phone number of particular contact.
But it close my app and try to call that person instead.
What i am doing wrong?
Please let me know.
This is my code of delegate method of address book from which i try to open message box.
- (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;
}